Index: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java =================================================================== --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (revision 1043843) +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (working copy) @@ -322,6 +322,13 @@ SEMANTIC_ANALYZER_HOOK("hive.semantic.analyzer.hook",null), + HIVE_AUTHORIZATION_ENABLED("hive.security.authorization.enabled", false), + HIVE_AUTHORIZATION_MANAGER("hive.security.authorization.manager", null), + HIVE_AUTHENTICATOR_MANAGER("hive.security.authenticator.manager", null), + HIVE_AUTHORIZATION_TABLE_OWNER_GRANTS("hive.exec.security.authorization.table.owner.grants", null), + HIVE_AUTHORIZATION_TABLE_USER_GRANTS("hive.exec.security.authorization.table.user.grants", null), + HIVE_AUTHORIZATION_TABLE_GROUP_GRANTS("hive.exec.security.authorization.table.group.grants", null), + HIVE_AUTHORIZATION_TABLE_ROLE_GRANTS("hive.exec.security.authorization.table.role.grants", null), // Print column names in output HIVE_CLI_PRINT_HEADER("hive.cli.print.header", false); ; Index: conf/hive-default.xml =================================================================== --- conf/hive-default.xml (revision 1043843) +++ conf/hive-default.xml (working copy) @@ -815,4 +815,58 @@ This enables substitution using syntax like ${var} ${system:var} and ${env:var}. + + hive.security.authorization.enabled + false + enable or disable the hive client authorization + + + + hive.security.authorization.manager + org.apache.hadoop.hive.ql.security.authorization.DefaultAuthorizationProviderManager + the hive client authorization manager class name + + + + hive.security.authenticator.manager + org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator + hive client authenticator manager class name + + + + hive.exec.security.authorization.table.owner.grants + + the privileges automatically granted to the owner + + + + hive.exec.security.authorization.table.user.grants + + the privileges automatically granted to some users whenenve a table gets created. + An example like "userX,userY:select;userZ:create" will grant select privilege to userX and userY, + and grant create privilege to userZ whenenve a new table created. + + + + hive.exec.security.authorization.table.group.grants + + the privileges automatically granted to some groups whenenve a table gets created. + An example like "groupX,groupY:select;groupZ:create" will grant select privilege to groupX and groupY, + and grant create privilege to groupZ whenenve a new table created. + + + + hive.exec.security.authorization.table.role.grants + + the privileges automatically granted to some groups whenenve a table gets created. + An example like "roleX,roleY:select;roleZ:create" will grant select privilege to roleX and roleY, + and grant create privilege to roleZ whenenve a new table created. + + + + hive.variable.substitute + true + This enables substitution using syntax like ${var} ${system:var} and ${env:var}. + + Index: metastore/if/hive_metastore.thrift =================================================================== --- metastore/if/hive_metastore.thrift (revision 1044070) +++ metastore/if/hive_metastore.thrift (working copy) @@ -29,12 +29,27 @@ 4: optional list fields // if the name is one of the user defined types } +struct PrincipalPrivilegeSet { + 1: map userPrivileges, // user name -> privilege set + 2: map groupPrivileges, // group name -> privilege set + 3: map rolePrivileges, //role name -> privilege set +} + // namespace for tables struct Database { 1: string name, 2: string description, 3: string locationUri, 4: map parameters // properties associated with the database + 5: optional PrincipalPrivilegeSet privileges +} + +struct Role { + 1: string roleName, + 2: Database database, + 3: i32 createTime, + 4: string ownerName, + 5: map parameters // properties associated with the database } // This object holds the information needed by SerDes @@ -77,7 +92,8 @@ 9: map parameters, // to store comments or any other user level parameters 10: string viewOriginalText, // original view text, null for non-view 11: string viewExpandedText, // expanded view text, null for non-view - 12: string tableType // table type enum, e.g. EXTERNAL_TABLE + 12: string tableType, // table type enum, e.g. EXTERNAL_TABLE + 13: optional PrincipalPrivilegeSet privileges, } struct Partition { @@ -87,7 +103,8 @@ 4: i32 createTime, 5: i32 lastAccessTime, 6: StorageDescriptor sd, - 7: map parameters + 7: map parameters, + 8: optional PrincipalPrivilegeSet privileges } struct Index { @@ -110,6 +127,62 @@ 2: map properties } +struct ColumnPrivilegeBag { + 1: string dbName, + 2: string tableName, + 3: string partitionName, + 4: map columnPrivileges +} + +struct PrivilegeBag { + 1: string userPrivileges, //user privileges + 2: map dbPrivileges, //database privileges + 3: map tablePrivileges, //table privileges + 4: map partitionPrivileges, //partition privileges + 5: list columnPrivileges, //column privileges +} + +struct SecurityUser { + 1: string principalName, + 2: bool isRole, + 3: bool isGroup, + 4: string privileges, + 5: i32 createTime, + 6: string grantor, +} + +struct SecurityDB { + 1: string principalName, + 2: bool isRole, + 3: bool isGroup, + 4: string privileges, + 5: i32 createTime, + 6: string grantor, + 7: Database db, +} + +struct SecurityTablePartition { + 1: string principalName, + 2: bool isRole, + 3: bool isGroup, + 4: string privileges, + 5: i32 createTime, + 6: string grantor, + 7: Table table, + 8: Partition part, +} + +struct SecurityColumn { + 1: string principalName, + 2: bool isRole, + 3: bool isGroup, + 4: string privileges, + 5: i32 createTime, + 6: string grantor, + 7: Table table, + 8: Partition partition, + 9: string column, +} exception MetaException { 1: string message @@ -209,6 +282,10 @@ throws(1:NoSuchObjectException o1, 2:MetaException o2) Partition get_partition(1:string db_name, 2:string tbl_name, 3:list part_vals) throws(1:MetaException o1, 2:NoSuchObjectException o2) + + Partition get_partition_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, + 4: string user_name, 5: list group_names) throws(1:MetaException o1, 2:NoSuchObjectException o2) + Partition get_partition_by_name(1:string db_name 2:string tbl_name, 3:string part_name) throws(1:MetaException o1, 2:NoSuchObjectException o2) @@ -216,6 +293,9 @@ // If max parts is given then it will return only that many. list get_partitions(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1) throws(1:NoSuchObjectException o1, 2:MetaException o2) + list get_partitions_with_auth(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1, + 4: string user_name, 5: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) + list get_partition_names(1:string db_name, 2:string tbl_name, 3:i16 max_parts=-1) throws(1:MetaException o2) @@ -228,6 +308,9 @@ list get_partitions_ps(1:string db_name 2:string tbl_name 3:list part_vals, 4:i16 max_parts=-1) throws(1:MetaException o1) + list get_partitions_ps_with_auth(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1, + 5: string user_name, 6: list group_names) throws(1:NoSuchObjectException o1, 2:MetaException o2) + list get_partition_names_ps(1:string db_name, 2:string tbl_name, 3:list part_vals, 4:i16 max_parts=-1) throws(1:MetaException o1) @@ -272,6 +355,46 @@ throws(1:NoSuchObjectException o1, 2:MetaException o2) list get_index_names(1:string db_name, 2:string tbl_name, 3:i16 max_indexes=-1) throws(1:MetaException o2) + + //authorization privileges + PrincipalPrivilegeSet get_user_privilege_set (1: string user_name, 2: list group_names) + throws(1:MetaException o1) + PrincipalPrivilegeSet get_db_privilege_set (1: string db_name, 2: string user_name, 3: list group_names) + throws(1:MetaException o1) + PrincipalPrivilegeSet get_table_privilege_set (1: string db_name, 2: string table_name, 3: string user_name, 4: list group_names) + throws(1:MetaException o1) + PrincipalPrivilegeSet get_partition_privilege_set (1: string db_name, 2: string table_name, 3: string part_name, 4: string user_name, 5: list group_names) + throws(1:MetaException o1) + + PrincipalPrivilegeSet get_column_privilege_set (1: string db_name, 2: string table_name, 3: string part_name, 4: string column_name, 5: string user_name, 6: list group_names) + throws(1:MetaException o1) + + bool create_role(1: string role_name, 2: string owner_name, 3: string db_name) throws(1:MetaException o1) + + bool drop_role(1: string role_name, 2: string db_name) throws(1:MetaException o1) + + bool add_role_member (1: string role_name, 2: string user_name, 3: bool is_role, 4: bool is_group, 5: string db_name) throws(1:MetaException o1) + + bool remove_role_member (1: string role_name, 2: string user_name, 3: bool is_role, 4: bool is_group, 5: string db_name) throws(1:MetaException o1) + + list list_roles(1: string principal_name, 2: bool is_role, 3: bool is_group, 4: string db_name) throws(1:MetaException o1) + + list list_security_user_grant(1: string principla_name, 2: bool is_role, 3: bool is_group) throws(1:MetaException o1) + + list list_security_db_grant(1: string principal_name, 2: bool is_group, 3: bool is_role, 4: string db_name) throws(1:MetaException o1) + + list list_security_table_grant(1: string principal_name, 2: bool is_group, 3: bool is_role, 4: string db_name, 5: string table_name) throws(1:MetaException o1) + + list list_security_partition_grant(1: string principal_name, 2: bool is_group, 3: bool is_role, 4: string db_name, 5: string table_name, 6: string part_name) throws(1:MetaException o1) + + list list_security_column_grant(1: string principal_name, 2: bool is_group, 3: bool is_role, 4: string db_name, 5: string table_name, 6: string part_name, 7: string column_name) throws(1:MetaException o1) + + bool grant_privileges (1: string user_name, 2: bool is_role, 3: bool is_group, 4: PrivilegeBag privileges, 5: string grantor) throws(1:MetaException o1) + + bool revoke_privileges (1: string user_name, 2: bool is_role, 3: bool is_group, 4: PrivilegeBag privileges) throws(1:MetaException o1) + + bool revoke_all_privileges (1: string user_name, 2: bool is_role, 3: bool is_group, 4: bool remove_user_priv, 5: list dbs, + 6: list tables, 7: list parts, 8: map> columns) throws(1:MetaException o1) } // * Note about the DDL_TIME: When creating or altering a table or a partition, Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (revision 1044070) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp (working copy) @@ -701,14 +701,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size98; - ::apache::thrift::protocol::TType _etype101; - iprot->readListBegin(_etype101, _size98); - this->success.resize(_size98); - uint32_t _i102; - for (_i102 = 0; _i102 < _size98; ++_i102) + uint32_t _size168; + ::apache::thrift::protocol::TType _etype171; + iprot->readListBegin(_etype171, _size168); + this->success.resize(_size168); + uint32_t _i172; + for (_i172 = 0; _i172 < _size168; ++_i172) { - xfer += iprot->readString(this->success[_i102]); + xfer += iprot->readString(this->success[_i172]); } iprot->readListEnd(); } @@ -747,10 +747,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter103; - for (_iter103 = this->success.begin(); _iter103 != this->success.end(); ++_iter103) + std::vector ::const_iterator _iter173; + for (_iter173 = this->success.begin(); _iter173 != this->success.end(); ++_iter173) { - xfer += oprot->writeString((*_iter103)); + xfer += oprot->writeString((*_iter173)); } xfer += oprot->writeListEnd(); } @@ -789,14 +789,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size104; - ::apache::thrift::protocol::TType _etype107; - iprot->readListBegin(_etype107, _size104); - (*(this->success)).resize(_size104); - uint32_t _i108; - for (_i108 = 0; _i108 < _size104; ++_i108) + uint32_t _size174; + ::apache::thrift::protocol::TType _etype177; + iprot->readListBegin(_etype177, _size174); + (*(this->success)).resize(_size174); + uint32_t _i178; + for (_i178 = 0; _i178 < _size174; ++_i178) { - xfer += iprot->readString((*(this->success))[_i108]); + xfer += iprot->readString((*(this->success))[_i178]); } iprot->readListEnd(); } @@ -897,14 +897,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size109; - ::apache::thrift::protocol::TType _etype112; - iprot->readListBegin(_etype112, _size109); - this->success.resize(_size109); - uint32_t _i113; - for (_i113 = 0; _i113 < _size109; ++_i113) + uint32_t _size179; + ::apache::thrift::protocol::TType _etype182; + iprot->readListBegin(_etype182, _size179); + this->success.resize(_size179); + uint32_t _i183; + for (_i183 = 0; _i183 < _size179; ++_i183) { - xfer += iprot->readString(this->success[_i113]); + xfer += iprot->readString(this->success[_i183]); } iprot->readListEnd(); } @@ -943,10 +943,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter114; - for (_iter114 = this->success.begin(); _iter114 != this->success.end(); ++_iter114) + std::vector ::const_iterator _iter184; + for (_iter184 = this->success.begin(); _iter184 != this->success.end(); ++_iter184) { - xfer += oprot->writeString((*_iter114)); + xfer += oprot->writeString((*_iter184)); } xfer += oprot->writeListEnd(); } @@ -985,14 +985,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size115; - ::apache::thrift::protocol::TType _etype118; - iprot->readListBegin(_etype118, _size115); - (*(this->success)).resize(_size115); - uint32_t _i119; - for (_i119 = 0; _i119 < _size115; ++_i119) + uint32_t _size185; + ::apache::thrift::protocol::TType _etype188; + iprot->readListBegin(_etype188, _size185); + (*(this->success)).resize(_size185); + uint32_t _i189; + for (_i189 = 0; _i189 < _size185; ++_i189) { - xfer += iprot->readString((*(this->success))[_i119]); + xfer += iprot->readString((*(this->success))[_i189]); } iprot->readListEnd(); } @@ -1721,17 +1721,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); - uint32_t _size120; - ::apache::thrift::protocol::TType _ktype121; - ::apache::thrift::protocol::TType _vtype122; - iprot->readMapBegin(_ktype121, _vtype122, _size120); - uint32_t _i124; - for (_i124 = 0; _i124 < _size120; ++_i124) + uint32_t _size190; + ::apache::thrift::protocol::TType _ktype191; + ::apache::thrift::protocol::TType _vtype192; + iprot->readMapBegin(_ktype191, _vtype192, _size190); + uint32_t _i194; + for (_i194 = 0; _i194 < _size190; ++_i194) { - std::string _key125; - xfer += iprot->readString(_key125); - Type& _val126 = this->success[_key125]; - xfer += _val126.read(iprot); + std::string _key195; + xfer += iprot->readString(_key195); + Type& _val196 = this->success[_key195]; + xfer += _val196.read(iprot); } iprot->readMapEnd(); } @@ -1770,11 +1770,11 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::map ::const_iterator _iter127; - for (_iter127 = this->success.begin(); _iter127 != this->success.end(); ++_iter127) + std::map ::const_iterator _iter197; + for (_iter197 = this->success.begin(); _iter197 != this->success.end(); ++_iter197) { - xfer += oprot->writeString(_iter127->first); - xfer += _iter127->second.write(oprot); + xfer += oprot->writeString(_iter197->first); + xfer += _iter197->second.write(oprot); } xfer += oprot->writeMapEnd(); } @@ -1813,17 +1813,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); - uint32_t _size128; - ::apache::thrift::protocol::TType _ktype129; - ::apache::thrift::protocol::TType _vtype130; - iprot->readMapBegin(_ktype129, _vtype130, _size128); - uint32_t _i132; - for (_i132 = 0; _i132 < _size128; ++_i132) + uint32_t _size198; + ::apache::thrift::protocol::TType _ktype199; + ::apache::thrift::protocol::TType _vtype200; + iprot->readMapBegin(_ktype199, _vtype200, _size198); + uint32_t _i202; + for (_i202 = 0; _i202 < _size198; ++_i202) { - std::string _key133; - xfer += iprot->readString(_key133); - Type& _val134 = (*(this->success))[_key133]; - xfer += _val134.read(iprot); + std::string _key203; + xfer += iprot->readString(_key203); + Type& _val204 = (*(this->success))[_key203]; + xfer += _val204.read(iprot); } iprot->readMapEnd(); } @@ -1952,14 +1952,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size135; - ::apache::thrift::protocol::TType _etype138; - iprot->readListBegin(_etype138, _size135); - this->success.resize(_size135); - uint32_t _i139; - for (_i139 = 0; _i139 < _size135; ++_i139) + uint32_t _size205; + ::apache::thrift::protocol::TType _etype208; + iprot->readListBegin(_etype208, _size205); + this->success.resize(_size205); + uint32_t _i209; + for (_i209 = 0; _i209 < _size205; ++_i209) { - xfer += this->success[_i139].read(iprot); + xfer += this->success[_i209].read(iprot); } iprot->readListEnd(); } @@ -2014,10 +2014,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter140; - for (_iter140 = this->success.begin(); _iter140 != this->success.end(); ++_iter140) + std::vector ::const_iterator _iter210; + for (_iter210 = this->success.begin(); _iter210 != this->success.end(); ++_iter210) { - xfer += (*_iter140).write(oprot); + xfer += (*_iter210).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2064,14 +2064,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size141; - ::apache::thrift::protocol::TType _etype144; - iprot->readListBegin(_etype144, _size141); - (*(this->success)).resize(_size141); - uint32_t _i145; - for (_i145 = 0; _i145 < _size141; ++_i145) + uint32_t _size211; + ::apache::thrift::protocol::TType _etype214; + iprot->readListBegin(_etype214, _size211); + (*(this->success)).resize(_size211); + uint32_t _i215; + for (_i215 = 0; _i215 < _size211; ++_i215) { - xfer += (*(this->success))[_i145].read(iprot); + xfer += (*(this->success))[_i215].read(iprot); } iprot->readListEnd(); } @@ -2216,14 +2216,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size146; - ::apache::thrift::protocol::TType _etype149; - iprot->readListBegin(_etype149, _size146); - this->success.resize(_size146); - uint32_t _i150; - for (_i150 = 0; _i150 < _size146; ++_i150) + uint32_t _size216; + ::apache::thrift::protocol::TType _etype219; + iprot->readListBegin(_etype219, _size216); + this->success.resize(_size216); + uint32_t _i220; + for (_i220 = 0; _i220 < _size216; ++_i220) { - xfer += this->success[_i150].read(iprot); + xfer += this->success[_i220].read(iprot); } iprot->readListEnd(); } @@ -2278,10 +2278,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter151; - for (_iter151 = this->success.begin(); _iter151 != this->success.end(); ++_iter151) + std::vector ::const_iterator _iter221; + for (_iter221 = this->success.begin(); _iter221 != this->success.end(); ++_iter221) { - xfer += (*_iter151).write(oprot); + xfer += (*_iter221).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2328,14 +2328,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size152; - ::apache::thrift::protocol::TType _etype155; - iprot->readListBegin(_etype155, _size152); - (*(this->success)).resize(_size152); - uint32_t _i156; - for (_i156 = 0; _i156 < _size152; ++_i156) + uint32_t _size222; + ::apache::thrift::protocol::TType _etype225; + iprot->readListBegin(_etype225, _size222); + (*(this->success)).resize(_size222); + uint32_t _i226; + for (_i226 = 0; _i226 < _size222; ++_i226) { - xfer += (*(this->success))[_i156].read(iprot); + xfer += (*(this->success))[_i226].read(iprot); } iprot->readListEnd(); } @@ -2904,14 +2904,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size157; - ::apache::thrift::protocol::TType _etype160; - iprot->readListBegin(_etype160, _size157); - this->success.resize(_size157); - uint32_t _i161; - for (_i161 = 0; _i161 < _size157; ++_i161) + uint32_t _size227; + ::apache::thrift::protocol::TType _etype230; + iprot->readListBegin(_etype230, _size227); + this->success.resize(_size227); + uint32_t _i231; + for (_i231 = 0; _i231 < _size227; ++_i231) { - xfer += iprot->readString(this->success[_i161]); + xfer += iprot->readString(this->success[_i231]); } iprot->readListEnd(); } @@ -2950,10 +2950,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter162; - for (_iter162 = this->success.begin(); _iter162 != this->success.end(); ++_iter162) + std::vector ::const_iterator _iter232; + for (_iter232 = this->success.begin(); _iter232 != this->success.end(); ++_iter232) { - xfer += oprot->writeString((*_iter162)); + xfer += oprot->writeString((*_iter232)); } xfer += oprot->writeListEnd(); } @@ -2992,14 +2992,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size163; - ::apache::thrift::protocol::TType _etype166; - iprot->readListBegin(_etype166, _size163); - (*(this->success)).resize(_size163); - uint32_t _i167; - for (_i167 = 0; _i167 < _size163; ++_i167) + uint32_t _size233; + ::apache::thrift::protocol::TType _etype236; + iprot->readListBegin(_etype236, _size233); + (*(this->success)).resize(_size233); + uint32_t _i237; + for (_i237 = 0; _i237 < _size233; ++_i237) { - xfer += iprot->readString((*(this->success))[_i167]); + xfer += iprot->readString((*(this->success))[_i237]); } iprot->readListEnd(); } @@ -3114,14 +3114,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size168; - ::apache::thrift::protocol::TType _etype171; - iprot->readListBegin(_etype171, _size168); - this->success.resize(_size168); - uint32_t _i172; - for (_i172 = 0; _i172 < _size168; ++_i172) + uint32_t _size238; + ::apache::thrift::protocol::TType _etype241; + iprot->readListBegin(_etype241, _size238); + this->success.resize(_size238); + uint32_t _i242; + for (_i242 = 0; _i242 < _size238; ++_i242) { - xfer += iprot->readString(this->success[_i172]); + xfer += iprot->readString(this->success[_i242]); } iprot->readListEnd(); } @@ -3160,10 +3160,10 @@ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter173; - for (_iter173 = this->success.begin(); _iter173 != this->success.end(); ++_iter173) + std::vector ::const_iterator _iter243; + for (_iter243 = this->success.begin(); _iter243 != this->success.end(); ++_iter243) { - xfer += oprot->writeString((*_iter173)); + xfer += oprot->writeString((*_iter243)); } xfer += oprot->writeListEnd(); } @@ -3202,14 +3202,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size174; - ::apache::thrift::protocol::TType _etype177; - iprot->readListBegin(_etype177, _size174); - (*(this->success)).resize(_size174); - uint32_t _i178; - for (_i178 = 0; _i178 < _size174; ++_i178) + uint32_t _size244; + ::apache::thrift::protocol::TType _etype247; + iprot->readListBegin(_etype247, _size244); + (*(this->success)).resize(_size244); + uint32_t _i248; + for (_i248 = 0; _i248 < _size244; ++_i248) { - xfer += iprot->readString((*(this->success))[_i178]); + xfer += iprot->readString((*(this->success))[_i248]); } iprot->readListEnd(); } @@ -3914,14 +3914,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size179; - ::apache::thrift::protocol::TType _etype182; - iprot->readListBegin(_etype182, _size179); - this->part_vals.resize(_size179); - uint32_t _i183; - for (_i183 = 0; _i183 < _size179; ++_i183) + uint32_t _size249; + ::apache::thrift::protocol::TType _etype252; + iprot->readListBegin(_etype252, _size249); + this->part_vals.resize(_size249); + uint32_t _i253; + for (_i253 = 0; _i253 < _size249; ++_i253) { - xfer += iprot->readString(this->part_vals[_i183]); + xfer += iprot->readString(this->part_vals[_i253]); } iprot->readListEnd(); } @@ -3954,10 +3954,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter184; - for (_iter184 = this->part_vals.begin(); _iter184 != this->part_vals.end(); ++_iter184) + std::vector ::const_iterator _iter254; + for (_iter254 = this->part_vals.begin(); _iter254 != this->part_vals.end(); ++_iter254) { - xfer += oprot->writeString((*_iter184)); + xfer += oprot->writeString((*_iter254)); } xfer += oprot->writeListEnd(); } @@ -3979,10 +3979,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter185; - for (_iter185 = (*(this->part_vals)).begin(); _iter185 != (*(this->part_vals)).end(); ++_iter185) + std::vector ::const_iterator _iter255; + for (_iter255 = (*(this->part_vals)).begin(); _iter255 != (*(this->part_vals)).end(); ++_iter255) { - xfer += oprot->writeString((*_iter185)); + xfer += oprot->writeString((*_iter255)); } xfer += oprot->writeListEnd(); } @@ -4434,14 +4434,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size186; - ::apache::thrift::protocol::TType _etype189; - iprot->readListBegin(_etype189, _size186); - this->part_vals.resize(_size186); - uint32_t _i190; - for (_i190 = 0; _i190 < _size186; ++_i190) + uint32_t _size256; + ::apache::thrift::protocol::TType _etype259; + iprot->readListBegin(_etype259, _size256); + this->part_vals.resize(_size256); + uint32_t _i260; + for (_i260 = 0; _i260 < _size256; ++_i260) { - xfer += iprot->readString(this->part_vals[_i190]); + xfer += iprot->readString(this->part_vals[_i260]); } iprot->readListEnd(); } @@ -4482,10 +4482,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter191; - for (_iter191 = this->part_vals.begin(); _iter191 != this->part_vals.end(); ++_iter191) + std::vector ::const_iterator _iter261; + for (_iter261 = this->part_vals.begin(); _iter261 != this->part_vals.end(); ++_iter261) { - xfer += oprot->writeString((*_iter191)); + xfer += oprot->writeString((*_iter261)); } xfer += oprot->writeListEnd(); } @@ -4510,10 +4510,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter192; - for (_iter192 = (*(this->part_vals)).begin(); _iter192 != (*(this->part_vals)).end(); ++_iter192) + std::vector ::const_iterator _iter262; + for (_iter262 = (*(this->part_vals)).begin(); _iter262 != (*(this->part_vals)).end(); ++_iter262) { - xfer += oprot->writeString((*_iter192)); + xfer += oprot->writeString((*_iter262)); } xfer += oprot->writeListEnd(); } @@ -4942,14 +4942,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size193; - ::apache::thrift::protocol::TType _etype196; - iprot->readListBegin(_etype196, _size193); - this->part_vals.resize(_size193); - uint32_t _i197; - for (_i197 = 0; _i197 < _size193; ++_i197) + uint32_t _size263; + ::apache::thrift::protocol::TType _etype266; + iprot->readListBegin(_etype266, _size263); + this->part_vals.resize(_size263); + uint32_t _i267; + for (_i267 = 0; _i267 < _size263; ++_i267) { - xfer += iprot->readString(this->part_vals[_i197]); + xfer += iprot->readString(this->part_vals[_i267]); } iprot->readListEnd(); } @@ -4982,10 +4982,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter198; - for (_iter198 = this->part_vals.begin(); _iter198 != this->part_vals.end(); ++_iter198) + std::vector ::const_iterator _iter268; + for (_iter268 = this->part_vals.begin(); _iter268 != this->part_vals.end(); ++_iter268) { - xfer += oprot->writeString((*_iter198)); + xfer += oprot->writeString((*_iter268)); } xfer += oprot->writeListEnd(); } @@ -5007,10 +5007,10 @@ xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter199; - for (_iter199 = (*(this->part_vals)).begin(); _iter199 != (*(this->part_vals)).end(); ++_iter199) + std::vector ::const_iterator _iter269; + for (_iter269 = (*(this->part_vals)).begin(); _iter269 != (*(this->part_vals)).end(); ++_iter269) { - xfer += oprot->writeString((*_iter199)); + xfer += oprot->writeString((*_iter269)); } xfer += oprot->writeListEnd(); } @@ -5156,7 +5156,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5193,9 +5193,49 @@ } break; case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size270; + ::apache::thrift::protocol::TType _etype273; + iprot->readListBegin(_etype273, _size270); + this->part_vals.resize(_size270); + uint32_t _i274; + for (_i274 = 0; _i274 < _size270; ++_i274) + { + xfer += iprot->readString(this->part_vals[_i274]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size275; + ::apache::thrift::protocol::TType _etype278; + iprot->readListBegin(_etype278, _size275); + this->group_names.resize(_size275); + uint32_t _i279; + for (_i279 = 0; _i279 < _size275; ++_i279) + { + xfer += iprot->readString(this->group_names[_i279]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -5212,41 +5252,85 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_args"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); + std::vector ::const_iterator _iter280; + for (_iter280 = this->part_vals.begin(); _iter280 != this->part_vals.end(); ++_iter280) + { + xfer += oprot->writeString((*_iter280)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter281; + for (_iter281 = this->group_names.begin(); _iter281 != this->group_names.end(); ++_iter281) + { + xfer += oprot->writeString((*_iter281)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_pargs"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + std::vector ::const_iterator _iter282; + for (_iter282 = (*(this->part_vals)).begin(); _iter282 != (*(this->part_vals)).end(); ++_iter282) + { + xfer += oprot->writeString((*_iter282)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter283; + for (_iter283 = (*(this->group_names)).begin(); _iter283 != (*(this->group_names)).end(); ++_iter283) + { + xfer += oprot->writeString((*_iter283)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5302,11 +5386,11 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); @@ -5326,7 +5410,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5382,7 +5466,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5419,9 +5503,9 @@ } break; case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; } else { xfer += iprot->skip(ftype); } @@ -5438,41 +5522,41 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_args"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_pargs"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5493,20 +5577,8 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size200; - ::apache::thrift::protocol::TType _etype203; - iprot->readListBegin(_etype203, _size200); - this->success.resize(_size200); - uint32_t _i204; - for (_i204 = 0; _i204 < _size200; ++_i204) - { - xfer += this->success[_i204].read(iprot); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -5540,23 +5612,15 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter205; - for (_iter205 = this->success.begin(); _iter205 != this->success.end(); ++_iter205) - { - xfer += (*_iter205).write(oprot); - } - xfer += oprot->writeListEnd(); - } + 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); @@ -5572,7 +5636,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5593,20 +5657,8 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size206; - ::apache::thrift::protocol::TType _etype209; - iprot->readListBegin(_etype209, _size206); - (*(this->success)).resize(_size206); - uint32_t _i210; - for (_i210 = 0; _i210 < _size206; ++_i210) - { - xfer += (*(this->success))[_i210].read(iprot); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -5640,7 +5692,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5696,9 +5748,9 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_args"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); @@ -5713,9 +5765,9 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pargs"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); @@ -5730,7 +5782,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5754,14 +5806,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size211; - ::apache::thrift::protocol::TType _etype214; - iprot->readListBegin(_etype214, _size211); - this->success.resize(_size211); - uint32_t _i215; - for (_i215 = 0; _i215 < _size211; ++_i215) + uint32_t _size284; + ::apache::thrift::protocol::TType _etype287; + iprot->readListBegin(_etype287, _size284); + this->success.resize(_size284); + uint32_t _i288; + for (_i288 = 0; _i288 < _size284; ++_i288) { - xfer += iprot->readString(this->success[_i215]); + xfer += this->success[_i288].read(iprot); } iprot->readListEnd(); } @@ -5772,6 +5824,14 @@ 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5790,26 +5850,30 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter216; - for (_iter216 = this->success.begin(); _iter216 != this->success.end(); ++_iter216) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter289; + for (_iter289 = this->success.begin(); _iter289 != this->success.end(); ++_iter289) { - xfer += oprot->writeString((*_iter216)); + xfer += (*_iter289).write(oprot); } xfer += oprot->writeListEnd(); } 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(); } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -5818,7 +5882,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5842,14 +5906,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size217; - ::apache::thrift::protocol::TType _etype220; - iprot->readListBegin(_etype220, _size217); - (*(this->success)).resize(_size217); - uint32_t _i221; - for (_i221 = 0; _i221 < _size217; ++_i221) + uint32_t _size290; + ::apache::thrift::protocol::TType _etype293; + iprot->readListBegin(_etype293, _size290); + (*(this->success)).resize(_size290); + uint32_t _i294; + for (_i294 = 0; _i294 < _size290; ++_i294) { - xfer += iprot->readString((*(this->success))[_i221]); + xfer += (*(this->success))[_i294].read(iprot); } iprot->readListEnd(); } @@ -5860,6 +5924,14 @@ 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5878,7 +5950,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5915,29 +5987,37 @@ } break; case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size222; - ::apache::thrift::protocol::TType _etype225; - iprot->readListBegin(_etype225, _size222); - this->part_vals.resize(_size222); - uint32_t _i226; - for (_i226 = 0; _i226 < _size222; ++_i226) - { - xfer += iprot->readString(this->part_vals[_i226]); - } - iprot->readListEnd(); - } - this->__isset.part_vals = true; + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; } else { xfer += iprot->skip(ftype); } break; case 4: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size295; + ::apache::thrift::protocol::TType _etype298; + iprot->readListBegin(_etype298, _size295); + this->group_names.resize(_size295); + uint32_t _i299; + for (_i299 = 0; _i299 < _size295; ++_i299) + { + xfer += iprot->readString(this->group_names[_i299]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -5954,63 +6034,69 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_args"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter227; - for (_iter227 = this->part_vals.begin(); _iter227 != this->part_vals.end(); ++_iter227) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter300; + for (_iter300 = this->group_names.begin(); _iter300 != this->group_names.end(); ++_iter300) { - xfer += oprot->writeString((*_iter227)); + xfer += oprot->writeString((*_iter300)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); - xfer += oprot->writeI16(this->max_parts); - xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_pargs"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter228; - for (_iter228 = (*(this->part_vals)).begin(); _iter228 != (*(this->part_vals)).end(); ++_iter228) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter301; + for (_iter301 = (*(this->group_names)).begin(); _iter301 != (*(this->group_names)).end(); ++_iter301) { - xfer += oprot->writeString((*_iter228)); + xfer += oprot->writeString((*_iter301)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); - xfer += oprot->writeI16((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6034,14 +6120,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size229; - ::apache::thrift::protocol::TType _etype232; - iprot->readListBegin(_etype232, _size229); - this->success.resize(_size229); - uint32_t _i233; - for (_i233 = 0; _i233 < _size229; ++_i233) + uint32_t _size302; + ::apache::thrift::protocol::TType _etype305; + iprot->readListBegin(_etype305, _size302); + this->success.resize(_size302); + uint32_t _i306; + for (_i306 = 0; _i306 < _size302; ++_i306) { - xfer += this->success[_i233].read(iprot); + xfer += this->success[_i306].read(iprot); } iprot->readListEnd(); } @@ -6058,6 +6144,14 @@ xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -6070,20 +6164,20 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter234; - for (_iter234 = this->success.begin(); _iter234 != this->success.end(); ++_iter234) + std::vector ::const_iterator _iter307; + for (_iter307 = this->success.begin(); _iter307 != this->success.end(); ++_iter307) { - xfer += (*_iter234).write(oprot); + xfer += (*_iter307).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6092,13 +6186,17 @@ xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6122,14 +6220,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size235; - ::apache::thrift::protocol::TType _etype238; - iprot->readListBegin(_etype238, _size235); - (*(this->success)).resize(_size235); - uint32_t _i239; - for (_i239 = 0; _i239 < _size235; ++_i239) + uint32_t _size308; + ::apache::thrift::protocol::TType _etype311; + iprot->readListBegin(_etype311, _size308); + (*(this->success)).resize(_size308); + uint32_t _i312; + for (_i312 = 0; _i312 < _size308; ++_i312) { - xfer += (*(this->success))[_i239].read(iprot); + xfer += (*(this->success))[_i312].read(iprot); } iprot->readListEnd(); } @@ -6146,6 +6244,14 @@ xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -6158,7 +6264,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6195,26 +6301,6 @@ } break; case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size240; - ::apache::thrift::protocol::TType _etype243; - iprot->readListBegin(_etype243, _size240); - this->part_vals.resize(_size240); - uint32_t _i244; - for (_i244 = 0; _i244 < _size240; ++_i244) - { - xfer += iprot->readString(this->part_vals[_i244]); - } - iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: if (ftype == ::apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_parts); this->__isset.max_parts = true; @@ -6234,27 +6320,16 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_args"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter245; - for (_iter245 = this->part_vals.begin(); _iter245 != this->part_vals.end(); ++_iter245) - { - xfer += oprot->writeString((*_iter245)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6262,27 +6337,16 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_pargs"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter246; - for (_iter246 = (*(this->part_vals)).begin(); _iter246 != (*(this->part_vals)).end(); ++_iter246) - { - xfer += oprot->writeString((*_iter246)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6290,7 +6354,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6314,14 +6378,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size247; - ::apache::thrift::protocol::TType _etype250; - iprot->readListBegin(_etype250, _size247); - this->success.resize(_size247); - uint32_t _i251; - for (_i251 = 0; _i251 < _size247; ++_i251) + uint32_t _size313; + ::apache::thrift::protocol::TType _etype316; + iprot->readListBegin(_etype316, _size313); + this->success.resize(_size313); + uint32_t _i317; + for (_i317 = 0; _i317 < _size313; ++_i317) { - xfer += iprot->readString(this->success[_i251]); + xfer += iprot->readString(this->success[_i317]); } iprot->readListEnd(); } @@ -6332,8 +6396,8 @@ break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -6350,27 +6414,27 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter252; - for (_iter252 = this->success.begin(); _iter252 != this->success.end(); ++_iter252) + std::vector ::const_iterator _iter318; + for (_iter318 = this->success.begin(); _iter318 != this->success.end(); ++_iter318) { - xfer += oprot->writeString((*_iter252)); + xfer += oprot->writeString((*_iter318)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); @@ -6378,7 +6442,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6402,14 +6466,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size253; - ::apache::thrift::protocol::TType _etype256; - iprot->readListBegin(_etype256, _size253); - (*(this->success)).resize(_size253); - uint32_t _i257; - for (_i257 = 0; _i257 < _size253; ++_i257) + uint32_t _size319; + ::apache::thrift::protocol::TType _etype322; + iprot->readListBegin(_etype322, _size319); + (*(this->success)).resize(_size319); + uint32_t _i323; + for (_i323 = 0; _i323 < _size319; ++_i323) { - xfer += iprot->readString((*(this->success))[_i257]); + xfer += iprot->readString((*(this->success))[_i323]); } iprot->readListEnd(); } @@ -6420,8 +6484,8 @@ break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -6438,7 +6502,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6475,9 +6539,21 @@ } break; case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->filter); - this->__isset.filter = true; + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size324; + ::apache::thrift::protocol::TType _etype327; + iprot->readListBegin(_etype327, _size324); + this->part_vals.resize(_size324); + uint32_t _i328; + for (_i328 = 0; _i328 < _size324; ++_i328) + { + xfer += iprot->readString(this->part_vals[_i328]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; } else { xfer += iprot->skip(ftype); } @@ -6502,17 +6578,25 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_args"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->filter); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); + std::vector ::const_iterator _iter329; + for (_iter329 = this->part_vals.begin(); _iter329 != this->part_vals.end(); ++_iter329) + { + xfer += oprot->writeString((*_iter329)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); @@ -6522,17 +6606,25 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_pargs"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->filter))); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + std::vector ::const_iterator _iter330; + for (_iter330 = (*(this->part_vals)).begin(); _iter330 != (*(this->part_vals)).end(); ++_iter330) + { + xfer += oprot->writeString((*_iter330)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); @@ -6542,7 +6634,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6566,14 +6658,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size258; - ::apache::thrift::protocol::TType _etype261; - iprot->readListBegin(_etype261, _size258); - this->success.resize(_size258); - uint32_t _i262; - for (_i262 = 0; _i262 < _size258; ++_i262) + uint32_t _size331; + ::apache::thrift::protocol::TType _etype334; + iprot->readListBegin(_etype334, _size331); + this->success.resize(_size331); + uint32_t _i335; + for (_i335 = 0; _i335 < _size331; ++_i335) { - xfer += this->success[_i262].read(iprot); + xfer += this->success[_i335].read(iprot); } iprot->readListEnd(); } @@ -6590,14 +6682,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -6610,20 +6694,20 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter263; - for (_iter263 = this->success.begin(); _iter263 != this->success.end(); ++_iter263) + std::vector ::const_iterator _iter336; + for (_iter336 = this->success.begin(); _iter336 != this->success.end(); ++_iter336) { - xfer += (*_iter263).write(oprot); + xfer += (*_iter336).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6632,17 +6716,13 @@ xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6666,14 +6746,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size264; - ::apache::thrift::protocol::TType _etype267; - iprot->readListBegin(_etype267, _size264); - (*(this->success)).resize(_size264); - uint32_t _i268; - for (_i268 = 0; _i268 < _size264; ++_i268) + uint32_t _size337; + ::apache::thrift::protocol::TType _etype340; + iprot->readListBegin(_etype340, _size337); + (*(this->success)).resize(_size337); + uint32_t _i341; + for (_i341 = 0; _i341 < _size337; ++_i341) { - xfer += (*(this->success))[_i268].read(iprot); + xfer += (*(this->success))[_i341].read(iprot); } iprot->readListEnd(); } @@ -6690,14 +6770,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -6710,7 +6782,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6747,9 +6819,57 @@ } break; case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size342; + ::apache::thrift::protocol::TType _etype345; + iprot->readListBegin(_etype345, _size342); + this->part_vals.resize(_size342); + uint32_t _i346; + for (_i346 = 0; _i346 < _size342; ++_i346) + { + xfer += iprot->readString(this->part_vals[_i346]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size347; + ::apache::thrift::protocol::TType _etype350; + iprot->readListBegin(_etype350, _size347); + this->group_names.resize(_size347); + uint32_t _i351; + for (_i351 = 0; _i351 < _size347; ++_i351) + { + xfer += iprot->readString(this->group_names[_i351]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -6766,41 +6886,91 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_args"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->new_part.write(oprot); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); + std::vector ::const_iterator _iter352; + for (_iter352 = this->part_vals.begin(); _iter352 != this->part_vals.end(); ++_iter352) + { + xfer += oprot->writeString((*_iter352)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter353; + for (_iter353 = this->group_names.begin(); _iter353 != this->group_names.end(); ++_iter353) + { + xfer += oprot->writeString((*_iter353)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_pargs"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += (*(this->new_part)).write(oprot); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + std::vector ::const_iterator _iter354; + for (_iter354 = (*(this->part_vals)).begin(); _iter354 != (*(this->part_vals)).end(); ++_iter354) + { + xfer += oprot->writeString((*_iter354)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter355; + for (_iter355 = (*(this->group_names)).begin(); _iter355 != (*(this->group_names)).end(); ++_iter355) + { + xfer += oprot->writeString((*_iter355)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6820,6 +6990,26 @@ } switch (fid) { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size356; + ::apache::thrift::protocol::TType _etype359; + iprot->readListBegin(_etype359, _size356); + this->success.resize(_size356); + uint32_t _i360; + for (_i360 = 0; _i360 < _size356; ++_i360) + { + xfer += this->success[_i360].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -6848,13 +7038,25 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_result"); - if (this->__isset.o1) { + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter361; + for (_iter361 = this->success.begin(); _iter361 != this->success.end(); ++_iter361) + { + xfer += (*_iter361).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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(); @@ -6868,7 +7070,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6888,6 +7090,26 @@ } switch (fid) { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size362; + ::apache::thrift::protocol::TType _etype365; + iprot->readListBegin(_etype365, _size362); + (*(this->success)).resize(_size362); + uint32_t _i366; + for (_i366 = 0; _i366 < _size362; ++_i366) + { + xfer += (*(this->success))[_i366].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -6916,7 +7138,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6938,16 +7160,44 @@ { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->defaultValue); - this->__isset.defaultValue = true; + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size367; + ::apache::thrift::protocol::TType _etype370; + iprot->readListBegin(_etype370, _size367); + this->part_vals.resize(_size367); + uint32_t _i371; + for (_i371 = 0; _i371 < _size367; ++_i371) + { + xfer += iprot->readString(this->part_vals[_i371]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; } else { xfer += iprot->skip(ftype); } @@ -6964,35 +7214,63 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_args"); - xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->defaultValue); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); + std::vector ::const_iterator _iter372; + for (_iter372 = this->part_vals.begin(); _iter372 != this->part_vals.end(); ++_iter372) + { + xfer += oprot->writeString((*_iter372)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_pargs"); - xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->defaultValue))); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + std::vector ::const_iterator _iter373; + for (_iter373 = (*(this->part_vals)).begin(); _iter373 != (*(this->part_vals)).end(); ++_iter373) + { + xfer += oprot->writeString((*_iter373)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7013,8 +7291,20 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size374; + ::apache::thrift::protocol::TType _etype377; + iprot->readListBegin(_etype377, _size374); + this->success.resize(_size374); + uint32_t _i378; + for (_i378 = 0; _i378 < _size374; ++_i378) + { + xfer += iprot->readString(this->success[_i378]); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7040,15 +7330,23 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter379; + for (_iter379 = this->success.begin(); _iter379 != this->success.end(); ++_iter379) + { + xfer += oprot->writeString((*_iter379)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -7060,7 +7358,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7081,8 +7379,20 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size380; + ::apache::thrift::protocol::TType _etype383; + iprot->readListBegin(_etype383, _size380); + (*(this->success)).resize(_size380); + uint32_t _i384; + for (_i384 = 0; _i384 < _size380; ++_i384) + { + xfer += iprot->readString((*(this->success))[_i384]); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7108,7 +7418,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7130,8 +7440,32 @@ { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filter); + this->__isset.filter = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; } else { xfer += iprot->skip(ftype); } @@ -7148,29 +7482,47 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_args"); - xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->part_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->filter); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_pargs"); - xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->filter))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7194,14 +7546,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size269; - ::apache::thrift::protocol::TType _etype272; - iprot->readListBegin(_etype272, _size269); - this->success.resize(_size269); - uint32_t _i273; - for (_i273 = 0; _i273 < _size269; ++_i273) + uint32_t _size385; + ::apache::thrift::protocol::TType _etype388; + iprot->readListBegin(_etype388, _size385); + this->success.resize(_size385); + uint32_t _i389; + for (_i389 = 0; _i389 < _size385; ++_i389) { - xfer += iprot->readString(this->success[_i273]); + xfer += this->success[_i389].read(iprot); } iprot->readListEnd(); } @@ -7218,6 +7570,14 @@ xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -7230,20 +7590,20 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter274; - for (_iter274 = this->success.begin(); _iter274 != this->success.end(); ++_iter274) + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter390; + for (_iter390 = this->success.begin(); _iter390 != this->success.end(); ++_iter390) { - xfer += oprot->writeString((*_iter274)); + xfer += (*_iter390).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7252,13 +7612,17 @@ xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7282,14 +7646,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size275; - ::apache::thrift::protocol::TType _etype278; - iprot->readListBegin(_etype278, _size275); - (*(this->success)).resize(_size275); - uint32_t _i279; - for (_i279 = 0; _i279 < _size275; ++_i279) + uint32_t _size391; + ::apache::thrift::protocol::TType _etype394; + iprot->readListBegin(_etype394, _size391); + (*(this->success)).resize(_size391); + uint32_t _i395; + for (_i395 = 0; _i395 < _size391; ++_i395) { - xfer += iprot->readString((*(this->success))[_i279]); + xfer += (*(this->success))[_i395].read(iprot); } iprot->readListEnd(); } @@ -7306,6 +7670,14 @@ xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -7318,7 +7690,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7340,8 +7712,24 @@ { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; } else { xfer += iprot->skip(ftype); } @@ -7358,29 +7746,41 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_args"); - xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->part_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_pargs"); - xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7400,33 +7800,18 @@ } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->success.clear(); - uint32_t _size280; - ::apache::thrift::protocol::TType _ktype281; - ::apache::thrift::protocol::TType _vtype282; - iprot->readMapBegin(_ktype281, _vtype282, _size280); - uint32_t _i284; - for (_i284 = 0; _i284 < _size280; ++_i284) - { - std::string _key285; - xfer += iprot->readString(_key285); - std::string& _val286 = this->success[_key285]; - xfer += iprot->readString(_val286); - } - iprot->readMapEnd(); - } - this->__isset.success = true; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -7443,36 +7828,27 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_result"); - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); - { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->success.size()); - std::map ::const_iterator _iter287; - for (_iter287 = this->success.begin(); _iter287 != this->success.end(); ++_iter287) - { - xfer += oprot->writeString(_iter287->first); - xfer += oprot->writeString(_iter287->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { + if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7492,33 +7868,18 @@ } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - (*(this->success)).clear(); - uint32_t _size288; - ::apache::thrift::protocol::TType _ktype289; - ::apache::thrift::protocol::TType _vtype290; - iprot->readMapBegin(_ktype289, _vtype290, _size288); - uint32_t _i292; - for (_i292 = 0; _i292 < _size288; ++_i292) - { - std::string _key293; - xfer += iprot->readString(_key293); - std::string& _val294 = (*(this->success))[_key293]; - xfer += iprot->readString(_val294); - } - iprot->readMapEnd(); - } - this->__isset.success = true; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -7535,7 +7896,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_add_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7556,17 +7917,17 @@ switch (fid) { case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_index.read(iprot); - this->__isset.new_index = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->index_table.read(iprot); - this->__isset.index_table = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->defaultValue); + this->__isset.defaultValue = true; } else { xfer += iprot->skip(ftype); } @@ -7583,35 +7944,35 @@ return xfer; } -uint32_t ThriftHiveMetastore_add_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_args"); - xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->new_index.write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_args"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->index_table.write(oprot); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->defaultValue); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_add_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_pargs"); - xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->new_index)).write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_pargs"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += (*(this->index_table)).write(oprot); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->defaultValue))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_add_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7632,8 +7993,8 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7647,22 +8008,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -7675,35 +8020,27 @@ return xfer; } -uint32_t ThriftHiveMetastore_add_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); 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(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_add_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7724,8 +8061,8 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7739,22 +8076,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -7767,7 +8088,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7789,32 +8110,8 @@ { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->base_tbl_name); - this->__isset.base_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->idx_name); - this->__isset.idx_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->new_idx.read(iprot); - this->__isset.new_idx = true; + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; } else { xfer += iprot->skip(ftype); } @@ -7831,47 +8128,29 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_args"); - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbname); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_args"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->base_tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->idx_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->new_idx.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t ThriftHiveMetastore_alter_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_pargs"); - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->dbname))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->base_tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->idx_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += (*(this->new_idx)).write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_pargs"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_alter_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7891,18 +8170,30 @@ } switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size396; + ::apache::thrift::protocol::TType _etype399; + iprot->readListBegin(_etype399, _size396); + this->success.resize(_size396); + uint32_t _i400; + for (_i400 = 0; _i400 < _size396; ++_i400) + { + xfer += iprot->readString(this->success[_i400]); + } + iprot->readListEnd(); + } + this->__isset.success = true; } else { xfer += iprot->skip(ftype); } break; - case 2: + case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } @@ -7919,27 +8210,35 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_result"); - if (this->__isset.o1) { + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter401; + for (_iter401 = this->success.begin(); _iter401 != this->success.end(); ++_iter401) + { + xfer += oprot->writeString((*_iter401)); + } + xfer += oprot->writeListEnd(); + } + 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(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_alter_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7959,18 +8258,30 @@ } switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size402; + ::apache::thrift::protocol::TType _etype405; + iprot->readListBegin(_etype405, _size402); + (*(this->success)).resize(_size402); + uint32_t _i406; + for (_i406 = 0; _i406 < _size402; ++_i406) + { + xfer += iprot->readString((*(this->success))[_i406]); + } + iprot->readListEnd(); + } + this->__isset.success = true; } else { xfer += iprot->skip(ftype); } break; - case 2: + case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } @@ -7987,7 +8298,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8009,32 +8320,8 @@ { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->index_name); - this->__isset.index_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; } else { xfer += iprot->skip(ftype); } @@ -8051,47 +8338,29 @@ return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->index_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->deleteData); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_args"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->index_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool((*(this->deleteData))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_pargs"); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8112,8 +8381,23 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size407; + ::apache::thrift::protocol::TType _ktype408; + ::apache::thrift::protocol::TType _vtype409; + iprot->readMapBegin(_ktype408, _vtype409, _size407); + uint32_t _i411; + for (_i411 = 0; _i411 < _size407; ++_i411) + { + std::string _key412; + xfer += iprot->readString(_key412); + std::string& _val413 = this->success[_key412]; + xfer += iprot->readString(_val413); + } + iprot->readMapEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8127,14 +8411,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -8147,31 +8423,36 @@ return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->success.size()); + std::map ::const_iterator _iter414; + for (_iter414 = this->success.begin(); _iter414 != this->success.end(); ++_iter414) + { + xfer += oprot->writeString(_iter414->first); + xfer += oprot->writeString(_iter414->second); + } + xfer += oprot->writeMapEnd(); + } 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(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8192,8 +8473,23 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size415; + ::apache::thrift::protocol::TType _ktype416; + ::apache::thrift::protocol::TType _vtype417; + iprot->readMapBegin(_ktype416, _vtype417, _size415); + uint32_t _i419; + for (_i419 = 0; _i419 < _size415; ++_i419) + { + std::string _key420; + xfer += iprot->readString(_key420); + std::string& _val421 = (*(this->success))[_key420]; + xfer += iprot->readString(_val421); + } + iprot->readMapEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8207,14 +8503,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -8227,7 +8515,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8248,25 +8536,17 @@ switch (fid) { case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_index.read(iprot); + this->__isset.new_index = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->index_name); - this->__isset.index_name = true; + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->index_table.read(iprot); + this->__isset.index_table = true; } else { xfer += iprot->skip(ftype); } @@ -8283,41 +8563,35 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_args"); + xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->new_index.write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->index_name); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->index_table.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_pargs"); + xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->new_index)).write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->index_name))); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->index_table)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8361,6 +8635,14 @@ xfer += iprot->skip(ftype); } break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -8373,11 +8655,11 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); @@ -8391,13 +8673,17 @@ xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8441,6 +8727,14 @@ xfer += iprot->skip(ftype); } break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -8453,7 +8747,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8475,24 +8769,32 @@ { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; + xfer += iprot->readString(this->base_tbl_name); + this->__isset.base_tbl_name = true; } else { xfer += iprot->skip(ftype); } break; case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_indexes); - this->__isset.max_indexes = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->idx_name); + this->__isset.idx_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->new_idx.read(iprot); + this->__isset.new_idx = true; } else { xfer += iprot->skip(ftype); } @@ -8509,41 +8811,47 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_args"); - xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->db_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_args"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->base_tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_indexes); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->idx_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->new_idx.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_pargs"); - xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_pargs"); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldBegin("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->base_tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_indexes))); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->idx_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->new_idx)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8563,26 +8871,6 @@ } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size295; - ::apache::thrift::protocol::TType _etype298; - iprot->readListBegin(_etype298, _size295); - this->success.resize(_size295); - uint32_t _i299; - for (_i299 = 0; _i299 < _size295; ++_i299) - { - xfer += this->success[_i299].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -8611,25 +8899,13 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_result"); - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter300; - for (_iter300 = this->success.begin(); _iter300 != this->success.end(); ++_iter300) - { - xfer += (*_iter300).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { + if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); @@ -8643,7 +8919,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8663,26 +8939,6 @@ } switch (fid) { - case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size301; - ::apache::thrift::protocol::TType _etype304; - iprot->readListBegin(_etype304, _size301); - (*(this->success)).resize(_size301); - uint32_t _i305; - for (_i305 = 0; _i305 < _size301; ++_i305) - { - xfer += (*(this->success))[_i305].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -8711,7 +8967,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8748,9 +9004,17 @@ } break; case 3: - if (ftype == ::apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_indexes); - this->__isset.max_indexes = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->index_name); + this->__isset.index_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; } else { xfer += iprot->skip(ftype); } @@ -8767,41 +9031,47 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_args"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_indexes); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->index_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_pargs"); xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_indexes))); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->index_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8822,20 +9092,8 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size306; - ::apache::thrift::protocol::TType _etype309; - iprot->readListBegin(_etype309, _size306); - this->success.resize(_size306); - uint32_t _i310; - for (_i310 = 0; _i310 < _size306; ++_i310) - { - xfer += iprot->readString(this->success[_i310]); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8843,6 +9101,14 @@ 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8861,26 +9127,22 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter311; - for (_iter311 = this->success.begin(); _iter311 != this->success.end(); ++_iter311) - { - xfer += oprot->writeString((*_iter311)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + 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(); } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -8889,7 +9151,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8910,20 +9172,8 @@ switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size312; - ::apache::thrift::protocol::TType _etype315; - iprot->readListBegin(_etype315, _size312); - (*(this->success)).resize(_size312); - uint32_t _i316; - for (_i316 = 0; _i316 < _size312; ++_i316) - { - xfer += iprot->readString((*(this->success))[_i316]); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8931,6 +9181,14 @@ 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8949,16 +9207,5301 @@ return xfer; } -void ThriftHiveMetastoreClient::create_database(const Database& database) -{ - send_create_database(database); - recv_create_database(); -} +uint32_t ThriftHiveMetastore_get_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { -void ThriftHiveMetastoreClient::send_create_database(const Database& database) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->index_name); + this->__isset.index_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->index_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->index_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_by_name_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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_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(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_by_name_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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_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_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_indexes); + this->__isset.max_indexes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_indexes); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16((*(this->max_indexes))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_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_LIST) { + { + this->success.clear(); + uint32_t _size422; + ::apache::thrift::protocol::TType _etype425; + iprot->readListBegin(_etype425, _size422); + this->success.resize(_size422); + uint32_t _i426; + for (_i426 = 0; _i426 < _size422; ++_i426) + { + xfer += this->success[_i426].read(iprot); + } + iprot->readListEnd(); + } + 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter427; + for (_iter427 = this->success.begin(); _iter427 != this->success.end(); ++_iter427) + { + xfer += (*_iter427).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_indexes_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size428; + ::apache::thrift::protocol::TType _etype431; + iprot->readListBegin(_etype431, _size428); + (*(this->success)).resize(_size428); + uint32_t _i432; + for (_i432 = 0; _i432 < _size428; ++_i432) + { + xfer += (*(this->success))[_i432].read(iprot); + } + iprot->readListEnd(); + } + 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; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_names_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_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_indexes); + this->__isset.max_indexes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_indexes); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16((*(this->max_indexes))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_names_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_LIST) { + { + this->success.clear(); + uint32_t _size433; + ::apache::thrift::protocol::TType _etype436; + iprot->readListBegin(_etype436, _size433); + this->success.resize(_size433); + uint32_t _i437; + for (_i437 = 0; _i437 < _size433; ++_i437) + { + xfer += iprot->readString(this->success[_i437]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter438; + for (_iter438 = this->success.begin(); _iter438 != this->success.end(); ++_iter438) + { + xfer += oprot->writeString((*_iter438)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_index_names_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size439; + ::apache::thrift::protocol::TType _etype442; + iprot->readListBegin(_etype442, _size439); + (*(this->success)).resize(_size439); + uint32_t _i443; + for (_i443 = 0; _i443 < _size439; ++_i443) + { + xfer += iprot->readString((*(this->success))[_i443]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_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_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size444; + ::apache::thrift::protocol::TType _etype447; + iprot->readListBegin(_etype447, _size444); + this->group_names.resize(_size444); + uint32_t _i448; + for (_i448 = 0; _i448 < _size444; ++_i448) + { + xfer += iprot->readString(this->group_names[_i448]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_user_privilege_set_args"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter449; + for (_iter449 = this->group_names.begin(); _iter449 != this->group_names.end(); ++_iter449) + { + xfer += oprot->writeString((*_iter449)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_user_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter450; + for (_iter450 = (*(this->group_names)).begin(); _iter450 != (*(this->group_names)).end(); ++_iter450) + { + xfer += oprot->writeString((*_iter450)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_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_get_user_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_user_privilege_set_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_get_user_privilege_set_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_get_db_privilege_set_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_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size451; + ::apache::thrift::protocol::TType _etype454; + iprot->readListBegin(_etype454, _size451); + this->group_names.resize(_size451); + uint32_t _i455; + for (_i455 = 0; _i455 < _size451; ++_i455) + { + xfer += iprot->readString(this->group_names[_i455]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_db_privilege_set_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter456; + for (_iter456 = this->group_names.begin(); _iter456 != this->group_names.end(); ++_iter456) + { + xfer += oprot->writeString((*_iter456)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_db_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter457; + for (_iter457 = (*(this->group_names)).begin(); _iter457 != (*(this->group_names)).end(); ++_iter457) + { + xfer += oprot->writeString((*_iter457)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_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_get_db_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_db_privilege_set_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_get_db_privilege_set_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_get_table_privilege_set_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_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size458; + ::apache::thrift::protocol::TType _etype461; + iprot->readListBegin(_etype461, _size458); + this->group_names.resize(_size458); + uint32_t _i462; + for (_i462 = 0; _i462 < _size458; ++_i462) + { + xfer += iprot->readString(this->group_names[_i462]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_privilege_set_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter463; + for (_iter463 = this->group_names.begin(); _iter463 != this->group_names.end(); ++_iter463) + { + xfer += oprot->writeString((*_iter463)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter464; + for (_iter464 = (*(this->group_names)).begin(); _iter464 != (*(this->group_names)).end(); ++_iter464) + { + xfer += oprot->writeString((*_iter464)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_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_get_table_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_privilege_set_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_get_table_privilege_set_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_get_partition_privilege_set_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_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size465; + ::apache::thrift::protocol::TType _etype468; + iprot->readListBegin(_etype468, _size465); + this->group_names.resize(_size465); + uint32_t _i469; + for (_i469 = 0; _i469 < _size465; ++_i469) + { + xfer += iprot->readString(this->group_names[_i469]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_privilege_set_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter470; + for (_iter470 = this->group_names.begin(); _iter470 != this->group_names.end(); ++_iter470) + { + xfer += oprot->writeString((*_iter470)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter471; + for (_iter471 = (*(this->group_names)).begin(); _iter471 != (*(this->group_names)).end(); ++_iter471) + { + xfer += oprot->writeString((*_iter471)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_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_get_partition_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_privilege_set_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_get_partition_privilege_set_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_get_column_privilege_set_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_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column_name); + this->__isset.column_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size472; + ::apache::thrift::protocol::TType _etype475; + iprot->readListBegin(_etype475, _size472); + this->group_names.resize(_size472); + uint32_t _i476; + for (_i476 = 0; _i476 < _size472; ++_i476) + { + xfer += iprot->readString(this->group_names[_i476]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_column_privilege_set_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->column_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter477; + for (_iter477 = this->group_names.begin(); _iter477 != this->group_names.end(); ++_iter477) + { + xfer += oprot->writeString((*_iter477)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_column_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->column_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter478; + for (_iter478 = (*(this->group_names)).begin(); _iter478 != (*(this->group_names)).end(); ++_iter478) + { + xfer += oprot->writeString((*_iter478)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_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_get_column_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_column_privilege_set_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_get_column_privilege_set_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_create_role_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_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->owner_name); + this->__isset.owner_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("owner_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->owner_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("owner_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->owner_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_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_BOOL) { + xfer += iprot->readBool(this->success); + 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_create_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + 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_create_role_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_BOOL) { + xfer += iprot->readBool((*(this->success))); + 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_drop_role_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_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_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_BOOL) { + xfer += iprot->readBool(this->success); + 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_drop_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + 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_drop_role_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_BOOL) { + xfer += iprot->readBool((*(this->success))); + 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_add_role_member_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_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_role_member_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_role_member_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_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_BOOL) { + xfer += iprot->readBool(this->success); + 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_add_role_member_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_role_member_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + 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_add_role_member_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_BOOL) { + xfer += iprot->readBool((*(this->success))); + 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_remove_role_member_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_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_role_member_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_role_member_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_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_BOOL) { + xfer += iprot->readBool(this->success); + 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_remove_role_member_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_role_member_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + 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_remove_role_member_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_BOOL) { + xfer += iprot->readBool((*(this->success))); + 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_list_roles_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_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_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_LIST) { + { + this->success.clear(); + uint32_t _size479; + ::apache::thrift::protocol::TType _etype482; + iprot->readListBegin(_etype482, _size479); + this->success.resize(_size479); + uint32_t _i483; + for (_i483 = 0; _i483 < _size479; ++_i483) + { + xfer += this->success[_i483].read(iprot); + } + iprot->readListEnd(); + } + 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_list_roles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter484; + for (_iter484 = this->success.begin(); _iter484 != this->success.end(); ++_iter484) + { + xfer += (*_iter484).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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_list_roles_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size485; + ::apache::thrift::protocol::TType _etype488; + iprot->readListBegin(_etype488, _size485); + (*(this->success)).resize(_size485); + uint32_t _i489; + for (_i489 = 0; _i489 < _size485; ++_i489) + { + xfer += (*(this->success))[_i489].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_user_grant_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_STRING) { + xfer += iprot->readString(this->principla_name); + this->__isset.principla_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_user_grant_args"); + xfer += oprot->writeFieldBegin("principla_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principla_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_user_grant_pargs"); + xfer += oprot->writeFieldBegin("principla_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principla_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_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_LIST) { + { + this->success.clear(); + uint32_t _size490; + ::apache::thrift::protocol::TType _etype493; + iprot->readListBegin(_etype493, _size490); + this->success.resize(_size490); + uint32_t _i494; + for (_i494 = 0; _i494 < _size490; ++_i494) + { + xfer += this->success[_i494].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_user_grant_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_user_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter495; + for (_iter495 = this->success.begin(); _iter495 != this->success.end(); ++_iter495) + { + xfer += (*_iter495).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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_list_security_user_grant_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size496; + ::apache::thrift::protocol::TType _etype499; + iprot->readListBegin(_etype499, _size496); + (*(this->success)).resize(_size496); + uint32_t _i500; + for (_i500 = 0; _i500 < _size496; ++_i500) + { + xfer += (*(this->success))[_i500].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_db_grant_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_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_db_grant_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_db_grant_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_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_LIST) { + { + this->success.clear(); + uint32_t _size501; + ::apache::thrift::protocol::TType _etype504; + iprot->readListBegin(_etype504, _size501); + this->success.resize(_size501); + uint32_t _i505; + for (_i505 = 0; _i505 < _size501; ++_i505) + { + xfer += this->success[_i505].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_db_grant_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_db_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter506; + for (_iter506 = this->success.begin(); _iter506 != this->success.end(); ++_iter506) + { + xfer += (*_iter506).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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_list_security_db_grant_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size507; + ::apache::thrift::protocol::TType _etype510; + iprot->readListBegin(_etype510, _size507); + (*(this->success)).resize(_size507); + uint32_t _i511; + for (_i511 = 0; _i511 < _size507; ++_i511) + { + xfer += (*(this->success))[_i511].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_table_grant_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_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_table_grant_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_table_grant_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_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_LIST) { + { + this->success.clear(); + uint32_t _size512; + ::apache::thrift::protocol::TType _etype515; + iprot->readListBegin(_etype515, _size512); + this->success.resize(_size512); + uint32_t _i516; + for (_i516 = 0; _i516 < _size512; ++_i516) + { + xfer += this->success[_i516].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_table_grant_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_table_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter517; + for (_iter517 = this->success.begin(); _iter517 != this->success.end(); ++_iter517) + { + xfer += (*_iter517).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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_list_security_table_grant_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size518; + ::apache::thrift::protocol::TType _etype521; + iprot->readListBegin(_etype521, _size518); + (*(this->success)).resize(_size518); + uint32_t _i522; + for (_i522 = 0; _i522 < _size518; ++_i522) + { + xfer += (*(this->success))[_i522].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_partition_grant_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_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_partition_grant_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_partition_grant_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_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_LIST) { + { + this->success.clear(); + uint32_t _size523; + ::apache::thrift::protocol::TType _etype526; + iprot->readListBegin(_etype526, _size523); + this->success.resize(_size523); + uint32_t _i527; + for (_i527 = 0; _i527 < _size523; ++_i527) + { + xfer += this->success[_i527].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_partition_grant_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_partition_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter528; + for (_iter528 = this->success.begin(); _iter528 != this->success.end(); ++_iter528) + { + xfer += (*_iter528).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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_list_security_partition_grant_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size529; + ::apache::thrift::protocol::TType _etype532; + iprot->readListBegin(_etype532, _size529); + (*(this->success)).resize(_size529); + uint32_t _i533; + for (_i533 = 0; _i533 < _size529; ++_i533) + { + xfer += (*(this->success))[_i533].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_column_grant_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_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column_name); + this->__isset.column_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_column_grant_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->column_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_column_grant_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString((*(this->column_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_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_LIST) { + { + this->success.clear(); + uint32_t _size534; + ::apache::thrift::protocol::TType _etype537; + iprot->readListBegin(_etype537, _size534); + this->success.resize(_size534); + uint32_t _i538; + for (_i538 = 0; _i538 < _size534; ++_i538) + { + xfer += this->success[_i538].read(iprot); + } + iprot->readListEnd(); + } + 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_list_security_column_grant_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_column_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter539; + for (_iter539 = this->success.begin(); _iter539 != this->success.end(); ++_iter539) + { + xfer += (*_iter539).write(oprot); + } + xfer += oprot->writeListEnd(); + } + 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_list_security_column_grant_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size540; + ::apache::thrift::protocol::TType _etype543; + iprot->readListBegin(_etype543, _size540); + (*(this->success)).resize(_size540); + uint32_t _i544; + for (_i544 = 0; _i544 < _size540; ++_i544) + { + xfer += (*(this->success))[_i544].read(iprot); + } + iprot->readListEnd(); + } + 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_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_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = 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_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_args"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_pargs"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->privileges)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->grantor))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_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_BOOL) { + xfer += iprot->readBool(this->success); + 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_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + 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_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_BOOL) { + xfer += iprot->readBool((*(this->success))); + 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_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_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_args"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_pargs"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->privileges)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_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_BOOL) { + xfer += iprot->readBool(this->success); + 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_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + 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_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_BOOL) { + xfer += iprot->readBool((*(this->success))); + 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_revoke_all_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_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->remove_user_priv); + this->__isset.remove_user_priv = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->dbs.clear(); + uint32_t _size545; + ::apache::thrift::protocol::TType _etype548; + iprot->readListBegin(_etype548, _size545); + this->dbs.resize(_size545); + uint32_t _i549; + for (_i549 = 0; _i549 < _size545; ++_i549) + { + xfer += this->dbs[_i549].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.dbs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->tables.clear(); + uint32_t _size550; + ::apache::thrift::protocol::TType _etype553; + iprot->readListBegin(_etype553, _size550); + this->tables.resize(_size550); + uint32_t _i554; + for (_i554 = 0; _i554 < _size550; ++_i554) + { + xfer += this->tables[_i554].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.tables = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->parts.clear(); + uint32_t _size555; + ::apache::thrift::protocol::TType _etype558; + iprot->readListBegin(_etype558, _size555); + this->parts.resize(_size555); + uint32_t _i559; + for (_i559 = 0; _i559 < _size555; ++_i559) + { + xfer += this->parts[_i559].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->columns.clear(); + uint32_t _size560; + ::apache::thrift::protocol::TType _ktype561; + ::apache::thrift::protocol::TType _vtype562; + iprot->readMapBegin(_ktype561, _vtype562, _size560); + uint32_t _i564; + for (_i564 = 0; _i564 < _size560; ++_i564) + { + Table _key565; + xfer += _key565.read(iprot); + std::vector & _val566 = this->columns[_key565]; + { + _val566.clear(); + uint32_t _size567; + ::apache::thrift::protocol::TType _etype570; + iprot->readListBegin(_etype570, _size567); + _val566.resize(_size567); + uint32_t _i571; + for (_i571 = 0; _i571 < _size567; ++_i571) + { + xfer += iprot->readString(_val566[_i571]); + } + iprot->readListEnd(); + } + } + iprot->readMapEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_all_privileges_args"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("remove_user_priv", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->remove_user_priv); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbs", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->dbs.size()); + std::vector ::const_iterator _iter572; + for (_iter572 = this->dbs.begin(); _iter572 != this->dbs.end(); ++_iter572) + { + xfer += (*_iter572).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tables", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->tables.size()); + std::vector
::const_iterator _iter573; + for (_iter573 = this->tables.begin(); _iter573 != this->tables.end(); ++_iter573) + { + xfer += (*_iter573).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_LIST, 7); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->parts.size()); + std::vector ::const_iterator _iter574; + for (_iter574 = this->parts.begin(); _iter574 != this->parts.end(); ++_iter574) + { + xfer += (*_iter574).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_MAP, 8); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, this->columns.size()); + std::map > ::const_iterator _iter575; + for (_iter575 = this->columns.begin(); _iter575 != this->columns.end(); ++_iter575) + { + xfer += _iter575->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, _iter575->second.size()); + std::vector ::const_iterator _iter576; + for (_iter576 = _iter575->second.begin(); _iter576 != _iter575->second.end(); ++_iter576) + { + xfer += oprot->writeString((*_iter576)); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_all_privileges_pargs"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("remove_user_priv", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->remove_user_priv))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbs", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, (*(this->dbs)).size()); + std::vector ::const_iterator _iter577; + for (_iter577 = (*(this->dbs)).begin(); _iter577 != (*(this->dbs)).end(); ++_iter577) + { + xfer += (*_iter577).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tables", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, (*(this->tables)).size()); + std::vector
::const_iterator _iter578; + for (_iter578 = (*(this->tables)).begin(); _iter578 != (*(this->tables)).end(); ++_iter578) + { + xfer += (*_iter578).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parts", ::apache::thrift::protocol::T_LIST, 7); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, (*(this->parts)).size()); + std::vector ::const_iterator _iter579; + for (_iter579 = (*(this->parts)).begin(); _iter579 != (*(this->parts)).end(); ++_iter579) + { + xfer += (*_iter579).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_MAP, 8); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_LIST, (*(this->columns)).size()); + std::map > ::const_iterator _iter580; + for (_iter580 = (*(this->columns)).begin(); _iter580 != (*(this->columns)).end(); ++_iter580) + { + xfer += _iter580->first.write(oprot); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, _iter580->second.size()); + std::vector ::const_iterator _iter581; + for (_iter581 = _iter580->second.begin(); _iter581 != _iter580->second.end(); ++_iter581) + { + xfer += oprot->writeString((*_iter581)); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_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_BOOL) { + xfer += iprot->readBool(this->success); + 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_revoke_all_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_all_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + 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_revoke_all_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_BOOL) { + xfer += iprot->readBool((*(this->success))); + 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; +} + +void ThriftHiveMetastoreClient::create_database(const Database& database) +{ + send_create_database(database); + recv_create_database(); +} + +void ThriftHiveMetastoreClient::send_create_database(const Database& database) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_create_database_pargs args; args.database = &database; @@ -8969,7 +14512,1675 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_create_database() +void ThriftHiveMetastoreClient::recv_create_database() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("create_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_create_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) +{ + send_get_database(name); + recv_get_database(_return); +} + +void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_database_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_database(Database& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_database_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; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); +} + +void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData) +{ + send_drop_database(name, deleteData); + recv_drop_database(); +} + +void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_database_pargs args; + args.name = &name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_drop_database() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_drop_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +{ + send_get_databases(pattern); + recv_get_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_databases_pargs args; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_databases_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, "get_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +{ + send_get_all_databases(); + recv_get_all_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_databases() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_databases_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_all_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_all_databases_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, "get_all_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +{ + send_get_type(name); + recv_get_type(_return); +} + +void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_type(Type& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_type_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; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::create_type(const Type& type) +{ + send_create_type(type); + return recv_create_type(); +} + +void ThriftHiveMetastoreClient::send_create_type(const Type& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_create_type() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("create_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_create_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +{ + send_drop_type(type); + return recv_drop_type(); +} + +void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_type() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +{ + send_get_type_all(name); + recv_get_type_all(_return); +} + +void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_all_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_type_all") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_type_all_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.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +{ + send_get_fields(db_name, table_name); + recv_get_fields(_return); +} + +void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_fields_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_fields") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_fields_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; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +{ + send_get_schema(db_name, table_name); + recv_get_schema(_return); +} + +void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_schema_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_schema") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_schema_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; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); +} + +void ThriftHiveMetastoreClient::create_table(const Table& tbl) +{ + send_create_table(tbl); + recv_create_table(); +} + +void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_pargs args; + args.tbl = &tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_create_table() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("create_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_create_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; +} + +void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + send_drop_table(dbname, name, deleteData); + recv_drop_table(); +} + +void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_drop_table() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_drop_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +{ + send_get_tables(db_name, pattern); + recv_get_tables(_return); +} + +void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_tables_pargs args; + args.db_name = &db_name; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_tables") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_tables_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, "get_tables failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +{ + send_get_all_tables(db_name); + recv_get_all_tables(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_tables_pargs args; + args.db_name = &db_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_all_tables") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_all_tables_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, "get_all_tables failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +{ + send_get_table(dbname, tbl_name); + recv_get_table(_return); +} + +void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_table(Table& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_table_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; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +{ + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); +} + +void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_alter_table() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("alter_table") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_alter_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +{ + send_add_partition(new_part); + recv_add_partition(_return); +} + +void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_add_partition(Partition& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("add_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_add_partition_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; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_append_partition(Partition& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("append_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_append_partition_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; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + send_append_partition_by_name(db_name, tbl_name, part_name); + recv_append_partition_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("append_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_append_partition_by_name_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; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +{ + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); +} + +void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +{ + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); +} + +void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition(Partition& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_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; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) +{ + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + recv_get_partition_with_auth(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_with_auth_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.user_name = &user_name; + args.group_names = &group_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_partition_with_auth") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_with_auth_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; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_partition_by_name") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_by_name_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; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) { int32_t rseqid = 0; @@ -8990,42 +16201,48 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_database") != 0) { + if (fname.compare("get_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_create_database_presult result; + ThriftHiveMetastore_get_partitions_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; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); } -void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) +void ThriftHiveMetastoreClient::get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { - send_get_database(name); - recv_get_database(_return); + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + recv_get_partitions_with_auth(_return); } -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_database_pargs args; - args.name = &name; + ThriftHiveMetastore_get_partitions_with_auth_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9033,7 +16250,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -9054,13 +16271,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_database") != 0) { + if (fname.compare("get_partitions_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_database_presult result; + ThriftHiveMetastore_get_partitions_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9076,23 +16293,24 @@ if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_drop_database(name, deleteData); - recv_drop_database(); + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return); } -void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; + ThriftHiveMetastore_get_partition_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9100,7 +16318,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_drop_database() +void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) { int32_t rseqid = 0; @@ -9121,42 +16339,44 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_database") != 0) { + if (fname.compare("get_partition_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_drop_database_presult result; + ThriftHiveMetastore_get_partition_names_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.o1) { - throw result.o1; + if (result.__isset.success) { + // _return pointer has now been filled + return; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); } -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - send_get_databases(pattern); - recv_get_databases(_return); + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return); } -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; + ThriftHiveMetastore_get_partitions_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9164,7 +16384,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) { int32_t rseqid = 0; @@ -9185,13 +16405,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_databases") != 0) { + if (fname.compare("get_partitions_ps") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_databases_presult result; + ThriftHiveMetastore_get_partitions_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9204,21 +16424,27 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { - send_get_all_databases(); - recv_get_all_databases(_return); + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); + recv_get_partitions_ps_with_auth(_return); } -void ThriftHiveMetastoreClient::send_get_all_databases() +void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_databases_pargs args; + ThriftHiveMetastore_get_partitions_ps_with_auth_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9226,7 +16452,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -9247,13 +16473,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_all_databases") != 0) { + if (fname.compare("get_partitions_ps_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_all_databases_presult result; + ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9266,22 +16492,28 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +void ThriftHiveMetastoreClient::get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - send_get_type(name); - recv_get_type(_return); + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_return); } -void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; + ThriftHiveMetastore_get_partition_names_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9289,7 +16521,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) { int32_t rseqid = 0; @@ -9310,13 +16542,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_type") != 0) { + if (fname.compare("get_partition_names_ps") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_type_presult result; + ThriftHiveMetastore_get_partition_names_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9329,25 +16561,25 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); } -bool ThriftHiveMetastoreClient::create_type(const Type& type) +void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { - send_create_type(type); - return recv_create_type(); + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_return); } -void ThriftHiveMetastoreClient::send_create_type(const Type& type) +void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; + ThriftHiveMetastore_get_partitions_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9355,7 +16587,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_create_type() +void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -9376,21 +16608,21 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_type") != 0) { + if (fname.compare("get_partitions_by_filter") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - bool _return; - ThriftHiveMetastore_create_type_presult result; + ThriftHiveMetastore_get_partitions_by_filter_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -9398,25 +16630,86 @@ if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); +} + +void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_alter_partition() +{ + + 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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("alter_partition") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_alter_partition_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); + return; } -bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - send_drop_type(type); - return recv_drop_type(); + send_get_config_value(name, defaultValue); + recv_get_config_value(_return); } -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; + ThriftHiveMetastore_get_config_value_pargs args; + args.name = &name; + args.defaultValue = &defaultValue; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9424,7 +16717,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_type() +void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) { int32_t rseqid = 0; @@ -9445,44 +16738,41 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_type") != 0) { + if (fname.compare("get_config_value") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - bool _return; - ThriftHiveMetastore_drop_type_presult result; + ThriftHiveMetastore_get_config_value_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) { - send_get_type_all(name); - recv_get_type_all(_return); + send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_return); } -void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_all_pargs args; - args.name = &name; + ThriftHiveMetastore_partition_name_to_vals_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9490,7 +16780,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) { int32_t rseqid = 0; @@ -9511,13 +16801,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_type_all") != 0) { + if (fname.compare("partition_name_to_vals") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_type_all_presult result; + ThriftHiveMetastore_partition_name_to_vals_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9527,26 +16817,25 @@ // _return pointer has now been filled return; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o1) { + throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); } -void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) { - send_get_fields(db_name, table_name); - recv_get_fields(_return); + send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return); } -void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_fields_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; + ThriftHiveMetastore_partition_name_to_spec_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9554,7 +16843,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) +void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) { int32_t rseqid = 0; @@ -9575,13 +16864,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_fields") != 0) { + if (fname.compare("partition_name_to_spec") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_fields_presult result; + ThriftHiveMetastore_partition_name_to_spec_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9594,29 +16883,23 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); } -void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) { - send_get_schema(db_name, table_name); - recv_get_schema(_return); + send_add_index(new_index, index_table); + recv_add_index(_return); } -void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_schema_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9624,7 +16907,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) +void ThriftHiveMetastoreClient::recv_add_index(Index& _return) { int32_t rseqid = 0; @@ -9645,13 +16928,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_schema") != 0) { + if (fname.compare("add_index") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_schema_presult result; + ThriftHiveMetastore_add_index_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9670,22 +16953,25 @@ if (result.__isset.o3) { throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table(const Table& tbl) +void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - send_create_table(tbl); - recv_create_table(); + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); } -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; + ThriftHiveMetastore_alter_index_pargs args; + args.dbname = &dbname; + args.base_tbl_name = &base_tbl_name; + args.idx_name = &idx_name; + args.new_idx = &new_idx; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9693,7 +16979,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_create_table() +void ThriftHiveMetastoreClient::recv_alter_index() { int32_t rseqid = 0; @@ -9714,13 +17000,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_table") != 0) { + if (fname.compare("alter_index") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_create_table_presult result; + ThriftHiveMetastore_alter_index_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -9731,29 +17017,24 @@ if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } return; } -void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { - send_drop_table(dbname, name, deleteData); - recv_drop_table(); + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); } -void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_table_pargs args; - args.dbname = &dbname; - args.name = &name; + ThriftHiveMetastore_drop_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; args.deleteData = &deleteData; args.write(oprot_); @@ -9762,7 +17043,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_drop_table() +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() { int32_t rseqid = 0; @@ -9783,40 +17064,46 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_table") != 0) { + if (fname.compare("drop_index_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_drop_table_presult result; + bool _return; + ThriftHiveMetastore_drop_index_by_name_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o3) { - throw result.o3; + if (result.__isset.o2) { + throw result.o2; } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - send_get_tables(db_name, pattern); - recv_get_tables(_return); + send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_return); } -void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_tables_pargs args; + ThriftHiveMetastore_get_index_by_name_pargs args; args.db_name = &db_name; - args.pattern = &pattern; + args.tbl_name = &tbl_name; + args.index_name = &index_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9824,7 +17111,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) { int32_t rseqid = 0; @@ -9845,13 +17132,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_tables") != 0) { + if (fname.compare("get_index_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_tables_presult result; + ThriftHiveMetastore_get_index_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9864,22 +17151,27 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_get_all_tables(db_name); - recv_get_all_tables(_return); + send_get_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_return); } -void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) +void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_tables_pargs args; + ThriftHiveMetastore_get_indexes_pargs args; args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9887,7 +17179,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) { int32_t rseqid = 0; @@ -9908,13 +17200,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_all_tables") != 0) { + if (fname.compare("get_indexes") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_all_tables_presult result; + ThriftHiveMetastore_get_indexes_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9927,23 +17219,27 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); } -void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_get_table(dbname, tbl_name); - recv_get_table(_return); + send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_return); } -void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; + ThriftHiveMetastore_get_index_names_pargs args; + args.db_name = &db_name; args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9951,7 +17247,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_table(Table& _return) +void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) { int32_t rseqid = 0; @@ -9972,13 +17268,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_table") != 0) { + if (fname.compare("get_index_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_table_presult result; + ThriftHiveMetastore_get_index_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9988,30 +17284,26 @@ // _return pointer has now been filled return; } - if (result.__isset.o1) { - throw result.o1; - } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) -{ - send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); +void ThriftHiveMetastoreClient::get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) +{ + send_get_user_privilege_set(user_name, group_names); + recv_get_user_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +void ThriftHiveMetastoreClient::send_get_user_privilege_set(const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_user_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; + ThriftHiveMetastore_get_user_privilege_set_pargs args; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10019,7 +17311,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_table() +void ThriftHiveMetastoreClient::recv_get_user_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10040,39 +17332,43 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_table") != 0) { + if (fname.compare("get_user_privilege_set") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_alter_table_presult result; + ThriftHiveMetastore_get_user_privilege_set_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; } - if (result.__isset.o2) { - throw result.o2; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_user_privilege_set failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +void ThriftHiveMetastoreClient::get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names) { - send_add_partition(new_part); - recv_add_partition(_return); + send_get_db_privilege_set(db_name, user_name, group_names); + recv_get_db_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +void ThriftHiveMetastoreClient::send_get_db_privilege_set(const std::string& db_name, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_db_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; + ThriftHiveMetastore_get_db_privilege_set_pargs args; + args.db_name = &db_name; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10080,7 +17376,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_db_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10101,13 +17397,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("add_partition") != 0) { + if (fname.compare("get_db_privilege_set") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_add_partition_presult result; + ThriftHiveMetastore_get_db_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10120,30 +17416,25 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_db_privilege_set failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) { - send_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return); + send_get_table_privilege_set(db_name, table_name, user_name, group_names); + recv_get_table_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_get_table_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_pargs args; + ThriftHiveMetastore_get_table_privilege_set_pargs args; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; + args.table_name = &table_name; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10151,7 +17442,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_table_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10172,13 +17463,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("append_partition") != 0) { + if (fname.compare("get_table_privilege_set") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_append_partition_presult result; + ThriftHiveMetastore_get_table_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10191,30 +17482,26 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_privilege_set failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) { - send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return); + send_get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names); + recv_get_partition_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::send_get_partition_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_by_name_pargs args; + ThriftHiveMetastore_get_partition_privilege_set_pargs args; args.db_name = &db_name; - args.tbl_name = &tbl_name; + args.table_name = &table_name; args.part_name = &part_name; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10222,7 +17509,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partition_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10243,13 +17530,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("append_partition_by_name") != 0) { + if (fname.compare("get_partition_privilege_set") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_append_partition_by_name_presult result; + ThriftHiveMetastore_get_partition_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10262,31 +17549,27 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_privilege_set failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +void ThriftHiveMetastoreClient::get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) { - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); + send_get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names); + recv_get_column_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_column_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_column_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_pargs args; + ThriftHiveMetastore_get_column_privilege_set_pargs args; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; + args.table_name = &table_name; + args.part_name = &part_name; + args.column_name = &column_name; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10294,7 +17577,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_partition() +void ThriftHiveMetastoreClient::recv_get_column_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10315,47 +17598,43 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_partition") != 0) { + if (fname.compare("get_column_privilege_set") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; + ThriftHiveMetastore_get_column_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_column_privilege_set failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +bool ThriftHiveMetastoreClient::create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) { - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); + send_create_role(role_name, owner_name, db_name); + return recv_create_role(); } -void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +void ThriftHiveMetastoreClient::send_create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_role", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_by_name_pargs args; + ThriftHiveMetastore_create_role_pargs args; + args.role_name = &role_name; + args.owner_name = &owner_name; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10363,7 +17642,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +bool ThriftHiveMetastoreClient::recv_create_role() { int32_t rseqid = 0; @@ -10384,14 +17663,14 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_partition_by_name") != 0) { + if (fname.compare("create_role") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } bool _return; - ThriftHiveMetastore_drop_partition_by_name_presult result; + ThriftHiveMetastore_create_role_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10403,27 +17682,23 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_role failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +bool ThriftHiveMetastoreClient::drop_role(const std::string& role_name, const std::string& db_name) { - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); + send_drop_role(role_name, db_name); + return recv_drop_role(); } -void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_drop_role(const std::string& role_name, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_pargs args; + ThriftHiveMetastore_drop_role_pargs args; + args.role_name = &role_name; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10431,7 +17706,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) +bool ThriftHiveMetastoreClient::recv_drop_role() { int32_t rseqid = 0; @@ -10452,46 +17727,45 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition") != 0) { + if (fname.compare("drop_role") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partition_presult result; + bool _return; + ThriftHiveMetastore_drop_role_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_role failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +bool ThriftHiveMetastoreClient::add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { - send_get_partition_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_return); + send_add_role_member(role_name, user_name, is_role, is_group, db_name); + return recv_add_role_member(); } -void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::send_add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_role_member", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_by_name_pargs args; + ThriftHiveMetastore_add_role_member_pargs args; + args.role_name = &role_name; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10499,7 +17773,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) +bool ThriftHiveMetastoreClient::recv_add_role_member() { int32_t rseqid = 0; @@ -10520,46 +17794,45 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition_by_name") != 0) { + if (fname.compare("add_role_member") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partition_by_name_presult result; + bool _return; + ThriftHiveMetastore_add_role_member_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_role_member failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +bool ThriftHiveMetastoreClient::remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { - send_get_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_return); + send_remove_role_member(role_name, user_name, is_role, is_group, db_name); + return recv_remove_role_member(); } -void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("remove_role_member", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_pargs args; + ThriftHiveMetastore_remove_role_member_pargs args; + args.role_name = &role_name; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10567,7 +17840,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_remove_role_member() { int32_t rseqid = 0; @@ -10588,46 +17861,44 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions") != 0) { + if (fname.compare("remove_role_member") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partitions_presult result; + bool _return; + ThriftHiveMetastore_remove_role_member_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "remove_role_member failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) { - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); + send_list_roles(principal_name, is_role, is_group, db_name); + recv_list_roles(_return); } -void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_list_roles(const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_pargs args; + ThriftHiveMetastore_list_roles_pargs args; + args.principal_name = &principal_name; + args.is_role = &is_role; + args.is_group = &is_group; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10635,7 +17906,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return) { int32_t rseqid = 0; @@ -10656,13 +17927,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition_names") != 0) { + if (fname.compare("list_roles") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partition_names_presult result; + ThriftHiveMetastore_list_roles_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10672,28 +17943,27 @@ // _return pointer has now been filled return; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o1) { + throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) { - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return); + send_list_security_user_grant(principla_name, is_role, is_group); + recv_list_security_user_grant(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_list_security_user_grant(const std::string& principla_name, const bool is_role, const bool is_group) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_user_grant", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_ps_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; + ThriftHiveMetastore_list_security_user_grant_pargs args; + args.principla_name = &principla_name; + args.is_role = &is_role; + args.is_group = &is_group; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10701,7 +17971,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_user_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10722,13 +17992,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions_ps") != 0) { + if (fname.compare("list_security_user_grant") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partitions_ps_presult result; + ThriftHiveMetastore_list_security_user_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10741,25 +18011,25 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_security_user_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) { - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_return); + send_list_security_db_grant(principal_name, is_group, is_role, db_name); + recv_list_security_db_grant(_return); } -void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_list_security_db_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_db_grant", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_ps_pargs args; + ThriftHiveMetastore_list_security_db_grant_pargs args; + args.principal_name = &principal_name; + args.is_group = &is_group; + args.is_role = &is_role; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10767,7 +18037,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_db_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10788,13 +18058,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition_names_ps") != 0) { + if (fname.compare("list_security_db_grant") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partition_names_ps_presult result; + ThriftHiveMetastore_list_security_db_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10807,25 +18077,26 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_security_db_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +void ThriftHiveMetastoreClient::list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) { - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return); + send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name); + recv_list_security_table_grant(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_list_security_table_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_table_grant", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_by_filter_pargs args; + ThriftHiveMetastore_list_security_table_grant_pargs args; + args.principal_name = &principal_name; + args.is_group = &is_group; + args.is_role = &is_role; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10833,7 +18104,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_table_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10854,13 +18125,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions_by_filter") != 0) { + if (fname.compare("list_security_table_grant") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partitions_by_filter_presult result; + ThriftHiveMetastore_list_security_table_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10873,27 +18144,27 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_security_table_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +void ThriftHiveMetastoreClient::list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) { - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); + send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name); + recv_list_security_partition_grant(_return); } -void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +void ThriftHiveMetastoreClient::send_list_security_partition_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_partition_grant", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partition_pargs args; + ThriftHiveMetastore_list_security_partition_grant_pargs args; + args.principal_name = &principal_name; + args.is_group = &is_group; + args.is_role = &is_role; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; + args.table_name = &table_name; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10901,7 +18172,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_partition() +void ThriftHiveMetastoreClient::recv_list_security_partition_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10922,40 +18193,47 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_partition") != 0) { + if (fname.compare("list_security_partition_grant") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_alter_partition_presult result; + ThriftHiveMetastore_list_security_partition_grant_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; } - if (result.__isset.o2) { - throw result.o2; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_security_partition_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) { - send_get_config_value(name, defaultValue); - recv_get_config_value(_return); + send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name); + recv_list_security_column_grant(_return); } -void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::send_list_security_column_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_column_grant", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; + ThriftHiveMetastore_list_security_column_grant_pargs args; + args.principal_name = &principal_name; + args.is_group = &is_group; + args.is_role = &is_role; + args.db_name = &db_name; + args.table_name = &table_name; + args.part_name = &part_name; + args.column_name = &column_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10963,7 +18241,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) +void ThriftHiveMetastoreClient::recv_list_security_column_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10984,13 +18262,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_config_value") != 0) { + if (fname.compare("list_security_column_grant") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_config_value_presult result; + ThriftHiveMetastore_list_security_column_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -11003,22 +18281,26 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_security_column_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +bool ThriftHiveMetastoreClient::grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) { - send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return); + send_grant_privileges(user_name, is_role, is_group, privileges, grantor); + return recv_grant_privileges(); } -void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) +void ThriftHiveMetastoreClient::send_grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_grant_privileges_pargs args; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; + args.privileges = &privileges; + args.grantor = &grantor; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11026,7 +18308,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_grant_privileges() { int32_t rseqid = 0; @@ -11047,41 +18329,44 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("partition_name_to_vals") != 0) { + if (fname.compare("grant_privileges") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_partition_name_to_vals_presult result; + bool _return; + ThriftHiveMetastore_grant_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; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +bool ThriftHiveMetastoreClient::revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) { - send_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_return); + send_revoke_privileges(user_name, is_role, is_group, privileges); + return recv_revoke_privileges(); } -void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) +void ThriftHiveMetastoreClient::send_revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_revoke_privileges_pargs args; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; + args.privileges = &privileges; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11089,7 +18374,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) +bool ThriftHiveMetastoreClient::recv_revoke_privileges() { int32_t rseqid = 0; @@ -11110,42 +18395,48 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("partition_name_to_spec") != 0) { + if (fname.compare("revoke_privileges") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_partition_name_to_spec_presult result; + bool _return; + ThriftHiveMetastore_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; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +bool ThriftHiveMetastoreClient::revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) { - send_add_index(new_index, index_table); - recv_add_index(_return); + send_revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns); + return recv_revoke_all_privileges(); } -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +void ThriftHiveMetastoreClient::send_revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_all_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; + ThriftHiveMetastore_revoke_all_privileges_pargs args; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; + args.remove_user_priv = &remove_user_priv; + args.dbs = &dbs; + args.tables = &tables; + args.parts = &parts; + args.columns = &columns; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11153,7 +18444,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_add_index(Index& _return) +bool ThriftHiveMetastoreClient::recv_revoke_all_privileges() { int32_t rseqid = 0; @@ -11174,426 +18465,808 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("add_index") != 0) { + if (fname.compare("revoke_all_privileges") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_add_index_presult result; + bool _return; + ThriftHiveMetastore_revoke_all_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; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_all_privileges failed: unknown result"); +} + +bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot) { + + ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); + ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + int32_t seqid; + + iprot->readMessageBegin(fname, mtype, seqid); + + if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return true; } - if (result.__isset.o3) { - throw result.o3; + + return process_fn(iprot, oprot, fname, seqid); +} + +bool ThriftHiveMetastoreProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { + std::map::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid); } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); + (this->*(pfn->second))(seqid, iprot, oprot); + return true; } -void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); + ThriftHiveMetastore_create_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_create_database_result result; + try { + iface_->create_database(args.database); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_database_result result; + try { + iface_->get_database(result.success, args.name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_drop_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_database_result result; + try { + iface_->drop_database(args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_databases_result result; + try { + iface_->get_databases(result.success, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_all_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_all_databases_result result; + try { + iface_->get_all_databases(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_get_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_index_pargs args; - args.dbname = &dbname; - args.base_tbl_name = &base_tbl_name; - args.idx_name = &idx_name; - args.new_idx = &new_idx; - args.write(oprot_); + ThriftHiveMetastore_get_type_result result; + try { + iface_->get_type(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_index() +void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_create_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - 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(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("alter_index") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + ThriftHiveMetastore_create_type_result result; + try { + result.success = iface_->create_type(args.type); + result.__isset.success = true; + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - ThriftHiveMetastore_alter_index_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); + ThriftHiveMetastore_drop_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_type_result result; + try { + result.success = iface_->drop_type(args.type); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_get_type_all_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.deleteData = &deleteData; - args.write(oprot_); + ThriftHiveMetastore_get_type_all_result result; + try { + iface_->get_type_all(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_index_by_name() +void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_get_fields_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - 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(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("drop_index_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + ThriftHiveMetastore_get_fields_result result; + try { + iface_->get_fields(result.success, args.db_name, args.table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - send_get_index_by_name(db_name, tbl_name, index_name); - recv_get_index_by_name(_return); + ThriftHiveMetastore_get_schema_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_schema_result result; + try { + iface_->get_schema(result.success, args.db_name, args.table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_create_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.write(oprot_); + ThriftHiveMetastore_create_table_result result; + try { + iface_->create_table(args.tbl); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) +void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - - 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(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_index_by_name") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ThriftHiveMetastore_drop_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + ThriftHiveMetastore_drop_table_result result; + try { + iface_->drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); return; } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); -} -void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - send_get_indexes(db_name, tbl_name, max_indexes); - recv_get_indexes(_return); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_get_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_indexes_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); + ThriftHiveMetastore_get_tables_result result; + try { + iface_->get_tables(result.success, args.db_name, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) +void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_get_all_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - 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(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_indexes") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + ThriftHiveMetastore_get_all_tables_result result; + try { + iface_->get_all_tables(result.success, args.db_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - ThriftHiveMetastore_get_indexes_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_table_result result; + try { + iface_->get_table(result.success, args.dbname, args.tbl_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); return; } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); -} -void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - send_get_index_names(db_name, tbl_name, max_indexes); - recv_get_index_names(_return); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_alter_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); + ThriftHiveMetastore_alter_table_result result; + try { + iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) +void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - - 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(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_index_names") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_index_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ThriftHiveMetastore_add_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + ThriftHiveMetastore_add_partition_result result; + try { + iface_->add_partition(result.success, args.new_part); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); return; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); + + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot) { +void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_append_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); - ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - int32_t seqid; + ThriftHiveMetastore_append_partition_result result; + try { + iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - iprot->readMessageBegin(fname, mtype, seqid); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} - if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { - iprot->skip(::apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); +void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_append_partition_by_name_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_append_partition_by_name_result result; + try { + iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); - return true; + return; } - return process_fn(iprot, oprot, fname, seqid); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { - std::map::iterator pfn; - pfn = processMap_.find(fname); - if (pfn == processMap_.end()) { - return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid); +void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_drop_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_partition_result result; + try { + result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - (this->*(pfn->second))(seqid, iprot, oprot); - return true; + + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_database_args args; + ThriftHiveMetastore_drop_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_database_result result; + ThriftHiveMetastore_drop_partition_by_name_result result; try { - iface_->create_database(args.database); - } catch (AlreadyExistsException &o1) { + result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11601,33 +19274,33 @@ return; } - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_database_args args; + ThriftHiveMetastore_get_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_database_result result; + ThriftHiveMetastore_get_partition_result result; try { - iface_->get_database(result.success, args.name); + iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11635,35 +19308,33 @@ return; } - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_database_args args; + ThriftHiveMetastore_get_partition_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_database_result result; + ThriftHiveMetastore_get_partition_with_auth_result result; try { - iface_->drop_database(args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + iface_->get_partition_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11671,30 +19342,33 @@ return; } - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_databases_args args; + ThriftHiveMetastore_get_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_databases_result result; + ThriftHiveMetastore_get_partition_by_name_result result; try { - iface_->get_databases(result.success, args.pattern); + iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11702,30 +19376,33 @@ return; } - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_all_databases_args args; + ThriftHiveMetastore_get_partitions_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_all_databases_result result; + ThriftHiveMetastore_get_partitions_result result; try { - iface_->get_all_databases(result.success); + iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11733,33 +19410,33 @@ return; } - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_type_args args; + ThriftHiveMetastore_get_partitions_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_type_result result; + ThriftHiveMetastore_get_partitions_with_auth_result result; try { - iface_->get_type(result.success, args.name); + iface_->get_partitions_with_auth(result.success, args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11767,36 +19444,30 @@ return; } - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_type_args args; + ThriftHiveMetastore_get_partition_names_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_type_result result; + ThriftHiveMetastore_get_partition_names_result result; try { - result.success = iface_->create_type(args.type); + iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11804,33 +19475,30 @@ return; } - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_type_args args; + ThriftHiveMetastore_get_partitions_ps_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_type_result result; + ThriftHiveMetastore_get_partitions_ps_result result; try { - result.success = iface_->drop_type(args.type); + iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11838,30 +19506,33 @@ return; } - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_type_all_args args; + ThriftHiveMetastore_get_partitions_ps_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_type_all_result result; + ThriftHiveMetastore_get_partitions_ps_with_auth_result result; try { - iface_->get_type_all(result.success, args.name); + iface_->get_partitions_ps_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11869,36 +19540,30 @@ return; } - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_fields_args args; + ThriftHiveMetastore_get_partition_names_ps_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_fields_result result; + ThriftHiveMetastore_get_partition_names_ps_result result; try { - iface_->get_fields(result.success, args.db_name, args.table_name); + iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11906,36 +19571,33 @@ return; } - oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_schema_args args; + ThriftHiveMetastore_get_partitions_by_filter_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_schema_result result; + ThriftHiveMetastore_get_partitions_by_filter_result result; try { - iface_->get_schema(result.success, args.db_name, args.table_name); + iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11943,38 +19605,32 @@ return; } - oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_table_args args; + ThriftHiveMetastore_alter_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_table_result result; + ThriftHiveMetastore_alter_partition_result result; try { - iface_->create_table(args.tbl); - } catch (AlreadyExistsException &o1) { + iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11982,32 +19638,30 @@ return; } - oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_table_args args; + ThriftHiveMetastore_get_config_value_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_table_result result; + ThriftHiveMetastore_get_config_value_result result; try { - iface_->drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + iface_->get_config_value(result.success, args.name, args.defaultValue); + result.__isset.success = true; + } catch (ConfigValSecurityException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12015,30 +19669,30 @@ return; } - oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_tables_args args; + ThriftHiveMetastore_partition_name_to_vals_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_tables_result result; + ThriftHiveMetastore_partition_name_to_vals_result result; try { - iface_->get_tables(result.success, args.db_name, args.pattern); + iface_->partition_name_to_vals(result.success, args.part_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12046,30 +19700,30 @@ return; } - oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_all_tables_args args; + ThriftHiveMetastore_partition_name_to_spec_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_all_tables_result result; + ThriftHiveMetastore_partition_name_to_spec_result result; try { - iface_->get_all_tables(result.success, args.db_name); + iface_->partition_name_to_spec(result.success, args.part_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12077,33 +19731,36 @@ return; } - oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_table_args args; + ThriftHiveMetastore_add_index_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_table_result result; + ThriftHiveMetastore_add_index_result result; try { - iface_->get_table(result.success, args.dbname, args.tbl_name); + iface_->add_index(result.success, args.new_index, args.index_table); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12111,23 +19768,23 @@ return; } - oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_alter_table_args args; + ThriftHiveMetastore_alter_index_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_table_result result; + ThriftHiveMetastore_alter_index_result result; try { - iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; @@ -12136,7 +19793,7 @@ result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12144,36 +19801,33 @@ return; } - oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_add_partition_args args; + ThriftHiveMetastore_drop_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_add_partition_result result; + ThriftHiveMetastore_drop_index_by_name_result result; try { - iface_->add_partition(result.success, args.new_part); + result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12181,36 +19835,33 @@ return; } - oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_append_partition_args args; + ThriftHiveMetastore_get_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_append_partition_result result; + ThriftHiveMetastore_get_index_by_name_result result; try { - iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12218,36 +19869,33 @@ return; } - oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_append_partition_by_name_args args; + ThriftHiveMetastore_get_indexes_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_append_partition_by_name_result result; + ThriftHiveMetastore_get_indexes_result result; try { - iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12255,33 +19903,30 @@ return; } - oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_partition_args args; + ThriftHiveMetastore_get_index_names_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_partition_result result; + ThriftHiveMetastore_get_index_names_result result; try { - result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12289,33 +19934,30 @@ return; } - oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_user_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_partition_by_name_args args; + ThriftHiveMetastore_get_user_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_partition_by_name_result result; + ThriftHiveMetastore_get_user_privilege_set_result result; try { - result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + iface_->get_user_privilege_set(result.success, args.user_name, args.group_names); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_user_privilege_set", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12323,33 +19965,30 @@ return; } - oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_user_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_db_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partition_args args; + ThriftHiveMetastore_get_db_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_result result; + ThriftHiveMetastore_get_db_privilege_set_result result; try { - iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + iface_->get_db_privilege_set(result.success, args.db_name, args.user_name, args.group_names); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_db_privilege_set", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12357,33 +19996,30 @@ return; } - oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_db_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_table_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partition_by_name_args args; + ThriftHiveMetastore_get_table_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_by_name_result result; + ThriftHiveMetastore_get_table_privilege_set_result result; try { - iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_table_privilege_set(result.success, args.db_name, args.table_name, args.user_name, args.group_names); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table_privilege_set", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12391,33 +20027,30 @@ return; } - oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partitions_args args; + ThriftHiveMetastore_get_partition_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_result result; + ThriftHiveMetastore_get_partition_privilege_set_result result; try { - iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); + iface_->get_partition_privilege_set(result.success, args.db_name, args.table_name, args.part_name, args.user_name, args.group_names); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_privilege_set", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12425,30 +20058,30 @@ return; } - oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_column_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partition_names_args args; + ThriftHiveMetastore_get_column_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_names_result result; + ThriftHiveMetastore_get_column_privilege_set_result result; try { - iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); + iface_->get_column_privilege_set(result.success, args.db_name, args.table_name, args.part_name, args.column_name, args.user_name, args.group_names); result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_column_privilege_set", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12456,30 +20089,30 @@ return; } - oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_column_privilege_set", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partitions_ps_args args; + ThriftHiveMetastore_create_role_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_ps_result result; + ThriftHiveMetastore_create_role_result result; try { - iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.success = iface_->create_role(args.role_name, args.owner_name, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12487,30 +20120,30 @@ return; } - oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_role", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partition_names_ps_args args; + ThriftHiveMetastore_drop_role_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_names_ps_result result; + ThriftHiveMetastore_drop_role_result result; try { - iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.success = iface_->drop_role(args.role_name, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12518,33 +20151,30 @@ return; } - oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_add_role_member(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partitions_by_filter_args args; + ThriftHiveMetastore_add_role_member_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_by_filter_result result; + ThriftHiveMetastore_add_role_member_result result; try { - iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); + result.success = iface_->add_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_role_member", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12552,32 +20182,30 @@ return; } - oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_role_member", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_remove_role_member(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_alter_partition_args args; + ThriftHiveMetastore_remove_role_member_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_partition_result result; + ThriftHiveMetastore_remove_role_member_result result; try { - iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException &o1) { + result.success = iface_->remove_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("remove_role_member", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12585,30 +20213,30 @@ return; } - oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("remove_role_member", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_roles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_config_value_args args; + ThriftHiveMetastore_list_roles_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_config_value_result result; + ThriftHiveMetastore_list_roles_result result; try { - iface_->get_config_value(result.success, args.name, args.defaultValue); + iface_->list_roles(result.success, args.principal_name, args.is_role, args.is_group, args.db_name); result.__isset.success = true; - } catch (ConfigValSecurityException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12616,30 +20244,30 @@ return; } - oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_user_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_partition_name_to_vals_args args; + ThriftHiveMetastore_list_security_user_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_partition_name_to_vals_result result; + ThriftHiveMetastore_list_security_user_grant_result result; try { - iface_->partition_name_to_vals(result.success, args.part_name); + iface_->list_security_user_grant(result.success, args.principla_name, args.is_role, args.is_group); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_user_grant", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12647,30 +20275,30 @@ return; } - oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_user_grant", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_db_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_partition_name_to_spec_args args; + ThriftHiveMetastore_list_security_db_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_partition_name_to_spec_result result; + ThriftHiveMetastore_list_security_db_grant_result result; try { - iface_->partition_name_to_spec(result.success, args.part_name); + iface_->list_security_db_grant(result.success, args.principal_name, args.is_group, args.is_role, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_db_grant", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12678,36 +20306,30 @@ return; } - oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_db_grant", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_table_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_add_index_args args; + ThriftHiveMetastore_list_security_table_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_add_index_result result; + ThriftHiveMetastore_list_security_table_grant_result result; try { - iface_->add_index(result.success, args.new_index, args.index_table); + iface_->list_security_table_grant(result.success, args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_table_grant", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12715,32 +20337,30 @@ return; } - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_table_grant", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_partition_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_alter_index_args args; + ThriftHiveMetastore_list_security_partition_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_index_result result; + ThriftHiveMetastore_list_security_partition_grant_result result; try { - iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException &o1) { + iface_->list_security_partition_grant(result.success, args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_partition_grant", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12748,33 +20368,30 @@ return; } - oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_partition_grant", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_column_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_index_by_name_args args; + ThriftHiveMetastore_list_security_column_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_index_by_name_result result; + ThriftHiveMetastore_list_security_column_grant_result result; try { - result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + iface_->list_security_column_grant(result.success, args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name, args.column_name); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_column_grant", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12782,33 +20399,30 @@ return; } - oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_column_grant", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_index_by_name_args args; + ThriftHiveMetastore_grant_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_by_name_result result; + ThriftHiveMetastore_grant_privileges_result result; try { - iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); + result.success = iface_->grant_privileges(args.user_name, args.is_role, args.is_group, args.privileges, args.grantor); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12816,33 +20430,30 @@ return; } - oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_indexes_args args; + ThriftHiveMetastore_revoke_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_indexes_result result; + ThriftHiveMetastore_revoke_privileges_result result; try { - iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->revoke_privileges(args.user_name, args.is_role, args.is_group, args.privileges); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12850,30 +20461,30 @@ return; } - oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_revoke_all_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_index_names_args args; + ThriftHiveMetastore_revoke_all_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_names_result result; + ThriftHiveMetastore_revoke_all_privileges_result result; try { - iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->revoke_all_privileges(args.user_name, args.is_role, args.is_group, args.remove_user_priv, args.dbs, args.tables, args.parts, args.columns); result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("revoke_all_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12881,7 +20492,7 @@ return; } - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("revoke_all_privileges", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (revision 1044070) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -38,10 +38,13 @@ virtual bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) = 0; virtual bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) = 0; virtual void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; + virtual void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) = 0; virtual void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; virtual void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; + virtual void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) = 0; virtual void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; virtual void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) = 0; + virtual void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) = 0; virtual void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) = 0; virtual void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) = 0; virtual void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) = 0; @@ -54,6 +57,24 @@ virtual void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) = 0; virtual void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; virtual void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; + virtual void get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) = 0; + virtual bool create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) = 0; + virtual bool drop_role(const std::string& role_name, const std::string& db_name) = 0; + virtual bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) = 0; + virtual bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) = 0; + virtual void list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) = 0; + virtual void list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) = 0; + virtual void list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) = 0; + virtual void list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) = 0; + virtual void list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) = 0; + virtual void list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) = 0; + virtual bool grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) = 0; + virtual bool revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) = 0; + virtual bool revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) = 0; }; class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull { @@ -132,18 +153,27 @@ void get_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { return; } + void get_partition_with_auth(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } void get_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { return; } void get_partitions(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */) { return; } + void get_partitions_with_auth(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } void get_partition_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */) { return; } void get_partitions_ps(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const int16_t /* max_parts */) { return; } + void get_partitions_ps_with_auth(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const int16_t /* max_parts */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } void get_partition_names_ps(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const int16_t /* max_parts */) { return; } @@ -181,6 +211,67 @@ void get_index_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_indexes */) { return; } + void get_user_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_db_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* db_name */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_table_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_partition_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* part_name */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_column_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* part_name */, const std::string& /* column_name */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + bool create_role(const std::string& /* role_name */, const std::string& /* owner_name */, const std::string& /* db_name */) { + bool _return = false; + return _return; + } + bool drop_role(const std::string& /* role_name */, const std::string& /* db_name */) { + bool _return = false; + return _return; + } + bool add_role_member(const std::string& /* role_name */, const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const std::string& /* db_name */) { + bool _return = false; + return _return; + } + bool remove_role_member(const std::string& /* role_name */, const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const std::string& /* db_name */) { + bool _return = false; + return _return; + } + void list_roles(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_role */, const bool /* is_group */, const std::string& /* db_name */) { + return; + } + void list_security_user_grant(std::vector & /* _return */, const std::string& /* principla_name */, const bool /* is_role */, const bool /* is_group */) { + return; + } + void list_security_db_grant(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_group */, const bool /* is_role */, const std::string& /* db_name */) { + return; + } + void list_security_table_grant(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_group */, const bool /* is_role */, const std::string& /* db_name */, const std::string& /* table_name */) { + return; + } + void list_security_partition_grant(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_group */, const bool /* is_role */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* part_name */) { + return; + } + void list_security_column_grant(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_group */, const bool /* is_role */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* part_name */, const std::string& /* column_name */) { + return; + } + bool grant_privileges(const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const PrivilegeBag& /* privileges */, const std::string& /* grantor */) { + bool _return = false; + return _return; + } + bool revoke_privileges(const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const PrivilegeBag& /* privileges */) { + bool _return = false; + return _return; + } + bool revoke_all_privileges(const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const bool /* remove_user_priv */, const std::vector & /* dbs */, const std::vector
& /* tables */, const std::vector & /* parts */, const std::map > & /* columns */) { + bool _return = false; + return _return; + } }; typedef struct _ThriftHiveMetastore_create_database_args__isset { @@ -2854,6 +2945,138 @@ }; +typedef struct _ThriftHiveMetastore_get_partition_with_auth_args__isset { + _ThriftHiveMetastore_get_partition_with_auth_args__isset() : db_name(false), tbl_name(false), part_vals(false), user_name(false), group_names(false) {} + bool db_name; + bool tbl_name; + bool part_vals; + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_partition_with_auth_args__isset; + +class ThriftHiveMetastore_get_partition_with_auth_args { + public: + + ThriftHiveMetastore_get_partition_with_auth_args() : db_name(""), tbl_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_partition_with_auth_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::vector part_vals; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_partition_with_auth_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_with_auth_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_with_auth_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_with_auth_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_with_auth_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_with_auth_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_with_auth_result__isset { + _ThriftHiveMetastore_get_partition_with_auth_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partition_with_auth_result__isset; + +class ThriftHiveMetastore_get_partition_with_auth_result { + public: + + ThriftHiveMetastore_get_partition_with_auth_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_with_auth_result() throw() {} + + Partition success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_with_auth_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_with_auth_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_with_auth_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_with_auth_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_with_auth_presult__isset { + _ThriftHiveMetastore_get_partition_with_auth_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partition_with_auth_presult__isset; + +class ThriftHiveMetastore_get_partition_with_auth_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_with_auth_presult() throw() {} + + Partition* success; + MetaException o1; + NoSuchObjectException o2; + + _ThriftHiveMetastore_get_partition_with_auth_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + typedef struct _ThriftHiveMetastore_get_partition_by_name_args__isset { _ThriftHiveMetastore_get_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false) {} bool db_name; @@ -3098,6 +3321,138 @@ }; +typedef struct _ThriftHiveMetastore_get_partitions_with_auth_args__isset { + _ThriftHiveMetastore_get_partitions_with_auth_args__isset() : db_name(false), tbl_name(false), max_parts(false), user_name(false), group_names(false) {} + bool db_name; + bool tbl_name; + bool max_parts; + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_partitions_with_auth_args__isset; + +class ThriftHiveMetastore_get_partitions_with_auth_args { + public: + + ThriftHiveMetastore_get_partitions_with_auth_args() : db_name(""), tbl_name(""), max_parts(-1), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_args() throw() {} + + std::string db_name; + std::string tbl_name; + int16_t max_parts; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_partitions_with_auth_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_with_auth_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_with_auth_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_with_auth_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partitions_with_auth_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const int16_t* max_parts; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_with_auth_result__isset { + _ThriftHiveMetastore_get_partitions_with_auth_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partitions_with_auth_result__isset; + +class ThriftHiveMetastore_get_partitions_with_auth_result { + public: + + ThriftHiveMetastore_get_partitions_with_auth_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_result() throw() {} + + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_with_auth_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_with_auth_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_with_auth_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_with_auth_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_with_auth_presult__isset { + _ThriftHiveMetastore_get_partitions_with_auth_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partitions_with_auth_presult__isset; + +class ThriftHiveMetastore_get_partitions_with_auth_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_presult() throw() {} + + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_with_auth_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + typedef struct _ThriftHiveMetastore_get_partition_names_args__isset { _ThriftHiveMetastore_get_partition_names_args__isset() : db_name(false), tbl_name(false), max_parts(false) {} bool db_name; @@ -3335,30 +3690,34 @@ }; -typedef struct _ThriftHiveMetastore_get_partition_names_ps_args__isset { - _ThriftHiveMetastore_get_partition_names_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} +typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset { + _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false), user_name(false), group_names(false) {} bool db_name; bool tbl_name; bool part_vals; bool max_parts; -} _ThriftHiveMetastore_get_partition_names_ps_args__isset; + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset; -class ThriftHiveMetastore_get_partition_names_ps_args { +class ThriftHiveMetastore_get_partitions_ps_with_auth_args { public: - ThriftHiveMetastore_get_partition_names_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { + ThriftHiveMetastore_get_partitions_ps_with_auth_args() : db_name(""), tbl_name(""), max_parts(-1), user_name("") { } - virtual ~ThriftHiveMetastore_get_partition_names_ps_args() throw() {} + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_args() throw() {} std::string db_name; std::string tbl_name; std::vector part_vals; int16_t max_parts; + std::string user_name; + std::vector group_names; - _ThriftHiveMetastore_get_partition_names_ps_args__isset __isset; + _ThriftHiveMetastore_get_partitions_ps_with_auth_args__isset __isset; - bool operator == (const ThriftHiveMetastore_get_partition_names_ps_args & rhs) const + bool operator == (const ThriftHiveMetastore_get_partitions_ps_with_auth_args & rhs) const { if (!(db_name == rhs.db_name)) return false; @@ -3368,13 +3727,17 @@ return false; if (!(max_parts == rhs.max_parts)) return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_get_partition_names_ps_args &rhs) const { + bool operator != (const ThriftHiveMetastore_get_partitions_ps_with_auth_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_get_partition_names_ps_args & ) const; + bool operator < (const ThriftHiveMetastore_get_partitions_ps_with_auth_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -3382,16 +3745,145 @@ }; -class ThriftHiveMetastore_get_partition_names_ps_pargs { +class ThriftHiveMetastore_get_partitions_ps_with_auth_pargs { public: - virtual ~ThriftHiveMetastore_get_partition_names_ps_pargs() throw() {} + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_pargs() throw() {} const std::string* db_name; const std::string* tbl_name; const std::vector * part_vals; const int16_t* max_parts; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset { + _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset; + +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { + public: + + ThriftHiveMetastore_get_partitions_ps_with_auth_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_result() throw() {} + + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_ps_with_auth_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_ps_with_auth_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_ps_with_auth_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset { + _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset; + +class ThriftHiveMetastore_get_partitions_ps_with_auth_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_presult() throw() {} + + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + _ThriftHiveMetastore_get_partitions_ps_with_auth_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partition_names_ps_args__isset { + _ThriftHiveMetastore_get_partition_names_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} + bool db_name; + bool tbl_name; + bool part_vals; + bool max_parts; +} _ThriftHiveMetastore_get_partition_names_ps_args__isset; + +class ThriftHiveMetastore_get_partition_names_ps_args { + public: + + ThriftHiveMetastore_get_partition_names_ps_args() : db_name(""), tbl_name(""), max_parts(-1) { + } + + virtual ~ThriftHiveMetastore_get_partition_names_ps_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::vector part_vals; + int16_t max_parts; + + _ThriftHiveMetastore_get_partition_names_ps_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_names_ps_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_vals == rhs.part_vals)) + return false; + if (!(max_parts == rhs.max_parts)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_ps_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_names_ps_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_names_ps_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_names_ps_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::vector * part_vals; + const int16_t* max_parts; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -4753,137 +5245,2423 @@ }; -class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { +typedef struct _ThriftHiveMetastore_get_user_privilege_set_args__isset { + _ThriftHiveMetastore_get_user_privilege_set_args__isset() : user_name(false), group_names(false) {} + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_user_privilege_set_args__isset; + +class ThriftHiveMetastore_get_user_privilege_set_args { public: - ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : - facebook::fb303::FacebookServiceClient(prot, prot) {} - ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : - facebook::fb303::FacebookServiceClient(iprot, oprot) {} - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { - return piprot_; + + ThriftHiveMetastore_get_user_privilege_set_args() : user_name("") { } - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { - return poprot_; + + virtual ~ThriftHiveMetastore_get_user_privilege_set_args() throw() {} + + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_user_privilege_set_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_user_privilege_set_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; } - void create_database(const Database& database); - void send_create_database(const Database& database); - void recv_create_database(); - void get_database(Database& _return, const std::string& name); - void send_get_database(const std::string& name); - void recv_get_database(Database& _return); - void drop_database(const std::string& name, const bool deleteData); - void send_drop_database(const std::string& name, const bool deleteData); - void recv_drop_database(); - void get_databases(std::vector & _return, const std::string& pattern); - void send_get_databases(const std::string& pattern); - void recv_get_databases(std::vector & _return); - void get_all_databases(std::vector & _return); - void send_get_all_databases(); - void recv_get_all_databases(std::vector & _return); - void get_type(Type& _return, const std::string& name); - void send_get_type(const std::string& name); - void recv_get_type(Type& _return); - bool create_type(const Type& type); - void send_create_type(const Type& type); - bool recv_create_type(); - bool drop_type(const std::string& type); - void send_drop_type(const std::string& type); - bool recv_drop_type(); - void get_type_all(std::map & _return, const std::string& name); - void send_get_type_all(const std::string& name); - void recv_get_type_all(std::map & _return); - void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); - void send_get_fields(const std::string& db_name, const std::string& table_name); - void recv_get_fields(std::vector & _return); - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); - void send_get_schema(const std::string& db_name, const std::string& table_name); - void recv_get_schema(std::vector & _return); - void create_table(const Table& tbl); - void send_create_table(const Table& tbl); - void recv_create_table(); - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void recv_drop_table(); - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); - void send_get_tables(const std::string& db_name, const std::string& pattern); - void recv_get_tables(std::vector & _return); - void get_all_tables(std::vector & _return, const std::string& db_name); - void send_get_all_tables(const std::string& db_name); - void recv_get_all_tables(std::vector & _return); - void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); - void send_get_table(const std::string& dbname, const std::string& tbl_name); - void recv_get_table(Table& _return); - void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void recv_alter_table(); - void add_partition(Partition& _return, const Partition& new_part); - void send_add_partition(const Partition& new_part); - void recv_add_partition(Partition& _return); - void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_append_partition(Partition& _return); - void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_append_partition_by_name(Partition& _return); - bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - void send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - bool recv_drop_partition(); - bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - void send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - bool recv_drop_partition_by_name(); - void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_get_partition(Partition& _return); - void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_get_partition_by_name(Partition& _return); - void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partitions(std::vector & _return); - void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partition_names(std::vector & _return); - void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partitions_ps(std::vector & _return); - void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partition_names_ps(std::vector & _return); - void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); - void send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); - void recv_get_partitions_by_filter(std::vector & _return); - void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void recv_alter_partition(); - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); - void send_get_config_value(const std::string& name, const std::string& defaultValue); - void recv_get_config_value(std::string& _return); - void partition_name_to_vals(std::vector & _return, const std::string& part_name); - void send_partition_name_to_vals(const std::string& part_name); - void recv_partition_name_to_vals(std::vector & _return); - void partition_name_to_spec(std::map & _return, const std::string& part_name); - void send_partition_name_to_spec(const std::string& part_name); - void recv_partition_name_to_spec(std::map & _return); - void add_index(Index& _return, const Index& new_index, const Table& index_table); - void send_add_index(const Index& new_index, const Table& index_table); - void recv_add_index(Index& _return); - void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void recv_alter_index(); - bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - void send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - bool recv_drop_index_by_name(); - void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void recv_get_index_by_name(Index& _return); - void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_indexes(std::vector & _return); - void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_index_names(std::vector & _return); + bool operator != (const ThriftHiveMetastore_get_user_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_user_privilege_set_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + }; + +class ThriftHiveMetastore_get_user_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_user_privilege_set_pargs() throw() {} + + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_user_privilege_set_result__isset { + _ThriftHiveMetastore_get_user_privilege_set_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_user_privilege_set_result__isset; + +class ThriftHiveMetastore_get_user_privilege_set_result { + public: + + ThriftHiveMetastore_get_user_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_user_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + _ThriftHiveMetastore_get_user_privilege_set_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_user_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_user_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_user_privilege_set_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_user_privilege_set_presult__isset { + _ThriftHiveMetastore_get_user_privilege_set_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_user_privilege_set_presult__isset; + +class ThriftHiveMetastore_get_user_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_user_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + _ThriftHiveMetastore_get_user_privilege_set_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_db_privilege_set_args__isset { + _ThriftHiveMetastore_get_db_privilege_set_args__isset() : db_name(false), user_name(false), group_names(false) {} + bool db_name; + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_db_privilege_set_args__isset; + +class ThriftHiveMetastore_get_db_privilege_set_args { + public: + + ThriftHiveMetastore_get_db_privilege_set_args() : db_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_db_privilege_set_args() throw() {} + + std::string db_name; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_db_privilege_set_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_db_privilege_set_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_db_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_db_privilege_set_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_db_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_db_privilege_set_pargs() throw() {} + + const std::string* db_name; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_db_privilege_set_result__isset { + _ThriftHiveMetastore_get_db_privilege_set_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_db_privilege_set_result__isset; + +class ThriftHiveMetastore_get_db_privilege_set_result { + public: + + ThriftHiveMetastore_get_db_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_db_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + _ThriftHiveMetastore_get_db_privilege_set_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_db_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_db_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_db_privilege_set_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_db_privilege_set_presult__isset { + _ThriftHiveMetastore_get_db_privilege_set_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_db_privilege_set_presult__isset; + +class ThriftHiveMetastore_get_db_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_db_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + _ThriftHiveMetastore_get_db_privilege_set_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_table_privilege_set_args__isset { + _ThriftHiveMetastore_get_table_privilege_set_args__isset() : db_name(false), table_name(false), user_name(false), group_names(false) {} + bool db_name; + bool table_name; + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_table_privilege_set_args__isset; + +class ThriftHiveMetastore_get_table_privilege_set_args { + public: + + ThriftHiveMetastore_get_table_privilege_set_args() : db_name(""), table_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_table_privilege_set_args() throw() {} + + std::string db_name; + std::string table_name; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_table_privilege_set_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_table_privilege_set_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_privilege_set_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_table_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_privilege_set_pargs() throw() {} + + const std::string* db_name; + const std::string* table_name; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_privilege_set_result__isset { + _ThriftHiveMetastore_get_table_privilege_set_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_table_privilege_set_result__isset; + +class ThriftHiveMetastore_get_table_privilege_set_result { + public: + + ThriftHiveMetastore_get_table_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_table_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + _ThriftHiveMetastore_get_table_privilege_set_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_table_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_privilege_set_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_table_privilege_set_presult__isset { + _ThriftHiveMetastore_get_table_privilege_set_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_table_privilege_set_presult__isset; + +class ThriftHiveMetastore_get_table_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + _ThriftHiveMetastore_get_table_privilege_set_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_partition_privilege_set_args__isset { + _ThriftHiveMetastore_get_partition_privilege_set_args__isset() : db_name(false), table_name(false), part_name(false), user_name(false), group_names(false) {} + bool db_name; + bool table_name; + bool part_name; + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_partition_privilege_set_args__isset; + +class ThriftHiveMetastore_get_partition_privilege_set_args { + public: + + ThriftHiveMetastore_get_partition_privilege_set_args() : db_name(""), table_name(""), part_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_partition_privilege_set_args() throw() {} + + std::string db_name; + std::string table_name; + std::string part_name; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_partition_privilege_set_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_privilege_set_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_privilege_set_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_privilege_set_pargs() throw() {} + + const std::string* db_name; + const std::string* table_name; + const std::string* part_name; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_privilege_set_result__isset { + _ThriftHiveMetastore_get_partition_privilege_set_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_partition_privilege_set_result__isset; + +class ThriftHiveMetastore_get_partition_privilege_set_result { + public: + + ThriftHiveMetastore_get_partition_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + _ThriftHiveMetastore_get_partition_privilege_set_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_privilege_set_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_privilege_set_presult__isset { + _ThriftHiveMetastore_get_partition_privilege_set_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_partition_privilege_set_presult__isset; + +class ThriftHiveMetastore_get_partition_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + _ThriftHiveMetastore_get_partition_privilege_set_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_get_column_privilege_set_args__isset { + _ThriftHiveMetastore_get_column_privilege_set_args__isset() : db_name(false), table_name(false), part_name(false), column_name(false), user_name(false), group_names(false) {} + bool db_name; + bool table_name; + bool part_name; + bool column_name; + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_column_privilege_set_args__isset; + +class ThriftHiveMetastore_get_column_privilege_set_args { + public: + + ThriftHiveMetastore_get_column_privilege_set_args() : db_name(""), table_name(""), part_name(""), column_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_column_privilege_set_args() throw() {} + + std::string db_name; + std::string table_name; + std::string part_name; + std::string column_name; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_column_privilege_set_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_column_privilege_set_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(column_name == rhs.column_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_column_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_column_privilege_set_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_column_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_column_privilege_set_pargs() throw() {} + + const std::string* db_name; + const std::string* table_name; + const std::string* part_name; + const std::string* column_name; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_column_privilege_set_result__isset { + _ThriftHiveMetastore_get_column_privilege_set_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_column_privilege_set_result__isset; + +class ThriftHiveMetastore_get_column_privilege_set_result { + public: + + ThriftHiveMetastore_get_column_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_column_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + _ThriftHiveMetastore_get_column_privilege_set_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_column_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_column_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_column_privilege_set_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_column_privilege_set_presult__isset { + _ThriftHiveMetastore_get_column_privilege_set_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_column_privilege_set_presult__isset; + +class ThriftHiveMetastore_get_column_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_column_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + _ThriftHiveMetastore_get_column_privilege_set_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_role_args__isset { + _ThriftHiveMetastore_create_role_args__isset() : role_name(false), owner_name(false), db_name(false) {} + bool role_name; + bool owner_name; + bool db_name; +} _ThriftHiveMetastore_create_role_args__isset; + +class ThriftHiveMetastore_create_role_args { + public: + + ThriftHiveMetastore_create_role_args() : role_name(""), owner_name(""), db_name("") { + } + + virtual ~ThriftHiveMetastore_create_role_args() throw() {} + + std::string role_name; + std::string owner_name; + std::string db_name; + + _ThriftHiveMetastore_create_role_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(owner_name == rhs.owner_name)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_role_pargs() throw() {} + + const std::string* role_name; + const std::string* owner_name; + const std::string* db_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_role_result__isset { + _ThriftHiveMetastore_create_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_create_role_result__isset; + +class ThriftHiveMetastore_create_role_result { + public: + + ThriftHiveMetastore_create_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_create_role_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_create_role_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_role_presult__isset { + _ThriftHiveMetastore_create_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_create_role_presult__isset; + +class ThriftHiveMetastore_create_role_presult { + public: + + + virtual ~ThriftHiveMetastore_create_role_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_create_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_role_args__isset { + _ThriftHiveMetastore_drop_role_args__isset() : role_name(false), db_name(false) {} + bool role_name; + bool db_name; +} _ThriftHiveMetastore_drop_role_args__isset; + +class ThriftHiveMetastore_drop_role_args { + public: + + ThriftHiveMetastore_drop_role_args() : role_name(""), db_name("") { + } + + virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + + std::string role_name; + std::string db_name; + + _ThriftHiveMetastore_drop_role_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_role_pargs() throw() {} + + const std::string* role_name; + const std::string* db_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_role_result__isset { + _ThriftHiveMetastore_drop_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_drop_role_result__isset; + +class ThriftHiveMetastore_drop_role_result { + public: + + ThriftHiveMetastore_drop_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_role_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_drop_role_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_role_presult__isset { + _ThriftHiveMetastore_drop_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_drop_role_presult__isset; + +class ThriftHiveMetastore_drop_role_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_role_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_drop_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_add_role_member_args__isset { + _ThriftHiveMetastore_add_role_member_args__isset() : role_name(false), user_name(false), is_role(false), is_group(false), db_name(false) {} + bool role_name; + bool user_name; + bool is_role; + bool is_group; + bool db_name; +} _ThriftHiveMetastore_add_role_member_args__isset; + +class ThriftHiveMetastore_add_role_member_args { + public: + + ThriftHiveMetastore_add_role_member_args() : role_name(""), user_name(""), is_role(0), is_group(0), db_name("") { + } + + virtual ~ThriftHiveMetastore_add_role_member_args() throw() {} + + std::string role_name; + std::string user_name; + bool is_role; + bool is_group; + std::string db_name; + + _ThriftHiveMetastore_add_role_member_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_add_role_member_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_role_member_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_role_member_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_add_role_member_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_role_member_pargs() throw() {} + + const std::string* role_name; + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const std::string* db_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_role_member_result__isset { + _ThriftHiveMetastore_add_role_member_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_add_role_member_result__isset; + +class ThriftHiveMetastore_add_role_member_result { + public: + + ThriftHiveMetastore_add_role_member_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_add_role_member_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_add_role_member_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_add_role_member_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_role_member_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_role_member_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_add_role_member_presult__isset { + _ThriftHiveMetastore_add_role_member_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_add_role_member_presult__isset; + +class ThriftHiveMetastore_add_role_member_presult { + public: + + + virtual ~ThriftHiveMetastore_add_role_member_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_add_role_member_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_remove_role_member_args__isset { + _ThriftHiveMetastore_remove_role_member_args__isset() : role_name(false), user_name(false), is_role(false), is_group(false), db_name(false) {} + bool role_name; + bool user_name; + bool is_role; + bool is_group; + bool db_name; +} _ThriftHiveMetastore_remove_role_member_args__isset; + +class ThriftHiveMetastore_remove_role_member_args { + public: + + ThriftHiveMetastore_remove_role_member_args() : role_name(""), user_name(""), is_role(0), is_group(0), db_name("") { + } + + virtual ~ThriftHiveMetastore_remove_role_member_args() throw() {} + + std::string role_name; + std::string user_name; + bool is_role; + bool is_group; + std::string db_name; + + _ThriftHiveMetastore_remove_role_member_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_remove_role_member_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_remove_role_member_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_remove_role_member_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_remove_role_member_pargs { + public: + + + virtual ~ThriftHiveMetastore_remove_role_member_pargs() throw() {} + + const std::string* role_name; + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const std::string* db_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_remove_role_member_result__isset { + _ThriftHiveMetastore_remove_role_member_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_remove_role_member_result__isset; + +class ThriftHiveMetastore_remove_role_member_result { + public: + + ThriftHiveMetastore_remove_role_member_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_remove_role_member_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_remove_role_member_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_remove_role_member_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_remove_role_member_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_remove_role_member_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_remove_role_member_presult__isset { + _ThriftHiveMetastore_remove_role_member_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_remove_role_member_presult__isset; + +class ThriftHiveMetastore_remove_role_member_presult { + public: + + + virtual ~ThriftHiveMetastore_remove_role_member_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_remove_role_member_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_roles_args__isset { + _ThriftHiveMetastore_list_roles_args__isset() : principal_name(false), is_role(false), is_group(false), db_name(false) {} + bool principal_name; + bool is_role; + bool is_group; + bool db_name; +} _ThriftHiveMetastore_list_roles_args__isset; + +class ThriftHiveMetastore_list_roles_args { + public: + + ThriftHiveMetastore_list_roles_args() : principal_name(""), is_role(0), is_group(0), db_name("") { + } + + virtual ~ThriftHiveMetastore_list_roles_args() throw() {} + + std::string principal_name; + bool is_role; + bool is_group; + std::string db_name; + + _ThriftHiveMetastore_list_roles_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_roles_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_roles_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_roles_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_roles_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_roles_pargs() throw() {} + + const std::string* principal_name; + const bool* is_role; + const bool* is_group; + const std::string* db_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_roles_result__isset { + _ThriftHiveMetastore_list_roles_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_roles_result__isset; + +class ThriftHiveMetastore_list_roles_result { + public: + + ThriftHiveMetastore_list_roles_result() { + } + + virtual ~ThriftHiveMetastore_list_roles_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_roles_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_roles_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_roles_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_roles_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_roles_presult__isset { + _ThriftHiveMetastore_list_roles_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_roles_presult__isset; + +class ThriftHiveMetastore_list_roles_presult { + public: + + + virtual ~ThriftHiveMetastore_list_roles_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_roles_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_security_user_grant_args__isset { + _ThriftHiveMetastore_list_security_user_grant_args__isset() : principla_name(false), is_role(false), is_group(false) {} + bool principla_name; + bool is_role; + bool is_group; +} _ThriftHiveMetastore_list_security_user_grant_args__isset; + +class ThriftHiveMetastore_list_security_user_grant_args { + public: + + ThriftHiveMetastore_list_security_user_grant_args() : principla_name(""), is_role(0), is_group(0) { + } + + virtual ~ThriftHiveMetastore_list_security_user_grant_args() throw() {} + + std::string principla_name; + bool is_role; + bool is_group; + + _ThriftHiveMetastore_list_security_user_grant_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_user_grant_args & rhs) const + { + if (!(principla_name == rhs.principla_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_user_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_user_grant_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_security_user_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_user_grant_pargs() throw() {} + + const std::string* principla_name; + const bool* is_role; + const bool* is_group; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_user_grant_result__isset { + _ThriftHiveMetastore_list_security_user_grant_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_user_grant_result__isset; + +class ThriftHiveMetastore_list_security_user_grant_result { + public: + + ThriftHiveMetastore_list_security_user_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_user_grant_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_security_user_grant_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_user_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_user_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_user_grant_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_user_grant_presult__isset { + _ThriftHiveMetastore_list_security_user_grant_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_user_grant_presult__isset; + +class ThriftHiveMetastore_list_security_user_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_user_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_security_user_grant_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_security_db_grant_args__isset { + _ThriftHiveMetastore_list_security_db_grant_args__isset() : principal_name(false), is_group(false), is_role(false), db_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; +} _ThriftHiveMetastore_list_security_db_grant_args__isset; + +class ThriftHiveMetastore_list_security_db_grant_args { + public: + + ThriftHiveMetastore_list_security_db_grant_args() : principal_name(""), is_group(0), is_role(0), db_name("") { + } + + virtual ~ThriftHiveMetastore_list_security_db_grant_args() throw() {} + + std::string principal_name; + bool is_group; + bool is_role; + std::string db_name; + + _ThriftHiveMetastore_list_security_db_grant_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_db_grant_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_db_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_db_grant_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_security_db_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_db_grant_pargs() throw() {} + + const std::string* principal_name; + const bool* is_group; + const bool* is_role; + const std::string* db_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_db_grant_result__isset { + _ThriftHiveMetastore_list_security_db_grant_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_db_grant_result__isset; + +class ThriftHiveMetastore_list_security_db_grant_result { + public: + + ThriftHiveMetastore_list_security_db_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_db_grant_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_security_db_grant_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_db_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_db_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_db_grant_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_db_grant_presult__isset { + _ThriftHiveMetastore_list_security_db_grant_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_db_grant_presult__isset; + +class ThriftHiveMetastore_list_security_db_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_db_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_security_db_grant_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_security_table_grant_args__isset { + _ThriftHiveMetastore_list_security_table_grant_args__isset() : principal_name(false), is_group(false), is_role(false), db_name(false), table_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; + bool table_name; +} _ThriftHiveMetastore_list_security_table_grant_args__isset; + +class ThriftHiveMetastore_list_security_table_grant_args { + public: + + ThriftHiveMetastore_list_security_table_grant_args() : principal_name(""), is_group(0), is_role(0), db_name(""), table_name("") { + } + + virtual ~ThriftHiveMetastore_list_security_table_grant_args() throw() {} + + std::string principal_name; + bool is_group; + bool is_role; + std::string db_name; + std::string table_name; + + _ThriftHiveMetastore_list_security_table_grant_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_table_grant_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_table_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_table_grant_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_security_table_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_table_grant_pargs() throw() {} + + const std::string* principal_name; + const bool* is_group; + const bool* is_role; + const std::string* db_name; + const std::string* table_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_table_grant_result__isset { + _ThriftHiveMetastore_list_security_table_grant_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_table_grant_result__isset; + +class ThriftHiveMetastore_list_security_table_grant_result { + public: + + ThriftHiveMetastore_list_security_table_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_table_grant_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_security_table_grant_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_table_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_table_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_table_grant_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_table_grant_presult__isset { + _ThriftHiveMetastore_list_security_table_grant_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_table_grant_presult__isset; + +class ThriftHiveMetastore_list_security_table_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_table_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_security_table_grant_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_security_partition_grant_args__isset { + _ThriftHiveMetastore_list_security_partition_grant_args__isset() : principal_name(false), is_group(false), is_role(false), db_name(false), table_name(false), part_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; + bool table_name; + bool part_name; +} _ThriftHiveMetastore_list_security_partition_grant_args__isset; + +class ThriftHiveMetastore_list_security_partition_grant_args { + public: + + ThriftHiveMetastore_list_security_partition_grant_args() : principal_name(""), is_group(0), is_role(0), db_name(""), table_name(""), part_name("") { + } + + virtual ~ThriftHiveMetastore_list_security_partition_grant_args() throw() {} + + std::string principal_name; + bool is_group; + bool is_role; + std::string db_name; + std::string table_name; + std::string part_name; + + _ThriftHiveMetastore_list_security_partition_grant_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_partition_grant_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_partition_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_partition_grant_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_security_partition_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_partition_grant_pargs() throw() {} + + const std::string* principal_name; + const bool* is_group; + const bool* is_role; + const std::string* db_name; + const std::string* table_name; + const std::string* part_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_partition_grant_result__isset { + _ThriftHiveMetastore_list_security_partition_grant_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_partition_grant_result__isset; + +class ThriftHiveMetastore_list_security_partition_grant_result { + public: + + ThriftHiveMetastore_list_security_partition_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_partition_grant_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_security_partition_grant_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_partition_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_partition_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_partition_grant_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_partition_grant_presult__isset { + _ThriftHiveMetastore_list_security_partition_grant_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_partition_grant_presult__isset; + +class ThriftHiveMetastore_list_security_partition_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_partition_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_security_partition_grant_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_security_column_grant_args__isset { + _ThriftHiveMetastore_list_security_column_grant_args__isset() : principal_name(false), is_group(false), is_role(false), db_name(false), table_name(false), part_name(false), column_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; + bool table_name; + bool part_name; + bool column_name; +} _ThriftHiveMetastore_list_security_column_grant_args__isset; + +class ThriftHiveMetastore_list_security_column_grant_args { + public: + + ThriftHiveMetastore_list_security_column_grant_args() : principal_name(""), is_group(0), is_role(0), db_name(""), table_name(""), part_name(""), column_name("") { + } + + virtual ~ThriftHiveMetastore_list_security_column_grant_args() throw() {} + + std::string principal_name; + bool is_group; + bool is_role; + std::string db_name; + std::string table_name; + std::string part_name; + std::string column_name; + + _ThriftHiveMetastore_list_security_column_grant_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_column_grant_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(column_name == rhs.column_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_column_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_column_grant_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_security_column_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_column_grant_pargs() throw() {} + + const std::string* principal_name; + const bool* is_group; + const bool* is_role; + const std::string* db_name; + const std::string* table_name; + const std::string* part_name; + const std::string* column_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_column_grant_result__isset { + _ThriftHiveMetastore_list_security_column_grant_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_column_grant_result__isset; + +class ThriftHiveMetastore_list_security_column_grant_result { + public: + + ThriftHiveMetastore_list_security_column_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_column_grant_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_security_column_grant_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_security_column_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_column_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_column_grant_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_security_column_grant_presult__isset { + _ThriftHiveMetastore_list_security_column_grant_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_security_column_grant_presult__isset; + +class ThriftHiveMetastore_list_security_column_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_column_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_security_column_grant_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_grant_privileges_args__isset { + _ThriftHiveMetastore_grant_privileges_args__isset() : user_name(false), is_role(false), is_group(false), privileges(false), grantor(false) {} + bool user_name; + bool is_role; + bool is_group; + bool privileges; + bool grantor; +} _ThriftHiveMetastore_grant_privileges_args__isset; + +class ThriftHiveMetastore_grant_privileges_args { + public: + + ThriftHiveMetastore_grant_privileges_args() : user_name(""), is_role(0), is_group(0), grantor("") { + } + + virtual ~ThriftHiveMetastore_grant_privileges_args() throw() {} + + std::string user_name; + bool is_role; + bool is_group; + PrivilegeBag privileges; + std::string grantor; + + _ThriftHiveMetastore_grant_privileges_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_grant_privileges_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(grantor == rhs.grantor)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_grant_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_privileges_pargs() throw() {} + + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const PrivilegeBag* privileges; + const std::string* grantor; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_privileges_result__isset { + _ThriftHiveMetastore_grant_privileges_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_grant_privileges_result__isset; + +class ThriftHiveMetastore_grant_privileges_result { + public: + + ThriftHiveMetastore_grant_privileges_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_grant_privileges_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_grant_privileges_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_grant_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_privileges_presult__isset { + _ThriftHiveMetastore_grant_privileges_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_grant_privileges_presult__isset; + +class ThriftHiveMetastore_grant_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_privileges_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_grant_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_revoke_privileges_args__isset { + _ThriftHiveMetastore_revoke_privileges_args__isset() : user_name(false), is_role(false), is_group(false), privileges(false) {} + bool user_name; + bool is_role; + bool is_group; + bool privileges; +} _ThriftHiveMetastore_revoke_privileges_args__isset; + +class ThriftHiveMetastore_revoke_privileges_args { + public: + + ThriftHiveMetastore_revoke_privileges_args() : user_name(""), is_role(0), is_group(0) { + } + + virtual ~ThriftHiveMetastore_revoke_privileges_args() throw() {} + + std::string user_name; + bool is_role; + bool is_group; + PrivilegeBag privileges; + + _ThriftHiveMetastore_revoke_privileges_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_revoke_privileges_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(privileges == rhs.privileges)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_revoke_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_revoke_privileges_pargs() throw() {} + + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const PrivilegeBag* privileges; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_privileges_result__isset { + _ThriftHiveMetastore_revoke_privileges_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_revoke_privileges_result__isset; + +class ThriftHiveMetastore_revoke_privileges_result { + public: + + ThriftHiveMetastore_revoke_privileges_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_revoke_privileges_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_revoke_privileges_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_revoke_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_privileges_presult__isset { + _ThriftHiveMetastore_revoke_privileges_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_revoke_privileges_presult__isset; + +class ThriftHiveMetastore_revoke_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_revoke_privileges_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_revoke_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_revoke_all_privileges_args__isset { + _ThriftHiveMetastore_revoke_all_privileges_args__isset() : user_name(false), is_role(false), is_group(false), remove_user_priv(false), dbs(false), tables(false), parts(false), columns(false) {} + bool user_name; + bool is_role; + bool is_group; + bool remove_user_priv; + bool dbs; + bool tables; + bool parts; + bool columns; +} _ThriftHiveMetastore_revoke_all_privileges_args__isset; + +class ThriftHiveMetastore_revoke_all_privileges_args { + public: + + ThriftHiveMetastore_revoke_all_privileges_args() : user_name(""), is_role(0), is_group(0), remove_user_priv(0) { + } + + virtual ~ThriftHiveMetastore_revoke_all_privileges_args() throw() {} + + std::string user_name; + bool is_role; + bool is_group; + bool remove_user_priv; + std::vector dbs; + std::vector
tables; + std::vector parts; + std::map > columns; + + _ThriftHiveMetastore_revoke_all_privileges_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_revoke_all_privileges_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(remove_user_priv == rhs.remove_user_priv)) + return false; + if (!(dbs == rhs.dbs)) + return false; + if (!(tables == rhs.tables)) + return false; + if (!(parts == rhs.parts)) + return false; + if (!(columns == rhs.columns)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_all_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_all_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_revoke_all_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_revoke_all_privileges_pargs() throw() {} + + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const bool* remove_user_priv; + const std::vector * dbs; + const std::vector
* tables; + const std::vector * parts; + const std::map > * columns; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_all_privileges_result__isset { + _ThriftHiveMetastore_revoke_all_privileges_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_revoke_all_privileges_result__isset; + +class ThriftHiveMetastore_revoke_all_privileges_result { + public: + + ThriftHiveMetastore_revoke_all_privileges_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_revoke_all_privileges_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_revoke_all_privileges_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_revoke_all_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_all_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_all_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_all_privileges_presult__isset { + _ThriftHiveMetastore_revoke_all_privileges_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_revoke_all_privileges_presult__isset; + +class ThriftHiveMetastore_revoke_all_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_revoke_all_privileges_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_revoke_all_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { + public: + ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + facebook::fb303::FacebookServiceClient(prot, prot) {} + ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : + facebook::fb303::FacebookServiceClient(iprot, oprot) {} + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void create_database(const Database& database); + void send_create_database(const Database& database); + void recv_create_database(); + void get_database(Database& _return, const std::string& name); + void send_get_database(const std::string& name); + void recv_get_database(Database& _return); + void drop_database(const std::string& name, const bool deleteData); + void send_drop_database(const std::string& name, const bool deleteData); + void recv_drop_database(); + void get_databases(std::vector & _return, const std::string& pattern); + void send_get_databases(const std::string& pattern); + void recv_get_databases(std::vector & _return); + void get_all_databases(std::vector & _return); + void send_get_all_databases(); + void recv_get_all_databases(std::vector & _return); + void get_type(Type& _return, const std::string& name); + void send_get_type(const std::string& name); + void recv_get_type(Type& _return); + bool create_type(const Type& type); + void send_create_type(const Type& type); + bool recv_create_type(); + bool drop_type(const std::string& type); + void send_drop_type(const std::string& type); + bool recv_drop_type(); + void get_type_all(std::map & _return, const std::string& name); + void send_get_type_all(const std::string& name); + void recv_get_type_all(std::map & _return); + void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); + void send_get_fields(const std::string& db_name, const std::string& table_name); + void recv_get_fields(std::vector & _return); + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); + void send_get_schema(const std::string& db_name, const std::string& table_name); + void recv_get_schema(std::vector & _return); + void create_table(const Table& tbl); + void send_create_table(const Table& tbl); + void recv_create_table(); + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void recv_drop_table(); + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); + void send_get_tables(const std::string& db_name, const std::string& pattern); + void recv_get_tables(std::vector & _return); + void get_all_tables(std::vector & _return, const std::string& db_name); + void send_get_all_tables(const std::string& db_name); + void recv_get_all_tables(std::vector & _return); + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); + void send_get_table(const std::string& dbname, const std::string& tbl_name); + void recv_get_table(Table& _return); + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void recv_alter_table(); + void add_partition(Partition& _return, const Partition& new_part); + void send_add_partition(const Partition& new_part); + void recv_add_partition(Partition& _return); + void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_append_partition(Partition& _return); + void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_append_partition_by_name(Partition& _return); + bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + void send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + bool recv_drop_partition(); + bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + void send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + bool recv_drop_partition_by_name(); + void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_get_partition(Partition& _return); + void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names); + void send_get_partition_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names); + void recv_get_partition_with_auth(Partition& _return); + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_get_partition_by_name(Partition& _return); + void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partitions(std::vector & _return); + void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names); + void send_get_partitions_with_auth(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names); + void recv_get_partitions_with_auth(std::vector & _return); + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partition_names(std::vector & _return); + void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partitions_ps(std::vector & _return); + void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names); + void send_get_partitions_ps_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names); + void recv_get_partitions_ps_with_auth(std::vector & _return); + void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partition_names_ps(std::vector & _return); + void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); + void send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); + void recv_get_partitions_by_filter(std::vector & _return); + void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void recv_alter_partition(); + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); + void send_get_config_value(const std::string& name, const std::string& defaultValue); + void recv_get_config_value(std::string& _return); + void partition_name_to_vals(std::vector & _return, const std::string& part_name); + void send_partition_name_to_vals(const std::string& part_name); + void recv_partition_name_to_vals(std::vector & _return); + void partition_name_to_spec(std::map & _return, const std::string& part_name); + void send_partition_name_to_spec(const std::string& part_name); + void recv_partition_name_to_spec(std::map & _return); + void add_index(Index& _return, const Index& new_index, const Table& index_table); + void send_add_index(const Index& new_index, const Table& index_table); + void recv_add_index(Index& _return); + void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void recv_alter_index(); + bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + void send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + bool recv_drop_index_by_name(); + void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void recv_get_index_by_name(Index& _return); + void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_indexes(std::vector & _return); + void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_index_names(std::vector & _return); + void get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names); + void send_get_user_privilege_set(const std::string& user_name, const std::vector & group_names); + void recv_get_user_privilege_set(PrincipalPrivilegeSet& _return); + void get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names); + void send_get_db_privilege_set(const std::string& db_name, const std::string& user_name, const std::vector & group_names); + void recv_get_db_privilege_set(PrincipalPrivilegeSet& _return); + void get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names); + void send_get_table_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names); + void recv_get_table_privilege_set(PrincipalPrivilegeSet& _return); + void get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names); + void send_get_partition_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names); + void recv_get_partition_privilege_set(PrincipalPrivilegeSet& _return); + void get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names); + void send_get_column_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names); + void recv_get_column_privilege_set(PrincipalPrivilegeSet& _return); + bool create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name); + void send_create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name); + bool recv_create_role(); + bool drop_role(const std::string& role_name, const std::string& db_name); + void send_drop_role(const std::string& role_name, const std::string& db_name); + bool recv_drop_role(); + bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name); + void send_add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name); + bool recv_add_role_member(); + bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name); + void send_remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name); + bool recv_remove_role_member(); + void list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name); + void send_list_roles(const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name); + void recv_list_roles(std::vector & _return); + void list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group); + void send_list_security_user_grant(const std::string& principla_name, const bool is_role, const bool is_group); + void recv_list_security_user_grant(std::vector & _return); + void list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name); + void send_list_security_db_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name); + void recv_list_security_db_grant(std::vector & _return); + void list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name); + void send_list_security_table_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name); + void recv_list_security_table_grant(std::vector & _return); + void list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name); + void send_list_security_partition_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name); + void recv_list_security_partition_grant(std::vector & _return); + void list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name); + void send_list_security_column_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name); + void recv_list_security_column_grant(std::vector & _return); + bool grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor); + void send_grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor); + bool recv_grant_privileges(); + bool revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges); + void send_revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges); + bool recv_revoke_privileges(); + bool revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns); + void send_revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns); + bool recv_revoke_all_privileges(); +}; + class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor { protected: boost::shared_ptr iface_; @@ -4913,10 +7691,13 @@ void process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partitions_ps_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); @@ -4929,6 +7710,24 @@ void process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); void process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_user_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_db_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_table_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partition_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_column_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_add_role_member(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_remove_role_member(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_list_roles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_list_security_user_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_list_security_db_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_list_security_table_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_list_security_partition_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_list_security_column_grant(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_revoke_all_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); public: ThriftHiveMetastoreProcessor(boost::shared_ptr iface) : facebook::fb303::FacebookServiceProcessor(iface), @@ -4956,10 +7755,13 @@ processMap_["drop_partition"] = &ThriftHiveMetastoreProcessor::process_drop_partition; processMap_["drop_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_drop_partition_by_name; processMap_["get_partition"] = &ThriftHiveMetastoreProcessor::process_get_partition; + processMap_["get_partition_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partition_with_auth; processMap_["get_partition_by_name"] = &ThriftHiveMetastoreProcessor::process_get_partition_by_name; processMap_["get_partitions"] = &ThriftHiveMetastoreProcessor::process_get_partitions; + processMap_["get_partitions_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partitions_with_auth; processMap_["get_partition_names"] = &ThriftHiveMetastoreProcessor::process_get_partition_names; processMap_["get_partitions_ps"] = &ThriftHiveMetastoreProcessor::process_get_partitions_ps; + processMap_["get_partitions_ps_with_auth"] = &ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth; processMap_["get_partition_names_ps"] = &ThriftHiveMetastoreProcessor::process_get_partition_names_ps; processMap_["get_partitions_by_filter"] = &ThriftHiveMetastoreProcessor::process_get_partitions_by_filter; processMap_["alter_partition"] = &ThriftHiveMetastoreProcessor::process_alter_partition; @@ -4972,6 +7774,24 @@ processMap_["get_index_by_name"] = &ThriftHiveMetastoreProcessor::process_get_index_by_name; processMap_["get_indexes"] = &ThriftHiveMetastoreProcessor::process_get_indexes; processMap_["get_index_names"] = &ThriftHiveMetastoreProcessor::process_get_index_names; + processMap_["get_user_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_user_privilege_set; + processMap_["get_db_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_db_privilege_set; + processMap_["get_table_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_table_privilege_set; + processMap_["get_partition_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_partition_privilege_set; + processMap_["get_column_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_column_privilege_set; + processMap_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role; + processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role; + processMap_["add_role_member"] = &ThriftHiveMetastoreProcessor::process_add_role_member; + processMap_["remove_role_member"] = &ThriftHiveMetastoreProcessor::process_remove_role_member; + processMap_["list_roles"] = &ThriftHiveMetastoreProcessor::process_list_roles; + processMap_["list_security_user_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_user_grant; + processMap_["list_security_db_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_db_grant; + processMap_["list_security_table_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_table_grant; + processMap_["list_security_partition_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_partition_grant; + processMap_["list_security_column_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_column_grant; + processMap_["grant_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_privileges; + processMap_["revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_privileges; + processMap_["revoke_all_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_all_privileges; } virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot); @@ -5242,6 +8062,18 @@ } } + void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); + return; + } else { + ifaces_[i]->get_partition_with_auth(_return, db_name, tbl_name, part_vals, user_name, group_names); + } + } + } + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { uint32_t sz = ifaces_.size(); for (uint32_t i = 0; i < sz; ++i) { @@ -5266,6 +8098,18 @@ } } + void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); + return; + } else { + ifaces_[i]->get_partitions_with_auth(_return, db_name, tbl_name, max_parts, user_name, group_names); + } + } + } + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { uint32_t sz = ifaces_.size(); for (uint32_t i = 0; i < sz; ++i) { @@ -5290,6 +8134,18 @@ } } + void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); + return; + } else { + ifaces_[i]->get_partitions_ps_with_auth(_return, db_name, tbl_name, part_vals, max_parts, user_name, group_names); + } + } + } + void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { uint32_t sz = ifaces_.size(); for (uint32_t i = 0; i < sz; ++i) { @@ -5423,6 +8279,215 @@ } } + void get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_user_privilege_set(_return, user_name, group_names); + return; + } else { + ifaces_[i]->get_user_privilege_set(_return, user_name, group_names); + } + } + } + + void get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_db_privilege_set(_return, db_name, user_name, group_names); + return; + } else { + ifaces_[i]->get_db_privilege_set(_return, db_name, user_name, group_names); + } + } + } + + void get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_table_privilege_set(_return, db_name, table_name, user_name, group_names); + return; + } else { + ifaces_[i]->get_table_privilege_set(_return, db_name, table_name, user_name, group_names); + } + } + } + + void get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partition_privilege_set(_return, db_name, table_name, part_name, user_name, group_names); + return; + } else { + ifaces_[i]->get_partition_privilege_set(_return, db_name, table_name, part_name, user_name, group_names); + } + } + } + + void get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_column_privilege_set(_return, db_name, table_name, part_name, column_name, user_name, group_names); + return; + } else { + ifaces_[i]->get_column_privilege_set(_return, db_name, table_name, part_name, column_name, user_name, group_names); + } + } + } + + bool create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->create_role(role_name, owner_name, db_name); + } else { + ifaces_[i]->create_role(role_name, owner_name, db_name); + } + } + } + + bool drop_role(const std::string& role_name, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->drop_role(role_name, db_name); + } else { + ifaces_[i]->drop_role(role_name, db_name); + } + } + } + + bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->add_role_member(role_name, user_name, is_role, is_group, db_name); + } else { + ifaces_[i]->add_role_member(role_name, user_name, is_role, is_group, db_name); + } + } + } + + bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->remove_role_member(role_name, user_name, is_role, is_group, db_name); + } else { + ifaces_[i]->remove_role_member(role_name, user_name, is_role, is_group, db_name); + } + } + } + + void list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_roles(_return, principal_name, is_role, is_group, db_name); + return; + } else { + ifaces_[i]->list_roles(_return, principal_name, is_role, is_group, db_name); + } + } + } + + void list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_user_grant(_return, principla_name, is_role, is_group); + return; + } else { + ifaces_[i]->list_security_user_grant(_return, principla_name, is_role, is_group); + } + } + } + + void list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_db_grant(_return, principal_name, is_group, is_role, db_name); + return; + } else { + ifaces_[i]->list_security_db_grant(_return, principal_name, is_group, is_role, db_name); + } + } + } + + void list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_table_grant(_return, principal_name, is_group, is_role, db_name, table_name); + return; + } else { + ifaces_[i]->list_security_table_grant(_return, principal_name, is_group, is_role, db_name, table_name); + } + } + } + + void list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_partition_grant(_return, principal_name, is_group, is_role, db_name, table_name, part_name); + return; + } else { + ifaces_[i]->list_security_partition_grant(_return, principal_name, is_group, is_role, db_name, table_name, part_name); + } + } + } + + void list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_column_grant(_return, principal_name, is_group, is_role, db_name, table_name, part_name, column_name); + return; + } else { + ifaces_[i]->list_security_column_grant(_return, principal_name, is_group, is_role, db_name, table_name, part_name, column_name); + } + } + } + + bool grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->grant_privileges(user_name, is_role, is_group, privileges, grantor); + } else { + ifaces_[i]->grant_privileges(user_name, is_role, is_group, privileges, grantor); + } + } + } + + bool revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->revoke_privileges(user_name, is_role, is_group, privileges); + } else { + ifaces_[i]->revoke_privileges(user_name, is_role, is_group, privileges); + } + } + } + + bool revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns); + } else { + ifaces_[i]->revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns); + } + } + } + }; }}} // namespace Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (revision 1044070) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -137,6 +137,11 @@ printf("get_partition\n"); } + void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_partition_with_auth\n"); + } + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { // Your implementation goes here printf("get_partition_by_name\n"); @@ -147,6 +152,11 @@ printf("get_partitions\n"); } + void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_partitions_with_auth\n"); + } + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { // Your implementation goes here printf("get_partition_names\n"); @@ -157,6 +167,11 @@ printf("get_partitions_ps\n"); } + void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_partitions_ps_with_auth\n"); + } + void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { // Your implementation goes here printf("get_partition_names_ps\n"); @@ -217,6 +232,96 @@ printf("get_index_names\n"); } + void get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_user_privilege_set\n"); + } + + void get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_db_privilege_set\n"); + } + + void get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_table_privilege_set\n"); + } + + void get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_partition_privilege_set\n"); + } + + void get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_column_privilege_set\n"); + } + + bool create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) { + // Your implementation goes here + printf("create_role\n"); + } + + bool drop_role(const std::string& role_name, const std::string& db_name) { + // Your implementation goes here + printf("drop_role\n"); + } + + bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { + // Your implementation goes here + printf("add_role_member\n"); + } + + bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { + // Your implementation goes here + printf("remove_role_member\n"); + } + + void list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) { + // Your implementation goes here + printf("list_roles\n"); + } + + void list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) { + // Your implementation goes here + printf("list_security_user_grant\n"); + } + + void list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) { + // Your implementation goes here + printf("list_security_db_grant\n"); + } + + void list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) { + // Your implementation goes here + printf("list_security_table_grant\n"); + } + + void list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) { + // Your implementation goes here + printf("list_security_partition_grant\n"); + } + + void list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) { + // Your implementation goes here + printf("list_security_column_grant\n"); + } + + bool grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) { + // Your implementation goes here + printf("grant_privileges\n"); + } + + bool revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) { + // Your implementation goes here + printf("revoke_privileges\n"); + } + + bool revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) { + // Your implementation goes here + printf("revoke_all_privileges\n"); + } + }; int main(int argc, char **argv) { Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (revision 1044070) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (working copy) @@ -261,8 +261,156 @@ return xfer; } -const char* Database::ascii_fingerprint = "DD4B1A6F6F2E9C90B0A41B314EF1753F"; -const uint8_t Database::binary_fingerprint[16] = {0xDD,0x4B,0x1A,0x6F,0x6F,0x2E,0x9C,0x90,0xB0,0xA4,0x1B,0x31,0x4E,0xF1,0x75,0x3F}; +const char* PrincipalPrivilegeSet::ascii_fingerprint = "690D0C3B9BE6244BBC25229B4C7ED166"; +const uint8_t PrincipalPrivilegeSet::binary_fingerprint[16] = {0x69,0x0D,0x0C,0x3B,0x9B,0xE6,0x24,0x4B,0xBC,0x25,0x22,0x9B,0x4C,0x7E,0xD1,0x66}; + +uint32_t PrincipalPrivilegeSet::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_MAP) { + { + this->userPrivileges.clear(); + uint32_t _size6; + ::apache::thrift::protocol::TType _ktype7; + ::apache::thrift::protocol::TType _vtype8; + iprot->readMapBegin(_ktype7, _vtype8, _size6); + uint32_t _i10; + for (_i10 = 0; _i10 < _size6; ++_i10) + { + std::string _key11; + xfer += iprot->readString(_key11); + std::string& _val12 = this->userPrivileges[_key11]; + xfer += iprot->readString(_val12); + } + iprot->readMapEnd(); + } + this->__isset.userPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->groupPrivileges.clear(); + uint32_t _size13; + ::apache::thrift::protocol::TType _ktype14; + ::apache::thrift::protocol::TType _vtype15; + iprot->readMapBegin(_ktype14, _vtype15, _size13); + uint32_t _i17; + for (_i17 = 0; _i17 < _size13; ++_i17) + { + std::string _key18; + xfer += iprot->readString(_key18); + std::string& _val19 = this->groupPrivileges[_key18]; + xfer += iprot->readString(_val19); + } + iprot->readMapEnd(); + } + this->__isset.groupPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->rolePrivileges.clear(); + uint32_t _size20; + ::apache::thrift::protocol::TType _ktype21; + ::apache::thrift::protocol::TType _vtype22; + iprot->readMapBegin(_ktype21, _vtype22, _size20); + uint32_t _i24; + for (_i24 = 0; _i24 < _size20; ++_i24) + { + std::string _key25; + xfer += iprot->readString(_key25); + std::string& _val26 = this->rolePrivileges[_key25]; + xfer += iprot->readString(_val26); + } + iprot->readMapEnd(); + } + this->__isset.rolePrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("PrincipalPrivilegeSet"); + xfer += oprot->writeFieldBegin("userPrivileges", ::apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->userPrivileges.size()); + std::map ::const_iterator _iter27; + for (_iter27 = this->userPrivileges.begin(); _iter27 != this->userPrivileges.end(); ++_iter27) + { + xfer += oprot->writeString(_iter27->first); + xfer += oprot->writeString(_iter27->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("groupPrivileges", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->groupPrivileges.size()); + std::map ::const_iterator _iter28; + for (_iter28 = this->groupPrivileges.begin(); _iter28 != this->groupPrivileges.end(); ++_iter28) + { + xfer += oprot->writeString(_iter28->first); + xfer += oprot->writeString(_iter28->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rolePrivileges", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->rolePrivileges.size()); + std::map ::const_iterator _iter29; + for (_iter29 = this->rolePrivileges.begin(); _iter29 != this->rolePrivileges.end(); ++_iter29) + { + xfer += oprot->writeString(_iter29->first); + xfer += oprot->writeString(_iter29->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Database::ascii_fingerprint = "6CC121391244867897DCE8893D009926"; +const uint8_t Database::binary_fingerprint[16] = {0x6C,0xC1,0x21,0x39,0x12,0x44,0x86,0x78,0x97,0xDC,0xE8,0x89,0x3D,0x00,0x99,0x26}; uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -312,17 +460,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size6; - ::apache::thrift::protocol::TType _ktype7; - ::apache::thrift::protocol::TType _vtype8; - iprot->readMapBegin(_ktype7, _vtype8, _size6); - uint32_t _i10; - for (_i10 = 0; _i10 < _size6; ++_i10) + uint32_t _size30; + ::apache::thrift::protocol::TType _ktype31; + ::apache::thrift::protocol::TType _vtype32; + iprot->readMapBegin(_ktype31, _vtype32, _size30); + uint32_t _i34; + for (_i34 = 0; _i34 < _size30; ++_i34) { - std::string _key11; - xfer += iprot->readString(_key11); - std::string& _val12 = this->parameters[_key11]; - xfer += iprot->readString(_val12); + std::string _key35; + xfer += iprot->readString(_key35); + std::string& _val36 = this->parameters[_key35]; + xfer += iprot->readString(_val36); } iprot->readMapEnd(); } @@ -331,6 +479,14 @@ xfer += iprot->skip(ftype); } break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -358,11 +514,138 @@ xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 4); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); - std::map ::const_iterator _iter13; - for (_iter13 = this->parameters.begin(); _iter13 != this->parameters.end(); ++_iter13) + std::map ::const_iterator _iter37; + for (_iter37 = this->parameters.begin(); _iter37 != this->parameters.end(); ++_iter37) + { + xfer += oprot->writeString(_iter37->first); + xfer += oprot->writeString(_iter37->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Role::ascii_fingerprint = "7FEEBBD9DBA0117DC0464E28682DD118"; +const uint8_t Role::binary_fingerprint[16] = {0x7F,0xEE,0xBB,0xD9,0xDB,0xA0,0x11,0x7D,0xC0,0x46,0x4E,0x28,0x68,0x2D,0xD1,0x18}; + +uint32_t Role::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_STRING) { + xfer += iprot->readString(this->roleName); + this->__isset.roleName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->database.read(iprot); + this->__isset.database = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ownerName); + this->__isset.ownerName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->parameters.clear(); + uint32_t _size38; + ::apache::thrift::protocol::TType _ktype39; + ::apache::thrift::protocol::TType _vtype40; + iprot->readMapBegin(_ktype39, _vtype40, _size38); + uint32_t _i42; + for (_i42 = 0; _i42 < _size38; ++_i42) + { + std::string _key43; + xfer += iprot->readString(_key43); + std::string& _val44 = this->parameters[_key43]; + xfer += iprot->readString(_val44); + } + iprot->readMapEnd(); + } + this->__isset.parameters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Role::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Role"); + xfer += oprot->writeFieldBegin("roleName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->roleName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("database", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->database.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->ownerName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); + std::map ::const_iterator _iter45; + for (_iter45 = this->parameters.begin(); _iter45 != this->parameters.end(); ++_iter45) { - xfer += oprot->writeString(_iter13->first); - xfer += oprot->writeString(_iter13->second); + xfer += oprot->writeString(_iter45->first); + xfer += oprot->writeString(_iter45->second); } xfer += oprot->writeMapEnd(); } @@ -415,17 +698,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size14; - ::apache::thrift::protocol::TType _ktype15; - ::apache::thrift::protocol::TType _vtype16; - iprot->readMapBegin(_ktype15, _vtype16, _size14); - uint32_t _i18; - for (_i18 = 0; _i18 < _size14; ++_i18) + uint32_t _size46; + ::apache::thrift::protocol::TType _ktype47; + ::apache::thrift::protocol::TType _vtype48; + iprot->readMapBegin(_ktype47, _vtype48, _size46); + uint32_t _i50; + for (_i50 = 0; _i50 < _size46; ++_i50) { - std::string _key19; - xfer += iprot->readString(_key19); - std::string& _val20 = this->parameters[_key19]; - xfer += iprot->readString(_val20); + std::string _key51; + xfer += iprot->readString(_key51); + std::string& _val52 = this->parameters[_key51]; + xfer += iprot->readString(_val52); } iprot->readMapEnd(); } @@ -458,11 +741,11 @@ xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); - std::map ::const_iterator _iter21; - for (_iter21 = this->parameters.begin(); _iter21 != this->parameters.end(); ++_iter21) + std::map ::const_iterator _iter53; + for (_iter53 = this->parameters.begin(); _iter53 != this->parameters.end(); ++_iter53) { - xfer += oprot->writeString(_iter21->first); - xfer += oprot->writeString(_iter21->second); + xfer += oprot->writeString(_iter53->first); + xfer += oprot->writeString(_iter53->second); } xfer += oprot->writeMapEnd(); } @@ -564,14 +847,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->cols.clear(); - uint32_t _size22; - ::apache::thrift::protocol::TType _etype25; - iprot->readListBegin(_etype25, _size22); - this->cols.resize(_size22); - uint32_t _i26; - for (_i26 = 0; _i26 < _size22; ++_i26) + uint32_t _size54; + ::apache::thrift::protocol::TType _etype57; + iprot->readListBegin(_etype57, _size54); + this->cols.resize(_size54); + uint32_t _i58; + for (_i58 = 0; _i58 < _size54; ++_i58) { - xfer += this->cols[_i26].read(iprot); + xfer += this->cols[_i58].read(iprot); } iprot->readListEnd(); } @@ -632,14 +915,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->bucketCols.clear(); - uint32_t _size27; - ::apache::thrift::protocol::TType _etype30; - iprot->readListBegin(_etype30, _size27); - this->bucketCols.resize(_size27); - uint32_t _i31; - for (_i31 = 0; _i31 < _size27; ++_i31) + uint32_t _size59; + ::apache::thrift::protocol::TType _etype62; + iprot->readListBegin(_etype62, _size59); + this->bucketCols.resize(_size59); + uint32_t _i63; + for (_i63 = 0; _i63 < _size59; ++_i63) { - xfer += iprot->readString(this->bucketCols[_i31]); + xfer += iprot->readString(this->bucketCols[_i63]); } iprot->readListEnd(); } @@ -652,14 +935,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->sortCols.clear(); - uint32_t _size32; - ::apache::thrift::protocol::TType _etype35; - iprot->readListBegin(_etype35, _size32); - this->sortCols.resize(_size32); - uint32_t _i36; - for (_i36 = 0; _i36 < _size32; ++_i36) + uint32_t _size64; + ::apache::thrift::protocol::TType _etype67; + iprot->readListBegin(_etype67, _size64); + this->sortCols.resize(_size64); + uint32_t _i68; + for (_i68 = 0; _i68 < _size64; ++_i68) { - xfer += this->sortCols[_i36].read(iprot); + xfer += this->sortCols[_i68].read(iprot); } iprot->readListEnd(); } @@ -672,17 +955,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size37; - ::apache::thrift::protocol::TType _ktype38; - ::apache::thrift::protocol::TType _vtype39; - iprot->readMapBegin(_ktype38, _vtype39, _size37); - uint32_t _i41; - for (_i41 = 0; _i41 < _size37; ++_i41) + uint32_t _size69; + ::apache::thrift::protocol::TType _ktype70; + ::apache::thrift::protocol::TType _vtype71; + iprot->readMapBegin(_ktype70, _vtype71, _size69); + uint32_t _i73; + for (_i73 = 0; _i73 < _size69; ++_i73) { - std::string _key42; - xfer += iprot->readString(_key42); - std::string& _val43 = this->parameters[_key42]; - xfer += iprot->readString(_val43); + std::string _key74; + xfer += iprot->readString(_key74); + std::string& _val75 = this->parameters[_key74]; + xfer += iprot->readString(_val75); } iprot->readMapEnd(); } @@ -709,10 +992,10 @@ xfer += oprot->writeFieldBegin("cols", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->cols.size()); - std::vector ::const_iterator _iter44; - for (_iter44 = this->cols.begin(); _iter44 != this->cols.end(); ++_iter44) + std::vector ::const_iterator _iter76; + for (_iter76 = this->cols.begin(); _iter76 != this->cols.end(); ++_iter76) { - xfer += (*_iter44).write(oprot); + xfer += (*_iter76).write(oprot); } xfer += oprot->writeListEnd(); } @@ -738,10 +1021,10 @@ xfer += oprot->writeFieldBegin("bucketCols", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->bucketCols.size()); - std::vector ::const_iterator _iter45; - for (_iter45 = this->bucketCols.begin(); _iter45 != this->bucketCols.end(); ++_iter45) + std::vector ::const_iterator _iter77; + for (_iter77 = this->bucketCols.begin(); _iter77 != this->bucketCols.end(); ++_iter77) { - xfer += oprot->writeString((*_iter45)); + xfer += oprot->writeString((*_iter77)); } xfer += oprot->writeListEnd(); } @@ -749,10 +1032,10 @@ xfer += oprot->writeFieldBegin("sortCols", ::apache::thrift::protocol::T_LIST, 9); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->sortCols.size()); - std::vector ::const_iterator _iter46; - for (_iter46 = this->sortCols.begin(); _iter46 != this->sortCols.end(); ++_iter46) + std::vector ::const_iterator _iter78; + for (_iter78 = this->sortCols.begin(); _iter78 != this->sortCols.end(); ++_iter78) { - xfer += (*_iter46).write(oprot); + xfer += (*_iter78).write(oprot); } xfer += oprot->writeListEnd(); } @@ -760,11 +1043,11 @@ xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 10); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); - std::map ::const_iterator _iter47; - for (_iter47 = this->parameters.begin(); _iter47 != this->parameters.end(); ++_iter47) + std::map ::const_iterator _iter79; + for (_iter79 = this->parameters.begin(); _iter79 != this->parameters.end(); ++_iter79) { - xfer += oprot->writeString(_iter47->first); - xfer += oprot->writeString(_iter47->second); + xfer += oprot->writeString(_iter79->first); + xfer += oprot->writeString(_iter79->second); } xfer += oprot->writeMapEnd(); } @@ -774,8 +1057,8 @@ return xfer; } -const char* Table::ascii_fingerprint = "F709D087CEEE7C49380296E3B423FF76"; -const uint8_t Table::binary_fingerprint[16] = {0xF7,0x09,0xD0,0x87,0xCE,0xEE,0x7C,0x49,0x38,0x02,0x96,0xE3,0xB4,0x23,0xFF,0x76}; +const char* Table::ascii_fingerprint = "E44C9688A4F33F1009F68AA63B2A80B2"; +const uint8_t Table::binary_fingerprint[16] = {0xE4,0x4C,0x96,0x88,0xA4,0xF3,0x3F,0x10,0x09,0xF6,0x8A,0xA6,0x3B,0x2A,0x80,0xB2}; uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -857,14 +1140,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partitionKeys.clear(); - uint32_t _size48; - ::apache::thrift::protocol::TType _etype51; - iprot->readListBegin(_etype51, _size48); - this->partitionKeys.resize(_size48); - uint32_t _i52; - for (_i52 = 0; _i52 < _size48; ++_i52) + uint32_t _size80; + ::apache::thrift::protocol::TType _etype83; + iprot->readListBegin(_etype83, _size80); + this->partitionKeys.resize(_size80); + uint32_t _i84; + for (_i84 = 0; _i84 < _size80; ++_i84) { - xfer += this->partitionKeys[_i52].read(iprot); + xfer += this->partitionKeys[_i84].read(iprot); } iprot->readListEnd(); } @@ -877,17 +1160,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size53; - ::apache::thrift::protocol::TType _ktype54; - ::apache::thrift::protocol::TType _vtype55; - iprot->readMapBegin(_ktype54, _vtype55, _size53); - uint32_t _i57; - for (_i57 = 0; _i57 < _size53; ++_i57) + uint32_t _size85; + ::apache::thrift::protocol::TType _ktype86; + ::apache::thrift::protocol::TType _vtype87; + iprot->readMapBegin(_ktype86, _vtype87, _size85); + uint32_t _i89; + for (_i89 = 0; _i89 < _size85; ++_i89) { - std::string _key58; - xfer += iprot->readString(_key58); - std::string& _val59 = this->parameters[_key58]; - xfer += iprot->readString(_val59); + std::string _key90; + xfer += iprot->readString(_key90); + std::string& _val91 = this->parameters[_key90]; + xfer += iprot->readString(_val91); } iprot->readMapEnd(); } @@ -920,6 +1203,14 @@ xfer += iprot->skip(ftype); } break; + case 13: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -959,10 +1250,10 @@ xfer += oprot->writeFieldBegin("partitionKeys", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->partitionKeys.size()); - std::vector ::const_iterator _iter60; - for (_iter60 = this->partitionKeys.begin(); _iter60 != this->partitionKeys.end(); ++_iter60) + std::vector ::const_iterator _iter92; + for (_iter92 = this->partitionKeys.begin(); _iter92 != this->partitionKeys.end(); ++_iter92) { - xfer += (*_iter60).write(oprot); + xfer += (*_iter92).write(oprot); } xfer += oprot->writeListEnd(); } @@ -970,11 +1261,11 @@ xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); - std::map ::const_iterator _iter61; - for (_iter61 = this->parameters.begin(); _iter61 != this->parameters.end(); ++_iter61) + std::map ::const_iterator _iter93; + for (_iter93 = this->parameters.begin(); _iter93 != this->parameters.end(); ++_iter93) { - xfer += oprot->writeString(_iter61->first); - xfer += oprot->writeString(_iter61->second); + xfer += oprot->writeString(_iter93->first); + xfer += oprot->writeString(_iter93->second); } xfer += oprot->writeMapEnd(); } @@ -988,13 +1279,18 @@ xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 12); xfer += oprot->writeString(this->tableType); xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 13); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -const char* Partition::ascii_fingerprint = "E5EDC507CBBC5F6F81AAC4845B38F51B"; -const uint8_t Partition::binary_fingerprint[16] = {0xE5,0xED,0xC5,0x07,0xCB,0xBC,0x5F,0x6F,0x81,0xAA,0xC4,0x84,0x5B,0x38,0xF5,0x1B}; +const char* Partition::ascii_fingerprint = "7CEC6C72B8BFA98B78CDA30BF9200E2B"; +const uint8_t Partition::binary_fingerprint[16] = {0x7C,0xEC,0x6C,0x72,0xB8,0xBF,0xA9,0x8B,0x78,0xCD,0xA3,0x0B,0xF9,0x20,0x0E,0x2B}; uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -1020,14 +1316,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->values.clear(); - uint32_t _size62; - ::apache::thrift::protocol::TType _etype65; - iprot->readListBegin(_etype65, _size62); - this->values.resize(_size62); - uint32_t _i66; - for (_i66 = 0; _i66 < _size62; ++_i66) + uint32_t _size94; + ::apache::thrift::protocol::TType _etype97; + iprot->readListBegin(_etype97, _size94); + this->values.resize(_size94); + uint32_t _i98; + for (_i98 = 0; _i98 < _size94; ++_i98) { - xfer += iprot->readString(this->values[_i66]); + xfer += iprot->readString(this->values[_i98]); } iprot->readListEnd(); } @@ -1080,17 +1376,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size67; - ::apache::thrift::protocol::TType _ktype68; - ::apache::thrift::protocol::TType _vtype69; - iprot->readMapBegin(_ktype68, _vtype69, _size67); - uint32_t _i71; - for (_i71 = 0; _i71 < _size67; ++_i71) + uint32_t _size99; + ::apache::thrift::protocol::TType _ktype100; + ::apache::thrift::protocol::TType _vtype101; + iprot->readMapBegin(_ktype100, _vtype101, _size99); + uint32_t _i103; + for (_i103 = 0; _i103 < _size99; ++_i103) { - std::string _key72; - xfer += iprot->readString(_key72); - std::string& _val73 = this->parameters[_key72]; - xfer += iprot->readString(_val73); + std::string _key104; + xfer += iprot->readString(_key104); + std::string& _val105 = this->parameters[_key104]; + xfer += iprot->readString(_val105); } iprot->readMapEnd(); } @@ -1099,6 +1395,14 @@ xfer += iprot->skip(ftype); } break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -1117,10 +1421,10 @@ xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->values.size()); - std::vector ::const_iterator _iter74; - for (_iter74 = this->values.begin(); _iter74 != this->values.end(); ++_iter74) + std::vector ::const_iterator _iter106; + for (_iter106 = this->values.begin(); _iter106 != this->values.end(); ++_iter106) { - xfer += oprot->writeString((*_iter74)); + xfer += oprot->writeString((*_iter106)); } xfer += oprot->writeListEnd(); } @@ -1143,15 +1447,20 @@ xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 7); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); - std::map ::const_iterator _iter75; - for (_iter75 = this->parameters.begin(); _iter75 != this->parameters.end(); ++_iter75) + std::map ::const_iterator _iter107; + for (_iter107 = this->parameters.begin(); _iter107 != this->parameters.end(); ++_iter107) { - xfer += oprot->writeString(_iter75->first); - xfer += oprot->writeString(_iter75->second); + xfer += oprot->writeString(_iter107->first); + xfer += oprot->writeString(_iter107->second); } xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 8); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1248,17 +1557,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size76; - ::apache::thrift::protocol::TType _ktype77; - ::apache::thrift::protocol::TType _vtype78; - iprot->readMapBegin(_ktype77, _vtype78, _size76); - uint32_t _i80; - for (_i80 = 0; _i80 < _size76; ++_i80) + uint32_t _size108; + ::apache::thrift::protocol::TType _ktype109; + ::apache::thrift::protocol::TType _vtype110; + iprot->readMapBegin(_ktype109, _vtype110, _size108); + uint32_t _i112; + for (_i112 = 0; _i112 < _size108; ++_i112) { - std::string _key81; - xfer += iprot->readString(_key81); - std::string& _val82 = this->parameters[_key81]; - xfer += iprot->readString(_val82); + std::string _key113; + xfer += iprot->readString(_key113); + std::string& _val114 = this->parameters[_key113]; + xfer += iprot->readString(_val114); } iprot->readMapEnd(); } @@ -1317,11 +1626,11 @@ xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); - std::map ::const_iterator _iter83; - for (_iter83 = this->parameters.begin(); _iter83 != this->parameters.end(); ++_iter83) + std::map ::const_iterator _iter115; + for (_iter115 = this->parameters.begin(); _iter115 != this->parameters.end(); ++_iter115) { - xfer += oprot->writeString(_iter83->first); - xfer += oprot->writeString(_iter83->second); + xfer += oprot->writeString(_iter115->first); + xfer += oprot->writeString(_iter115->second); } xfer += oprot->writeMapEnd(); } @@ -1361,14 +1670,14 @@ if (ftype == ::apache::thrift::protocol::T_LIST) { { this->fieldSchemas.clear(); - uint32_t _size84; - ::apache::thrift::protocol::TType _etype87; - iprot->readListBegin(_etype87, _size84); - this->fieldSchemas.resize(_size84); - uint32_t _i88; - for (_i88 = 0; _i88 < _size84; ++_i88) + uint32_t _size116; + ::apache::thrift::protocol::TType _etype119; + iprot->readListBegin(_etype119, _size116); + this->fieldSchemas.resize(_size116); + uint32_t _i120; + for (_i120 = 0; _i120 < _size116; ++_i120) { - xfer += this->fieldSchemas[_i88].read(iprot); + xfer += this->fieldSchemas[_i120].read(iprot); } iprot->readListEnd(); } @@ -1381,17 +1690,17 @@ if (ftype == ::apache::thrift::protocol::T_MAP) { { this->properties.clear(); - uint32_t _size89; - ::apache::thrift::protocol::TType _ktype90; - ::apache::thrift::protocol::TType _vtype91; - iprot->readMapBegin(_ktype90, _vtype91, _size89); - uint32_t _i93; - for (_i93 = 0; _i93 < _size89; ++_i93) + uint32_t _size121; + ::apache::thrift::protocol::TType _ktype122; + ::apache::thrift::protocol::TType _vtype123; + iprot->readMapBegin(_ktype122, _vtype123, _size121); + uint32_t _i125; + for (_i125 = 0; _i125 < _size121; ++_i125) { - std::string _key94; - xfer += iprot->readString(_key94); - std::string& _val95 = this->properties[_key94]; - xfer += iprot->readString(_val95); + std::string _key126; + xfer += iprot->readString(_key126); + std::string& _val127 = this->properties[_key126]; + xfer += iprot->readString(_val127); } iprot->readMapEnd(); } @@ -1418,10 +1727,10 @@ xfer += oprot->writeFieldBegin("fieldSchemas", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->fieldSchemas.size()); - std::vector ::const_iterator _iter96; - for (_iter96 = this->fieldSchemas.begin(); _iter96 != this->fieldSchemas.end(); ++_iter96) + std::vector ::const_iterator _iter128; + for (_iter128 = this->fieldSchemas.begin(); _iter128 != this->fieldSchemas.end(); ++_iter128) { - xfer += (*_iter96).write(oprot); + xfer += (*_iter128).write(oprot); } xfer += oprot->writeListEnd(); } @@ -1429,11 +1738,11 @@ xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->properties.size()); - std::map ::const_iterator _iter97; - for (_iter97 = this->properties.begin(); _iter97 != this->properties.end(); ++_iter97) + std::map ::const_iterator _iter129; + for (_iter129 = this->properties.begin(); _iter129 != this->properties.end(); ++_iter129) { - xfer += oprot->writeString(_iter97->first); - xfer += oprot->writeString(_iter97->second); + xfer += oprot->writeString(_iter129->first); + xfer += oprot->writeString(_iter129->second); } xfer += oprot->writeMapEnd(); } @@ -1443,10 +1752,10 @@ return xfer; } -const char* MetaException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; -const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; +const char* ColumnPrivilegeBag::ascii_fingerprint = "DD4B1A6F6F2E9C90B0A41B314EF1753F"; +const uint8_t ColumnPrivilegeBag::binary_fingerprint[16] = {0xDD,0x4B,0x1A,0x6F,0x6F,0x2E,0x9C,0x90,0xB0,0xA4,0x1B,0x31,0x4E,0xF1,0x75,0x3F}; -uint32_t MetaException::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ColumnPrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -1468,8 +1777,47 @@ { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partitionName); + this->__isset.partitionName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->columnPrivileges.clear(); + uint32_t _size130; + ::apache::thrift::protocol::TType _ktype131; + ::apache::thrift::protocol::TType _vtype132; + iprot->readMapBegin(_ktype131, _vtype132, _size130); + uint32_t _i134; + for (_i134 = 0; _i134 < _size130; ++_i134) + { + std::string _key135; + xfer += iprot->readString(_key135); + std::string& _val136 = this->columnPrivileges[_key135]; + xfer += iprot->readString(_val136); + } + iprot->readMapEnd(); + } + this->__isset.columnPrivileges = true; } else { xfer += iprot->skip(ftype); } @@ -1486,11 +1834,775 @@ return xfer; } -uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ColumnPrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("MetaException"); - xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->message); + xfer += oprot->writeStructBegin("ColumnPrivilegeBag"); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partitionName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->partitionName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnPrivileges", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->columnPrivileges.size()); + std::map ::const_iterator _iter137; + for (_iter137 = this->columnPrivileges.begin(); _iter137 != this->columnPrivileges.end(); ++_iter137) + { + xfer += oprot->writeString(_iter137->first); + xfer += oprot->writeString(_iter137->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* PrivilegeBag::ascii_fingerprint = "B51C6912EEEA2407866841A7550AD4BD"; +const uint8_t PrivilegeBag::binary_fingerprint[16] = {0xB5,0x1C,0x69,0x12,0xEE,0xEA,0x24,0x07,0x86,0x68,0x41,0xA7,0x55,0x0A,0xD4,0xBD}; + +uint32_t PrivilegeBag::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_STRING) { + xfer += iprot->readString(this->userPrivileges); + this->__isset.userPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->dbPrivileges.clear(); + uint32_t _size138; + ::apache::thrift::protocol::TType _ktype139; + ::apache::thrift::protocol::TType _vtype140; + iprot->readMapBegin(_ktype139, _vtype140, _size138); + uint32_t _i142; + for (_i142 = 0; _i142 < _size138; ++_i142) + { + Database _key143; + xfer += _key143.read(iprot); + std::string& _val144 = this->dbPrivileges[_key143]; + xfer += iprot->readString(_val144); + } + iprot->readMapEnd(); + } + this->__isset.dbPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->tablePrivileges.clear(); + uint32_t _size145; + ::apache::thrift::protocol::TType _ktype146; + ::apache::thrift::protocol::TType _vtype147; + iprot->readMapBegin(_ktype146, _vtype147, _size145); + uint32_t _i149; + for (_i149 = 0; _i149 < _size145; ++_i149) + { + Table _key150; + xfer += _key150.read(iprot); + std::string& _val151 = this->tablePrivileges[_key150]; + xfer += iprot->readString(_val151); + } + iprot->readMapEnd(); + } + this->__isset.tablePrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->partitionPrivileges.clear(); + uint32_t _size152; + ::apache::thrift::protocol::TType _ktype153; + ::apache::thrift::protocol::TType _vtype154; + iprot->readMapBegin(_ktype153, _vtype154, _size152); + uint32_t _i156; + for (_i156 = 0; _i156 < _size152; ++_i156) + { + Partition _key157; + xfer += _key157.read(iprot); + std::string& _val158 = this->partitionPrivileges[_key157]; + xfer += iprot->readString(_val158); + } + iprot->readMapEnd(); + } + this->__isset.partitionPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columnPrivileges.clear(); + uint32_t _size159; + ::apache::thrift::protocol::TType _etype162; + iprot->readListBegin(_etype162, _size159); + this->columnPrivileges.resize(_size159); + uint32_t _i163; + for (_i163 = 0; _i163 < _size159; ++_i163) + { + xfer += this->columnPrivileges[_i163].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.columnPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("PrivilegeBag"); + xfer += oprot->writeFieldBegin("userPrivileges", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->userPrivileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbPrivileges", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_STRING, this->dbPrivileges.size()); + std::map ::const_iterator _iter164; + for (_iter164 = this->dbPrivileges.begin(); _iter164 != this->dbPrivileges.end(); ++_iter164) + { + xfer += _iter164->first.write(oprot); + xfer += oprot->writeString(_iter164->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tablePrivileges", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_STRING, this->tablePrivileges.size()); + std::map ::const_iterator _iter165; + for (_iter165 = this->tablePrivileges.begin(); _iter165 != this->tablePrivileges.end(); ++_iter165) + { + xfer += _iter165->first.write(oprot); + xfer += oprot->writeString(_iter165->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partitionPrivileges", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRUCT, ::apache::thrift::protocol::T_STRING, this->partitionPrivileges.size()); + std::map ::const_iterator _iter166; + for (_iter166 = this->partitionPrivileges.begin(); _iter166 != this->partitionPrivileges.end(); ++_iter166) + { + xfer += _iter166->first.write(oprot); + xfer += oprot->writeString(_iter166->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnPrivileges", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->columnPrivileges.size()); + std::vector ::const_iterator _iter167; + for (_iter167 = this->columnPrivileges.begin(); _iter167 != this->columnPrivileges.end(); ++_iter167) + { + xfer += (*_iter167).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* SecurityUser::ascii_fingerprint = "B11DF433B5FE0219667D916D487E926C"; +const uint8_t SecurityUser::binary_fingerprint[16] = {0xB1,0x1D,0xF4,0x33,0xB5,0xFE,0x02,0x19,0x66,0x7D,0x91,0x6D,0x48,0x7E,0x92,0x6C}; + +uint32_t SecurityUser::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_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isRole); + this->__isset.isRole = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isGroup); + this->__isset.isGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privileges); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SecurityUser::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("SecurityUser"); + xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isRole", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isRole); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isGroup", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->isGroup); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->privileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* SecurityDB::ascii_fingerprint = "F98449F39F7B7241F9DCF374EAE863D6"; +const uint8_t SecurityDB::binary_fingerprint[16] = {0xF9,0x84,0x49,0xF3,0x9F,0x7B,0x72,0x41,0xF9,0xDC,0xF3,0x74,0xEA,0xE8,0x63,0xD6}; + +uint32_t SecurityDB::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_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isRole); + this->__isset.isRole = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isGroup); + this->__isset.isGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privileges); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->db.read(iprot); + this->__isset.db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SecurityDB::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("SecurityDB"); + xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isRole", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isRole); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isGroup", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->isGroup); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->privileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->db.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* SecurityTablePartition::ascii_fingerprint = "41D62E7CEC2A7ACFF83979B3CC82EB5F"; +const uint8_t SecurityTablePartition::binary_fingerprint[16] = {0x41,0xD6,0x2E,0x7C,0xEC,0x2A,0x7A,0xCF,0xF8,0x39,0x79,0xB3,0xCC,0x82,0xEB,0x5F}; + +uint32_t SecurityTablePartition::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_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isRole); + this->__isset.isRole = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isGroup); + this->__isset.isGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privileges); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->table.read(iprot); + this->__isset.table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->part.read(iprot); + this->__isset.part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SecurityTablePartition::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("SecurityTablePartition"); + xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isRole", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isRole); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isGroup", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->isGroup); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->privileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->table.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part", ::apache::thrift::protocol::T_STRUCT, 8); + xfer += this->part.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* SecurityColumn::ascii_fingerprint = "75916612792AFA6A3799E96DE9395806"; +const uint8_t SecurityColumn::binary_fingerprint[16] = {0x75,0x91,0x66,0x12,0x79,0x2A,0xFA,0x6A,0x37,0x99,0xE9,0x6D,0xE9,0x39,0x58,0x06}; + +uint32_t SecurityColumn::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_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isRole); + this->__isset.isRole = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isGroup); + this->__isset.isGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privileges); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->table.read(iprot); + this->__isset.table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->partition.read(iprot); + this->__isset.partition = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SecurityColumn::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("SecurityColumn"); + xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isRole", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isRole); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isGroup", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->isGroup); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->privileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table", ::apache::thrift::protocol::T_STRUCT, 7); + xfer += this->table.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition", ::apache::thrift::protocol::T_STRUCT, 8); + xfer += this->partition.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 9); + xfer += oprot->writeString(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* MetaException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; +const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + +uint32_t MetaException::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_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("MetaException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (revision 1044070) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (working copy) @@ -157,19 +157,65 @@ }; +typedef struct _PrincipalPrivilegeSet__isset { + _PrincipalPrivilegeSet__isset() : userPrivileges(false), groupPrivileges(false), rolePrivileges(false) {} + bool userPrivileges; + bool groupPrivileges; + bool rolePrivileges; +} _PrincipalPrivilegeSet__isset; + +class PrincipalPrivilegeSet { + public: + + static const char* ascii_fingerprint; // = "690D0C3B9BE6244BBC25229B4C7ED166"; + static const uint8_t binary_fingerprint[16]; // = {0x69,0x0D,0x0C,0x3B,0x9B,0xE6,0x24,0x4B,0xBC,0x25,0x22,0x9B,0x4C,0x7E,0xD1,0x66}; + + PrincipalPrivilegeSet() { + } + + virtual ~PrincipalPrivilegeSet() throw() {} + + std::map userPrivileges; + std::map groupPrivileges; + std::map rolePrivileges; + + _PrincipalPrivilegeSet__isset __isset; + + bool operator == (const PrincipalPrivilegeSet & rhs) const + { + if (!(userPrivileges == rhs.userPrivileges)) + return false; + if (!(groupPrivileges == rhs.groupPrivileges)) + return false; + if (!(rolePrivileges == rhs.rolePrivileges)) + return false; + return true; + } + bool operator != (const PrincipalPrivilegeSet &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrincipalPrivilegeSet & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + typedef struct _Database__isset { - _Database__isset() : name(false), description(false), locationUri(false), parameters(false) {} + _Database__isset() : name(false), description(false), locationUri(false), parameters(false), privileges(false) {} bool name; bool description; bool locationUri; bool parameters; + bool privileges; } _Database__isset; class Database { public: - static const char* ascii_fingerprint; // = "DD4B1A6F6F2E9C90B0A41B314EF1753F"; - static const uint8_t binary_fingerprint[16]; // = {0xDD,0x4B,0x1A,0x6F,0x6F,0x2E,0x9C,0x90,0xB0,0xA4,0x1B,0x31,0x4E,0xF1,0x75,0x3F}; + static const char* ascii_fingerprint; // = "6CC121391244867897DCE8893D009926"; + static const uint8_t binary_fingerprint[16]; // = {0x6C,0xC1,0x21,0x39,0x12,0x44,0x86,0x78,0x97,0xDC,0xE8,0x89,0x3D,0x00,0x99,0x26}; Database() : name(""), description(""), locationUri("") { } @@ -180,6 +226,7 @@ std::string description; std::string locationUri; std::map parameters; + PrincipalPrivilegeSet privileges; _Database__isset __isset; @@ -193,6 +240,10 @@ return false; if (!(parameters == rhs.parameters)) return false; + if (__isset.privileges != rhs.__isset.privileges) + return false; + else if (__isset.privileges && !(privileges == rhs.privileges)) + return false; return true; } bool operator != (const Database &rhs) const { @@ -206,6 +257,59 @@ }; +typedef struct _Role__isset { + _Role__isset() : roleName(false), database(false), createTime(false), ownerName(false), parameters(false) {} + bool roleName; + bool database; + bool createTime; + bool ownerName; + bool parameters; +} _Role__isset; + +class Role { + public: + + static const char* ascii_fingerprint; // = "7FEEBBD9DBA0117DC0464E28682DD118"; + static const uint8_t binary_fingerprint[16]; // = {0x7F,0xEE,0xBB,0xD9,0xDB,0xA0,0x11,0x7D,0xC0,0x46,0x4E,0x28,0x68,0x2D,0xD1,0x18}; + + Role() : roleName(""), createTime(0), ownerName("") { + } + + virtual ~Role() throw() {} + + std::string roleName; + Database database; + int32_t createTime; + std::string ownerName; + std::map parameters; + + _Role__isset __isset; + + bool operator == (const Role & rhs) const + { + if (!(roleName == rhs.roleName)) + return false; + if (!(database == rhs.database)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(ownerName == rhs.ownerName)) + return false; + if (!(parameters == rhs.parameters)) + return false; + return true; + } + bool operator != (const Role &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Role & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + typedef struct _SerDeInfo__isset { _SerDeInfo__isset() : name(false), serializationLib(false), parameters(false) {} bool name; @@ -366,7 +470,7 @@ }; typedef struct _Table__isset { - _Table__isset() : tableName(false), dbName(false), owner(false), createTime(false), lastAccessTime(false), retention(false), sd(false), partitionKeys(false), parameters(false), viewOriginalText(false), viewExpandedText(false), tableType(false) {} + _Table__isset() : tableName(false), dbName(false), owner(false), createTime(false), lastAccessTime(false), retention(false), sd(false), partitionKeys(false), parameters(false), viewOriginalText(false), viewExpandedText(false), tableType(false), privileges(false) {} bool tableName; bool dbName; bool owner; @@ -379,13 +483,14 @@ bool viewOriginalText; bool viewExpandedText; bool tableType; + bool privileges; } _Table__isset; class Table { public: - static const char* ascii_fingerprint; // = "F709D087CEEE7C49380296E3B423FF76"; - static const uint8_t binary_fingerprint[16]; // = {0xF7,0x09,0xD0,0x87,0xCE,0xEE,0x7C,0x49,0x38,0x02,0x96,0xE3,0xB4,0x23,0xFF,0x76}; + static const char* ascii_fingerprint; // = "E44C9688A4F33F1009F68AA63B2A80B2"; + static const uint8_t binary_fingerprint[16]; // = {0xE4,0x4C,0x96,0x88,0xA4,0xF3,0x3F,0x10,0x09,0xF6,0x8A,0xA6,0x3B,0x2A,0x80,0xB2}; Table() : tableName(""), dbName(""), owner(""), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(""), viewExpandedText(""), tableType("") { } @@ -404,6 +509,7 @@ std::string viewOriginalText; std::string viewExpandedText; std::string tableType; + PrincipalPrivilegeSet privileges; _Table__isset __isset; @@ -433,6 +539,10 @@ return false; if (!(tableType == rhs.tableType)) return false; + if (__isset.privileges != rhs.__isset.privileges) + return false; + else if (__isset.privileges && !(privileges == rhs.privileges)) + return false; return true; } bool operator != (const Table &rhs) const { @@ -447,7 +557,7 @@ }; typedef struct _Partition__isset { - _Partition__isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false) {} + _Partition__isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false), privileges(false) {} bool values; bool dbName; bool tableName; @@ -455,13 +565,14 @@ bool lastAccessTime; bool sd; bool parameters; + bool privileges; } _Partition__isset; class Partition { public: - static const char* ascii_fingerprint; // = "E5EDC507CBBC5F6F81AAC4845B38F51B"; - static const uint8_t binary_fingerprint[16]; // = {0xE5,0xED,0xC5,0x07,0xCB,0xBC,0x5F,0x6F,0x81,0xAA,0xC4,0x84,0x5B,0x38,0xF5,0x1B}; + static const char* ascii_fingerprint; // = "7CEC6C72B8BFA98B78CDA30BF9200E2B"; + static const uint8_t binary_fingerprint[16]; // = {0x7C,0xEC,0x6C,0x72,0xB8,0xBF,0xA9,0x8B,0x78,0xCD,0xA3,0x0B,0xF9,0x20,0x0E,0x2B}; Partition() : dbName(""), tableName(""), createTime(0), lastAccessTime(0) { } @@ -475,6 +586,7 @@ int32_t lastAccessTime; StorageDescriptor sd; std::map parameters; + PrincipalPrivilegeSet privileges; _Partition__isset __isset; @@ -494,6 +606,10 @@ return false; if (!(parameters == rhs.parameters)) return false; + if (__isset.privileges != rhs.__isset.privileges) + return false; + else if (__isset.privileges && !(privileges == rhs.privileges)) + return false; return true; } bool operator != (const Partition &rhs) const { @@ -621,6 +737,360 @@ }; +typedef struct _ColumnPrivilegeBag__isset { + _ColumnPrivilegeBag__isset() : dbName(false), tableName(false), partitionName(false), columnPrivileges(false) {} + bool dbName; + bool tableName; + bool partitionName; + bool columnPrivileges; +} _ColumnPrivilegeBag__isset; + +class ColumnPrivilegeBag { + public: + + static const char* ascii_fingerprint; // = "DD4B1A6F6F2E9C90B0A41B314EF1753F"; + static const uint8_t binary_fingerprint[16]; // = {0xDD,0x4B,0x1A,0x6F,0x6F,0x2E,0x9C,0x90,0xB0,0xA4,0x1B,0x31,0x4E,0xF1,0x75,0x3F}; + + ColumnPrivilegeBag() : dbName(""), tableName(""), partitionName("") { + } + + virtual ~ColumnPrivilegeBag() throw() {} + + std::string dbName; + std::string tableName; + std::string partitionName; + std::map columnPrivileges; + + _ColumnPrivilegeBag__isset __isset; + + bool operator == (const ColumnPrivilegeBag & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(partitionName == rhs.partitionName)) + return false; + if (!(columnPrivileges == rhs.columnPrivileges)) + return false; + return true; + } + bool operator != (const ColumnPrivilegeBag &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnPrivilegeBag & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _PrivilegeBag__isset { + _PrivilegeBag__isset() : userPrivileges(false), dbPrivileges(false), tablePrivileges(false), partitionPrivileges(false), columnPrivileges(false) {} + bool userPrivileges; + bool dbPrivileges; + bool tablePrivileges; + bool partitionPrivileges; + bool columnPrivileges; +} _PrivilegeBag__isset; + +class PrivilegeBag { + public: + + static const char* ascii_fingerprint; // = "B51C6912EEEA2407866841A7550AD4BD"; + static const uint8_t binary_fingerprint[16]; // = {0xB5,0x1C,0x69,0x12,0xEE,0xEA,0x24,0x07,0x86,0x68,0x41,0xA7,0x55,0x0A,0xD4,0xBD}; + + PrivilegeBag() : userPrivileges("") { + } + + virtual ~PrivilegeBag() throw() {} + + std::string userPrivileges; + std::map dbPrivileges; + std::map tablePrivileges; + std::map partitionPrivileges; + std::vector columnPrivileges; + + _PrivilegeBag__isset __isset; + + bool operator == (const PrivilegeBag & rhs) const + { + if (!(userPrivileges == rhs.userPrivileges)) + return false; + if (!(dbPrivileges == rhs.dbPrivileges)) + return false; + if (!(tablePrivileges == rhs.tablePrivileges)) + return false; + if (!(partitionPrivileges == rhs.partitionPrivileges)) + return false; + if (!(columnPrivileges == rhs.columnPrivileges)) + return false; + return true; + } + bool operator != (const PrivilegeBag &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrivilegeBag & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _SecurityUser__isset { + _SecurityUser__isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; +} _SecurityUser__isset; + +class SecurityUser { + public: + + static const char* ascii_fingerprint; // = "B11DF433B5FE0219667D916D487E926C"; + static const uint8_t binary_fingerprint[16]; // = {0xB1,0x1D,0xF4,0x33,0xB5,0xFE,0x02,0x19,0x66,0x7D,0x91,0x6D,0x48,0x7E,0x92,0x6C}; + + SecurityUser() : principalName(""), isRole(0), isGroup(0), privileges(""), createTime(0), grantor("") { + } + + virtual ~SecurityUser() throw() {} + + std::string principalName; + bool isRole; + bool isGroup; + std::string privileges; + int32_t createTime; + std::string grantor; + + _SecurityUser__isset __isset; + + bool operator == (const SecurityUser & rhs) const + { + if (!(principalName == rhs.principalName)) + return false; + if (!(isRole == rhs.isRole)) + return false; + if (!(isGroup == rhs.isGroup)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + return true; + } + bool operator != (const SecurityUser &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SecurityUser & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _SecurityDB__isset { + _SecurityDB__isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false), db(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; + bool db; +} _SecurityDB__isset; + +class SecurityDB { + public: + + static const char* ascii_fingerprint; // = "F98449F39F7B7241F9DCF374EAE863D6"; + static const uint8_t binary_fingerprint[16]; // = {0xF9,0x84,0x49,0xF3,0x9F,0x7B,0x72,0x41,0xF9,0xDC,0xF3,0x74,0xEA,0xE8,0x63,0xD6}; + + SecurityDB() : principalName(""), isRole(0), isGroup(0), privileges(""), createTime(0), grantor("") { + } + + virtual ~SecurityDB() throw() {} + + std::string principalName; + bool isRole; + bool isGroup; + std::string privileges; + int32_t createTime; + std::string grantor; + Database db; + + _SecurityDB__isset __isset; + + bool operator == (const SecurityDB & rhs) const + { + if (!(principalName == rhs.principalName)) + return false; + if (!(isRole == rhs.isRole)) + return false; + if (!(isGroup == rhs.isGroup)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(db == rhs.db)) + return false; + return true; + } + bool operator != (const SecurityDB &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SecurityDB & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _SecurityTablePartition__isset { + _SecurityTablePartition__isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false), table(false), part(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; + bool table; + bool part; +} _SecurityTablePartition__isset; + +class SecurityTablePartition { + public: + + static const char* ascii_fingerprint; // = "41D62E7CEC2A7ACFF83979B3CC82EB5F"; + static const uint8_t binary_fingerprint[16]; // = {0x41,0xD6,0x2E,0x7C,0xEC,0x2A,0x7A,0xCF,0xF8,0x39,0x79,0xB3,0xCC,0x82,0xEB,0x5F}; + + SecurityTablePartition() : principalName(""), isRole(0), isGroup(0), privileges(""), createTime(0), grantor("") { + } + + virtual ~SecurityTablePartition() throw() {} + + std::string principalName; + bool isRole; + bool isGroup; + std::string privileges; + int32_t createTime; + std::string grantor; + Table table; + Partition part; + + _SecurityTablePartition__isset __isset; + + bool operator == (const SecurityTablePartition & rhs) const + { + if (!(principalName == rhs.principalName)) + return false; + if (!(isRole == rhs.isRole)) + return false; + if (!(isGroup == rhs.isGroup)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(table == rhs.table)) + return false; + if (!(part == rhs.part)) + return false; + return true; + } + bool operator != (const SecurityTablePartition &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SecurityTablePartition & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _SecurityColumn__isset { + _SecurityColumn__isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false), table(false), partition(false), column(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; + bool table; + bool partition; + bool column; +} _SecurityColumn__isset; + +class SecurityColumn { + public: + + static const char* ascii_fingerprint; // = "75916612792AFA6A3799E96DE9395806"; + static const uint8_t binary_fingerprint[16]; // = {0x75,0x91,0x66,0x12,0x79,0x2A,0xFA,0x6A,0x37,0x99,0xE9,0x6D,0xE9,0x39,0x58,0x06}; + + SecurityColumn() : principalName(""), isRole(0), isGroup(0), privileges(""), createTime(0), grantor(""), column("") { + } + + virtual ~SecurityColumn() throw() {} + + std::string principalName; + bool isRole; + bool isGroup; + std::string privileges; + int32_t createTime; + std::string grantor; + Table table; + Partition partition; + std::string column; + + _SecurityColumn__isset __isset; + + bool operator == (const SecurityColumn & rhs) const + { + if (!(principalName == rhs.principalName)) + return false; + if (!(isRole == rhs.isRole)) + return false; + if (!(isGroup == rhs.isGroup)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(table == rhs.table)) + return false; + if (!(partition == rhs.partition)) + return false; + if (!(column == rhs.column)) + return false; + return true; + } + bool operator != (const SecurityColumn &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SecurityColumn & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + typedef struct _MetaException__isset { _MetaException__isset() : message(false) {} bool message; Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnPrivilegeBag.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnPrivilegeBag.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnPrivilegeBag.java (revision 0) @@ -0,0 +1,615 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class ColumnPrivilegeBag implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("ColumnPrivilegeBag"); + + private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)1); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)2); + private static final TField PARTITION_NAME_FIELD_DESC = new TField("partitionName", TType.STRING, (short)3); + private static final TField COLUMN_PRIVILEGES_FIELD_DESC = new TField("columnPrivileges", TType.MAP, (short)4); + + private String dbName; + private String tableName; + private String partitionName; + private Map columnPrivileges; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "dbName"), + TABLE_NAME((short)2, "tableName"), + PARTITION_NAME((short)3, "partitionName"), + COLUMN_PRIVILEGES((short)4, "columnPrivileges"); + + 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: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // PARTITION_NAME + return PARTITION_NAME; + case 4: // COLUMN_PRIVILEGES + return COLUMN_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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PARTITION_NAME, new FieldMetaData("partitionName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.COLUMN_PRIVILEGES, new FieldMetaData("columnPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(ColumnPrivilegeBag.class, metaDataMap); + } + + public ColumnPrivilegeBag() { + } + + public ColumnPrivilegeBag( + String dbName, + String tableName, + String partitionName, + Map columnPrivileges) + { + this(); + this.dbName = dbName; + this.tableName = tableName; + this.partitionName = partitionName; + this.columnPrivileges = columnPrivileges; + } + + /** + * Performs a deep copy on other. + */ + public ColumnPrivilegeBag(ColumnPrivilegeBag other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetPartitionName()) { + this.partitionName = other.partitionName; + } + if (other.isSetColumnPrivileges()) { + Map __this__columnPrivileges = new HashMap(); + for (Map.Entry other_element : other.columnPrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__columnPrivileges_copy_key = other_element_key; + + String __this__columnPrivileges_copy_value = other_element_value; + + __this__columnPrivileges.put(__this__columnPrivileges_copy_key, __this__columnPrivileges_copy_value); + } + this.columnPrivileges = __this__columnPrivileges; + } + } + + public ColumnPrivilegeBag deepCopy() { + return new ColumnPrivilegeBag(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tableName = null; + this.partitionName = null; + this.columnPrivileges = null; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been asigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been asigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public String getPartitionName() { + return this.partitionName; + } + + public void setPartitionName(String partitionName) { + this.partitionName = partitionName; + } + + public void unsetPartitionName() { + this.partitionName = null; + } + + /** Returns true if field partitionName is set (has been asigned a value) and false otherwise */ + public boolean isSetPartitionName() { + return this.partitionName != null; + } + + public void setPartitionNameIsSet(boolean value) { + if (!value) { + this.partitionName = null; + } + } + + public int getColumnPrivilegesSize() { + return (this.columnPrivileges == null) ? 0 : this.columnPrivileges.size(); + } + + public void putToColumnPrivileges(String key, String val) { + if (this.columnPrivileges == null) { + this.columnPrivileges = new HashMap(); + } + this.columnPrivileges.put(key, val); + } + + public Map getColumnPrivileges() { + return this.columnPrivileges; + } + + public void setColumnPrivileges(Map columnPrivileges) { + this.columnPrivileges = columnPrivileges; + } + + public void unsetColumnPrivileges() { + this.columnPrivileges = null; + } + + /** Returns true if field columnPrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetColumnPrivileges() { + return this.columnPrivileges != null; + } + + public void setColumnPrivilegesIsSet(boolean value) { + if (!value) { + this.columnPrivileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case PARTITION_NAME: + if (value == null) { + unsetPartitionName(); + } else { + setPartitionName((String)value); + } + break; + + case COLUMN_PRIVILEGES: + if (value == null) { + unsetColumnPrivileges(); + } else { + setColumnPrivileges((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case PARTITION_NAME: + return getPartitionName(); + + case COLUMN_PRIVILEGES: + return getColumnPrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case PARTITION_NAME: + return isSetPartitionName(); + case COLUMN_PRIVILEGES: + return isSetColumnPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnPrivilegeBag) + return this.equals((ColumnPrivilegeBag)that); + return false; + } + + public boolean equals(ColumnPrivilegeBag that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_partitionName = true && this.isSetPartitionName(); + boolean that_present_partitionName = true && that.isSetPartitionName(); + if (this_present_partitionName || that_present_partitionName) { + if (!(this_present_partitionName && that_present_partitionName)) + return false; + if (!this.partitionName.equals(that.partitionName)) + return false; + } + + boolean this_present_columnPrivileges = true && this.isSetColumnPrivileges(); + boolean that_present_columnPrivileges = true && that.isSetColumnPrivileges(); + if (this_present_columnPrivileges || that_present_columnPrivileges) { + if (!(this_present_columnPrivileges && that_present_columnPrivileges)) + return false; + if (!this.columnPrivileges.equals(that.columnPrivileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(ColumnPrivilegeBag other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ColumnPrivilegeBag typedOther = (ColumnPrivilegeBag)other; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionName()).compareTo(typedOther.isSetPartitionName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionName()) { + lastComparison = TBaseHelper.compareTo(this.partitionName, typedOther.partitionName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumnPrivileges()).compareTo(typedOther.isSetColumnPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.columnPrivileges, typedOther.columnPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.dbName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TABLE_NAME + if (field.type == TType.STRING) { + this.tableName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PARTITION_NAME + if (field.type == TType.STRING) { + this.partitionName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // COLUMN_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map83 = iprot.readMapBegin(); + this.columnPrivileges = new HashMap(2*_map83.size); + for (int _i84 = 0; _i84 < _map83.size; ++_i84) + { + String _key85; + String _val86; + _key85 = iprot.readString(); + _val86 = iprot.readString(); + this.columnPrivileges.put(_key85, _val86); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.dbName); + oprot.writeFieldEnd(); + } + if (this.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.tableName); + oprot.writeFieldEnd(); + } + if (this.partitionName != null) { + oprot.writeFieldBegin(PARTITION_NAME_FIELD_DESC); + oprot.writeString(this.partitionName); + oprot.writeFieldEnd(); + } + if (this.columnPrivileges != null) { + oprot.writeFieldBegin(COLUMN_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.columnPrivileges.size())); + for (Map.Entry _iter87 : this.columnPrivileges.entrySet()) + { + oprot.writeString(_iter87.getKey()); + oprot.writeString(_iter87.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ColumnPrivilegeBag("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("partitionName:"); + if (this.partitionName == null) { + sb.append("null"); + } else { + sb.append(this.partitionName); + } + first = false; + if (!first) sb.append(", "); + sb.append("columnPrivileges:"); + if (this.columnPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.columnPrivileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (revision 1044070) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (working copy) @@ -33,18 +33,21 @@ private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2); private static final TField LOCATION_URI_FIELD_DESC = new TField("locationUri", TType.STRING, (short)3); private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)4); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)5); private String name; private String description; private String locationUri; private Map parameters; + private PrincipalPrivilegeSet privileges; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { NAME((short)1, "name"), DESCRIPTION((short)2, "description"), LOCATION_URI((short)3, "locationUri"), - PARAMETERS((short)4, "parameters"); + PARAMETERS((short)4, "parameters"), + PRIVILEGES((short)5, "privileges"); private static final Map byName = new HashMap(); @@ -67,6 +70,8 @@ return LOCATION_URI; case 4: // PARAMETERS return PARAMETERS; + case 5: // PRIVILEGES + return PRIVILEGES; default: return null; } @@ -121,6 +126,8 @@ new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Database.class, metaDataMap); } @@ -169,6 +176,9 @@ } this.parameters = __this__parameters; } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } } public Database deepCopy() { @@ -181,6 +191,7 @@ this.description = null; this.locationUri = null; this.parameters = null; + this.privileges = null; } public String getName() { @@ -286,6 +297,29 @@ } } + public PrincipalPrivilegeSet getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrincipalPrivilegeSet privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been asigned 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 NAME: @@ -320,6 +354,14 @@ } break; + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + } } @@ -337,6 +379,9 @@ case PARAMETERS: return getParameters(); + case PRIVILEGES: + return getPrivileges(); + } throw new IllegalStateException(); } @@ -356,6 +401,8 @@ return isSetLocationUri(); case PARAMETERS: return isSetParameters(); + case PRIVILEGES: + return isSetPrivileges(); } throw new IllegalStateException(); } @@ -409,6 +456,15 @@ 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; } @@ -465,6 +521,16 @@ return lastComparison; } } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -506,15 +572,15 @@ case 4: // PARAMETERS if (field.type == TType.MAP) { { - TMap _map4 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map4.size); - for (int _i5 = 0; _i5 < _map4.size; ++_i5) + TMap _map19 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map19.size); + for (int _i20 = 0; _i20 < _map19.size; ++_i20) { - String _key6; - String _val7; - _key6 = iprot.readString(); - _val7 = iprot.readString(); - this.parameters.put(_key6, _val7); + String _key21; + String _val22; + _key21 = iprot.readString(); + _val22 = iprot.readString(); + this.parameters.put(_key21, _val22); } iprot.readMapEnd(); } @@ -522,6 +588,14 @@ TProtocolUtil.skip(iprot, field.type); } break; + case 5: // PRIVILEGES + if (field.type == TType.STRUCT) { + this.privileges = new PrincipalPrivilegeSet(); + this.privileges.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; default: TProtocolUtil.skip(iprot, field.type); } @@ -554,15 +628,22 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter8 : this.parameters.entrySet()) + for (Map.Entry _iter23 : this.parameters.entrySet()) { - oprot.writeString(_iter8.getKey()); - oprot.writeString(_iter8.getValue()); + oprot.writeString(_iter23.getKey()); + oprot.writeString(_iter23.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } + if (this.privileges != null) { + if (isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -603,6 +684,16 @@ sb.append(this.parameters); } first = false; + if (isSetPrivileges()) { + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + } sb.append(")"); return sb.toString(); } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (revision 1044070) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (working copy) @@ -955,15 +955,15 @@ case 9: // PARAMETERS if (field.type == TType.MAP) { { - TMap _map49 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map49.size); - for (int _i50 = 0; _i50 < _map49.size; ++_i50) + TMap _map69 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map69.size); + for (int _i70 = 0; _i70 < _map69.size; ++_i70) { - String _key51; - String _val52; - _key51 = iprot.readString(); - _val52 = iprot.readString(); - this.parameters.put(_key51, _val52); + String _key71; + String _val72; + _key71 = iprot.readString(); + _val72 = iprot.readString(); + this.parameters.put(_key71, _val72); } iprot.readMapEnd(); } @@ -1032,10 +1032,10 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter53 : this.parameters.entrySet()) + for (Map.Entry _iter73 : this.parameters.entrySet()) { - oprot.writeString(_iter53.getKey()); - oprot.writeString(_iter53.getValue()); + oprot.writeString(_iter73.getKey()); + oprot.writeString(_iter73.getValue()); } oprot.writeMapEnd(); } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (revision 1044070) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (working copy) @@ -36,6 +36,7 @@ private static final TField LAST_ACCESS_TIME_FIELD_DESC = new TField("lastAccessTime", TType.I32, (short)5); private static final TField SD_FIELD_DESC = new TField("sd", TType.STRUCT, (short)6); private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)7); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)8); private List values; private String dbName; @@ -44,6 +45,7 @@ private int lastAccessTime; private StorageDescriptor sd; private Map parameters; + private PrincipalPrivilegeSet privileges; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -53,7 +55,8 @@ CREATE_TIME((short)4, "createTime"), LAST_ACCESS_TIME((short)5, "lastAccessTime"), SD((short)6, "sd"), - PARAMETERS((short)7, "parameters"); + PARAMETERS((short)7, "parameters"), + PRIVILEGES((short)8, "privileges"); private static final Map byName = new HashMap(); @@ -82,6 +85,8 @@ return SD; case 7: // PARAMETERS return PARAMETERS; + case 8: // PRIVILEGES + return PRIVILEGES; default: return null; } @@ -146,6 +151,8 @@ new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Partition.class, metaDataMap); } @@ -213,6 +220,9 @@ } this.parameters = __this__parameters; } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } } public Partition deepCopy() { @@ -230,6 +240,7 @@ this.lastAccessTime = 0; this.sd = null; this.parameters = null; + this.privileges = null; } public int getValuesSize() { @@ -417,6 +428,29 @@ } } + public PrincipalPrivilegeSet getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrincipalPrivilegeSet privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been asigned 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 VALUES: @@ -475,6 +509,14 @@ } break; + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + } } @@ -501,6 +543,9 @@ case PARAMETERS: return getParameters(); + case PRIVILEGES: + return getPrivileges(); + } throw new IllegalStateException(); } @@ -526,6 +571,8 @@ return isSetSd(); case PARAMETERS: return isSetParameters(); + case PRIVILEGES: + return isSetPrivileges(); } throw new IllegalStateException(); } @@ -606,6 +653,15 @@ 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; } @@ -692,6 +748,16 @@ return lastComparison; } } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -712,13 +778,13 @@ case 1: // VALUES if (field.type == TType.LIST) { { - TList _list40 = iprot.readListBegin(); - this.values = new ArrayList(_list40.size); - for (int _i41 = 0; _i41 < _list40.size; ++_i41) + TList _list60 = iprot.readListBegin(); + this.values = new ArrayList(_list60.size); + for (int _i61 = 0; _i61 < _list60.size; ++_i61) { - String _elem42; - _elem42 = iprot.readString(); - this.values.add(_elem42); + String _elem62; + _elem62 = iprot.readString(); + this.values.add(_elem62); } iprot.readListEnd(); } @@ -767,15 +833,15 @@ case 7: // PARAMETERS if (field.type == TType.MAP) { { - TMap _map43 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map43.size); - for (int _i44 = 0; _i44 < _map43.size; ++_i44) + TMap _map63 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map63.size); + for (int _i64 = 0; _i64 < _map63.size; ++_i64) { - String _key45; - String _val46; - _key45 = iprot.readString(); - _val46 = iprot.readString(); - this.parameters.put(_key45, _val46); + String _key65; + String _val66; + _key65 = iprot.readString(); + _val66 = iprot.readString(); + this.parameters.put(_key65, _val66); } iprot.readMapEnd(); } @@ -783,6 +849,14 @@ TProtocolUtil.skip(iprot, field.type); } break; + case 8: // PRIVILEGES + if (field.type == TType.STRUCT) { + this.privileges = new PrincipalPrivilegeSet(); + this.privileges.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; default: TProtocolUtil.skip(iprot, field.type); } @@ -800,9 +874,9 @@ oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.values.size())); - for (String _iter47 : this.values) + for (String _iter67 : this.values) { - oprot.writeString(_iter47); + oprot.writeString(_iter67); } oprot.writeListEnd(); } @@ -833,15 +907,22 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter48 : this.parameters.entrySet()) + for (Map.Entry _iter68 : this.parameters.entrySet()) { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); + oprot.writeString(_iter68.getKey()); + oprot.writeString(_iter68.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } + if (this.privileges != null) { + if (isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -898,6 +979,16 @@ sb.append(this.parameters); } first = false; + if (isSetPrivileges()) { + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + } sb.append(")"); return sb.toString(); } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java (revision 0) @@ -0,0 +1,617 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class PrincipalPrivilegeSet implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("PrincipalPrivilegeSet"); + + private static final TField USER_PRIVILEGES_FIELD_DESC = new TField("userPrivileges", TType.MAP, (short)1); + private static final TField GROUP_PRIVILEGES_FIELD_DESC = new TField("groupPrivileges", TType.MAP, (short)2); + private static final TField ROLE_PRIVILEGES_FIELD_DESC = new TField("rolePrivileges", TType.MAP, (short)3); + + private Map userPrivileges; + private Map groupPrivileges; + private Map rolePrivileges; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + USER_PRIVILEGES((short)1, "userPrivileges"), + GROUP_PRIVILEGES((short)2, "groupPrivileges"), + ROLE_PRIVILEGES((short)3, "rolePrivileges"); + + 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: // USER_PRIVILEGES + return USER_PRIVILEGES; + case 2: // GROUP_PRIVILEGES + return GROUP_PRIVILEGES; + case 3: // ROLE_PRIVILEGES + return ROLE_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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_PRIVILEGES, new FieldMetaData("userPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.GROUP_PRIVILEGES, new FieldMetaData("groupPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.ROLE_PRIVILEGES, new FieldMetaData("rolePrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(PrincipalPrivilegeSet.class, metaDataMap); + } + + public PrincipalPrivilegeSet() { + } + + public PrincipalPrivilegeSet( + Map userPrivileges, + Map groupPrivileges, + Map rolePrivileges) + { + this(); + this.userPrivileges = userPrivileges; + this.groupPrivileges = groupPrivileges; + this.rolePrivileges = rolePrivileges; + } + + /** + * Performs a deep copy on other. + */ + public PrincipalPrivilegeSet(PrincipalPrivilegeSet other) { + if (other.isSetUserPrivileges()) { + Map __this__userPrivileges = new HashMap(); + for (Map.Entry other_element : other.userPrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__userPrivileges_copy_key = other_element_key; + + String __this__userPrivileges_copy_value = other_element_value; + + __this__userPrivileges.put(__this__userPrivileges_copy_key, __this__userPrivileges_copy_value); + } + this.userPrivileges = __this__userPrivileges; + } + if (other.isSetGroupPrivileges()) { + Map __this__groupPrivileges = new HashMap(); + for (Map.Entry other_element : other.groupPrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__groupPrivileges_copy_key = other_element_key; + + String __this__groupPrivileges_copy_value = other_element_value; + + __this__groupPrivileges.put(__this__groupPrivileges_copy_key, __this__groupPrivileges_copy_value); + } + this.groupPrivileges = __this__groupPrivileges; + } + if (other.isSetRolePrivileges()) { + Map __this__rolePrivileges = new HashMap(); + for (Map.Entry other_element : other.rolePrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__rolePrivileges_copy_key = other_element_key; + + String __this__rolePrivileges_copy_value = other_element_value; + + __this__rolePrivileges.put(__this__rolePrivileges_copy_key, __this__rolePrivileges_copy_value); + } + this.rolePrivileges = __this__rolePrivileges; + } + } + + public PrincipalPrivilegeSet deepCopy() { + return new PrincipalPrivilegeSet(this); + } + + @Override + public void clear() { + this.userPrivileges = null; + this.groupPrivileges = null; + this.rolePrivileges = null; + } + + public int getUserPrivilegesSize() { + return (this.userPrivileges == null) ? 0 : this.userPrivileges.size(); + } + + public void putToUserPrivileges(String key, String val) { + if (this.userPrivileges == null) { + this.userPrivileges = new HashMap(); + } + this.userPrivileges.put(key, val); + } + + public Map getUserPrivileges() { + return this.userPrivileges; + } + + public void setUserPrivileges(Map userPrivileges) { + this.userPrivileges = userPrivileges; + } + + public void unsetUserPrivileges() { + this.userPrivileges = null; + } + + /** Returns true if field userPrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetUserPrivileges() { + return this.userPrivileges != null; + } + + public void setUserPrivilegesIsSet(boolean value) { + if (!value) { + this.userPrivileges = null; + } + } + + public int getGroupPrivilegesSize() { + return (this.groupPrivileges == null) ? 0 : this.groupPrivileges.size(); + } + + public void putToGroupPrivileges(String key, String val) { + if (this.groupPrivileges == null) { + this.groupPrivileges = new HashMap(); + } + this.groupPrivileges.put(key, val); + } + + public Map getGroupPrivileges() { + return this.groupPrivileges; + } + + public void setGroupPrivileges(Map groupPrivileges) { + this.groupPrivileges = groupPrivileges; + } + + public void unsetGroupPrivileges() { + this.groupPrivileges = null; + } + + /** Returns true if field groupPrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetGroupPrivileges() { + return this.groupPrivileges != null; + } + + public void setGroupPrivilegesIsSet(boolean value) { + if (!value) { + this.groupPrivileges = null; + } + } + + public int getRolePrivilegesSize() { + return (this.rolePrivileges == null) ? 0 : this.rolePrivileges.size(); + } + + public void putToRolePrivileges(String key, String val) { + if (this.rolePrivileges == null) { + this.rolePrivileges = new HashMap(); + } + this.rolePrivileges.put(key, val); + } + + public Map getRolePrivileges() { + return this.rolePrivileges; + } + + public void setRolePrivileges(Map rolePrivileges) { + this.rolePrivileges = rolePrivileges; + } + + public void unsetRolePrivileges() { + this.rolePrivileges = null; + } + + /** Returns true if field rolePrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetRolePrivileges() { + return this.rolePrivileges != null; + } + + public void setRolePrivilegesIsSet(boolean value) { + if (!value) { + this.rolePrivileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_PRIVILEGES: + if (value == null) { + unsetUserPrivileges(); + } else { + setUserPrivileges((Map)value); + } + break; + + case GROUP_PRIVILEGES: + if (value == null) { + unsetGroupPrivileges(); + } else { + setGroupPrivileges((Map)value); + } + break; + + case ROLE_PRIVILEGES: + if (value == null) { + unsetRolePrivileges(); + } else { + setRolePrivileges((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_PRIVILEGES: + return getUserPrivileges(); + + case GROUP_PRIVILEGES: + return getGroupPrivileges(); + + case ROLE_PRIVILEGES: + return getRolePrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_PRIVILEGES: + return isSetUserPrivileges(); + case GROUP_PRIVILEGES: + return isSetGroupPrivileges(); + case ROLE_PRIVILEGES: + return isSetRolePrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrincipalPrivilegeSet) + return this.equals((PrincipalPrivilegeSet)that); + return false; + } + + public boolean equals(PrincipalPrivilegeSet that) { + if (that == null) + return false; + + boolean this_present_userPrivileges = true && this.isSetUserPrivileges(); + boolean that_present_userPrivileges = true && that.isSetUserPrivileges(); + if (this_present_userPrivileges || that_present_userPrivileges) { + if (!(this_present_userPrivileges && that_present_userPrivileges)) + return false; + if (!this.userPrivileges.equals(that.userPrivileges)) + return false; + } + + boolean this_present_groupPrivileges = true && this.isSetGroupPrivileges(); + boolean that_present_groupPrivileges = true && that.isSetGroupPrivileges(); + if (this_present_groupPrivileges || that_present_groupPrivileges) { + if (!(this_present_groupPrivileges && that_present_groupPrivileges)) + return false; + if (!this.groupPrivileges.equals(that.groupPrivileges)) + return false; + } + + boolean this_present_rolePrivileges = true && this.isSetRolePrivileges(); + boolean that_present_rolePrivileges = true && that.isSetRolePrivileges(); + if (this_present_rolePrivileges || that_present_rolePrivileges) { + if (!(this_present_rolePrivileges && that_present_rolePrivileges)) + return false; + if (!this.rolePrivileges.equals(that.rolePrivileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(PrincipalPrivilegeSet other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + PrincipalPrivilegeSet typedOther = (PrincipalPrivilegeSet)other; + + lastComparison = Boolean.valueOf(isSetUserPrivileges()).compareTo(typedOther.isSetUserPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.userPrivileges, typedOther.userPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroupPrivileges()).compareTo(typedOther.isSetGroupPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroupPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.groupPrivileges, typedOther.groupPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRolePrivileges()).compareTo(typedOther.isSetRolePrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRolePrivileges()) { + lastComparison = TBaseHelper.compareTo(this.rolePrivileges, typedOther.rolePrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // USER_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map4 = iprot.readMapBegin(); + this.userPrivileges = new HashMap(2*_map4.size); + for (int _i5 = 0; _i5 < _map4.size; ++_i5) + { + String _key6; + String _val7; + _key6 = iprot.readString(); + _val7 = iprot.readString(); + this.userPrivileges.put(_key6, _val7); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // GROUP_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map8 = iprot.readMapBegin(); + this.groupPrivileges = new HashMap(2*_map8.size); + for (int _i9 = 0; _i9 < _map8.size; ++_i9) + { + String _key10; + String _val11; + _key10 = iprot.readString(); + _val11 = iprot.readString(); + this.groupPrivileges.put(_key10, _val11); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // ROLE_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map12 = iprot.readMapBegin(); + this.rolePrivileges = new HashMap(2*_map12.size); + for (int _i13 = 0; _i13 < _map12.size; ++_i13) + { + String _key14; + String _val15; + _key14 = iprot.readString(); + _val15 = iprot.readString(); + this.rolePrivileges.put(_key14, _val15); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.userPrivileges != null) { + oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.userPrivileges.size())); + for (Map.Entry _iter16 : this.userPrivileges.entrySet()) + { + oprot.writeString(_iter16.getKey()); + oprot.writeString(_iter16.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.groupPrivileges != null) { + oprot.writeFieldBegin(GROUP_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.groupPrivileges.size())); + for (Map.Entry _iter17 : this.groupPrivileges.entrySet()) + { + oprot.writeString(_iter17.getKey()); + oprot.writeString(_iter17.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.rolePrivileges != null) { + oprot.writeFieldBegin(ROLE_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.rolePrivileges.size())); + for (Map.Entry _iter18 : this.rolePrivileges.entrySet()) + { + oprot.writeString(_iter18.getKey()); + oprot.writeString(_iter18.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("PrincipalPrivilegeSet("); + boolean first = true; + + sb.append("userPrivileges:"); + if (this.userPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.userPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("groupPrivileges:"); + if (this.groupPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.groupPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("rolePrivileges:"); + if (this.rolePrivileges == null) { + sb.append("null"); + } else { + sb.append(this.rolePrivileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java (revision 0) @@ -0,0 +1,834 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class PrivilegeBag implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("PrivilegeBag"); + + private static final TField USER_PRIVILEGES_FIELD_DESC = new TField("userPrivileges", TType.STRING, (short)1); + private static final TField DB_PRIVILEGES_FIELD_DESC = new TField("dbPrivileges", TType.MAP, (short)2); + private static final TField TABLE_PRIVILEGES_FIELD_DESC = new TField("tablePrivileges", TType.MAP, (short)3); + private static final TField PARTITION_PRIVILEGES_FIELD_DESC = new TField("partitionPrivileges", TType.MAP, (short)4); + private static final TField COLUMN_PRIVILEGES_FIELD_DESC = new TField("columnPrivileges", TType.LIST, (short)5); + + private String userPrivileges; + private Map dbPrivileges; + private Map tablePrivileges; + private Map partitionPrivileges; + private List columnPrivileges; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + USER_PRIVILEGES((short)1, "userPrivileges"), + DB_PRIVILEGES((short)2, "dbPrivileges"), + TABLE_PRIVILEGES((short)3, "tablePrivileges"), + PARTITION_PRIVILEGES((short)4, "partitionPrivileges"), + COLUMN_PRIVILEGES((short)5, "columnPrivileges"); + + 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: // USER_PRIVILEGES + return USER_PRIVILEGES; + case 2: // DB_PRIVILEGES + return DB_PRIVILEGES; + case 3: // TABLE_PRIVILEGES + return TABLE_PRIVILEGES; + case 4: // PARTITION_PRIVILEGES + return PARTITION_PRIVILEGES; + case 5: // COLUMN_PRIVILEGES + return COLUMN_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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.USER_PRIVILEGES, new FieldMetaData("userPrivileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DB_PRIVILEGES, new FieldMetaData("dbPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new StructMetaData(TType.STRUCT, Database.class), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.TABLE_PRIVILEGES, new FieldMetaData("tablePrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new StructMetaData(TType.STRUCT, Table.class), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.PARTITION_PRIVILEGES, new FieldMetaData("partitionPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new StructMetaData(TType.STRUCT, Partition.class), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.COLUMN_PRIVILEGES, new FieldMetaData("columnPrivileges", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, ColumnPrivilegeBag.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(PrivilegeBag.class, metaDataMap); + } + + public PrivilegeBag() { + } + + public PrivilegeBag( + String userPrivileges, + Map dbPrivileges, + Map tablePrivileges, + Map partitionPrivileges, + List columnPrivileges) + { + this(); + this.userPrivileges = userPrivileges; + this.dbPrivileges = dbPrivileges; + this.tablePrivileges = tablePrivileges; + this.partitionPrivileges = partitionPrivileges; + this.columnPrivileges = columnPrivileges; + } + + /** + * Performs a deep copy on other. + */ + public PrivilegeBag(PrivilegeBag other) { + if (other.isSetUserPrivileges()) { + this.userPrivileges = other.userPrivileges; + } + if (other.isSetDbPrivileges()) { + Map __this__dbPrivileges = new HashMap(); + for (Map.Entry other_element : other.dbPrivileges.entrySet()) { + + Database other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + Database __this__dbPrivileges_copy_key = new Database(other_element_key); + + String __this__dbPrivileges_copy_value = other_element_value; + + __this__dbPrivileges.put(__this__dbPrivileges_copy_key, __this__dbPrivileges_copy_value); + } + this.dbPrivileges = __this__dbPrivileges; + } + if (other.isSetTablePrivileges()) { + Map __this__tablePrivileges = new HashMap(); + for (Map.Entry other_element : other.tablePrivileges.entrySet()) { + + Table other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + Table __this__tablePrivileges_copy_key = new Table(other_element_key); + + String __this__tablePrivileges_copy_value = other_element_value; + + __this__tablePrivileges.put(__this__tablePrivileges_copy_key, __this__tablePrivileges_copy_value); + } + this.tablePrivileges = __this__tablePrivileges; + } + if (other.isSetPartitionPrivileges()) { + Map __this__partitionPrivileges = new HashMap(); + for (Map.Entry other_element : other.partitionPrivileges.entrySet()) { + + Partition other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + Partition __this__partitionPrivileges_copy_key = new Partition(other_element_key); + + String __this__partitionPrivileges_copy_value = other_element_value; + + __this__partitionPrivileges.put(__this__partitionPrivileges_copy_key, __this__partitionPrivileges_copy_value); + } + this.partitionPrivileges = __this__partitionPrivileges; + } + if (other.isSetColumnPrivileges()) { + List __this__columnPrivileges = new ArrayList(); + for (ColumnPrivilegeBag other_element : other.columnPrivileges) { + __this__columnPrivileges.add(new ColumnPrivilegeBag(other_element)); + } + this.columnPrivileges = __this__columnPrivileges; + } + } + + public PrivilegeBag deepCopy() { + return new PrivilegeBag(this); + } + + @Override + public void clear() { + this.userPrivileges = null; + this.dbPrivileges = null; + this.tablePrivileges = null; + this.partitionPrivileges = null; + this.columnPrivileges = null; + } + + public String getUserPrivileges() { + return this.userPrivileges; + } + + public void setUserPrivileges(String userPrivileges) { + this.userPrivileges = userPrivileges; + } + + public void unsetUserPrivileges() { + this.userPrivileges = null; + } + + /** Returns true if field userPrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetUserPrivileges() { + return this.userPrivileges != null; + } + + public void setUserPrivilegesIsSet(boolean value) { + if (!value) { + this.userPrivileges = null; + } + } + + public int getDbPrivilegesSize() { + return (this.dbPrivileges == null) ? 0 : this.dbPrivileges.size(); + } + + public void putToDbPrivileges(Database key, String val) { + if (this.dbPrivileges == null) { + this.dbPrivileges = new HashMap(); + } + this.dbPrivileges.put(key, val); + } + + public Map getDbPrivileges() { + return this.dbPrivileges; + } + + public void setDbPrivileges(Map dbPrivileges) { + this.dbPrivileges = dbPrivileges; + } + + public void unsetDbPrivileges() { + this.dbPrivileges = null; + } + + /** Returns true if field dbPrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetDbPrivileges() { + return this.dbPrivileges != null; + } + + public void setDbPrivilegesIsSet(boolean value) { + if (!value) { + this.dbPrivileges = null; + } + } + + public int getTablePrivilegesSize() { + return (this.tablePrivileges == null) ? 0 : this.tablePrivileges.size(); + } + + public void putToTablePrivileges(Table key, String val) { + if (this.tablePrivileges == null) { + this.tablePrivileges = new HashMap(); + } + this.tablePrivileges.put(key, val); + } + + public Map getTablePrivileges() { + return this.tablePrivileges; + } + + public void setTablePrivileges(Map tablePrivileges) { + this.tablePrivileges = tablePrivileges; + } + + public void unsetTablePrivileges() { + this.tablePrivileges = null; + } + + /** Returns true if field tablePrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetTablePrivileges() { + return this.tablePrivileges != null; + } + + public void setTablePrivilegesIsSet(boolean value) { + if (!value) { + this.tablePrivileges = null; + } + } + + public int getPartitionPrivilegesSize() { + return (this.partitionPrivileges == null) ? 0 : this.partitionPrivileges.size(); + } + + public void putToPartitionPrivileges(Partition key, String val) { + if (this.partitionPrivileges == null) { + this.partitionPrivileges = new HashMap(); + } + this.partitionPrivileges.put(key, val); + } + + public Map getPartitionPrivileges() { + return this.partitionPrivileges; + } + + public void setPartitionPrivileges(Map partitionPrivileges) { + this.partitionPrivileges = partitionPrivileges; + } + + public void unsetPartitionPrivileges() { + this.partitionPrivileges = null; + } + + /** Returns true if field partitionPrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetPartitionPrivileges() { + return this.partitionPrivileges != null; + } + + public void setPartitionPrivilegesIsSet(boolean value) { + if (!value) { + this.partitionPrivileges = null; + } + } + + public int getColumnPrivilegesSize() { + return (this.columnPrivileges == null) ? 0 : this.columnPrivileges.size(); + } + + public java.util.Iterator getColumnPrivilegesIterator() { + return (this.columnPrivileges == null) ? null : this.columnPrivileges.iterator(); + } + + public void addToColumnPrivileges(ColumnPrivilegeBag elem) { + if (this.columnPrivileges == null) { + this.columnPrivileges = new ArrayList(); + } + this.columnPrivileges.add(elem); + } + + public List getColumnPrivileges() { + return this.columnPrivileges; + } + + public void setColumnPrivileges(List columnPrivileges) { + this.columnPrivileges = columnPrivileges; + } + + public void unsetColumnPrivileges() { + this.columnPrivileges = null; + } + + /** Returns true if field columnPrivileges is set (has been asigned a value) and false otherwise */ + public boolean isSetColumnPrivileges() { + return this.columnPrivileges != null; + } + + public void setColumnPrivilegesIsSet(boolean value) { + if (!value) { + this.columnPrivileges = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_PRIVILEGES: + if (value == null) { + unsetUserPrivileges(); + } else { + setUserPrivileges((String)value); + } + break; + + case DB_PRIVILEGES: + if (value == null) { + unsetDbPrivileges(); + } else { + setDbPrivileges((Map)value); + } + break; + + case TABLE_PRIVILEGES: + if (value == null) { + unsetTablePrivileges(); + } else { + setTablePrivileges((Map)value); + } + break; + + case PARTITION_PRIVILEGES: + if (value == null) { + unsetPartitionPrivileges(); + } else { + setPartitionPrivileges((Map)value); + } + break; + + case COLUMN_PRIVILEGES: + if (value == null) { + unsetColumnPrivileges(); + } else { + setColumnPrivileges((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_PRIVILEGES: + return getUserPrivileges(); + + case DB_PRIVILEGES: + return getDbPrivileges(); + + case TABLE_PRIVILEGES: + return getTablePrivileges(); + + case PARTITION_PRIVILEGES: + return getPartitionPrivileges(); + + case COLUMN_PRIVILEGES: + return getColumnPrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_PRIVILEGES: + return isSetUserPrivileges(); + case DB_PRIVILEGES: + return isSetDbPrivileges(); + case TABLE_PRIVILEGES: + return isSetTablePrivileges(); + case PARTITION_PRIVILEGES: + return isSetPartitionPrivileges(); + case COLUMN_PRIVILEGES: + return isSetColumnPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrivilegeBag) + return this.equals((PrivilegeBag)that); + return false; + } + + public boolean equals(PrivilegeBag that) { + if (that == null) + return false; + + boolean this_present_userPrivileges = true && this.isSetUserPrivileges(); + boolean that_present_userPrivileges = true && that.isSetUserPrivileges(); + if (this_present_userPrivileges || that_present_userPrivileges) { + if (!(this_present_userPrivileges && that_present_userPrivileges)) + return false; + if (!this.userPrivileges.equals(that.userPrivileges)) + return false; + } + + boolean this_present_dbPrivileges = true && this.isSetDbPrivileges(); + boolean that_present_dbPrivileges = true && that.isSetDbPrivileges(); + if (this_present_dbPrivileges || that_present_dbPrivileges) { + if (!(this_present_dbPrivileges && that_present_dbPrivileges)) + return false; + if (!this.dbPrivileges.equals(that.dbPrivileges)) + return false; + } + + boolean this_present_tablePrivileges = true && this.isSetTablePrivileges(); + boolean that_present_tablePrivileges = true && that.isSetTablePrivileges(); + if (this_present_tablePrivileges || that_present_tablePrivileges) { + if (!(this_present_tablePrivileges && that_present_tablePrivileges)) + return false; + if (!this.tablePrivileges.equals(that.tablePrivileges)) + return false; + } + + boolean this_present_partitionPrivileges = true && this.isSetPartitionPrivileges(); + boolean that_present_partitionPrivileges = true && that.isSetPartitionPrivileges(); + if (this_present_partitionPrivileges || that_present_partitionPrivileges) { + if (!(this_present_partitionPrivileges && that_present_partitionPrivileges)) + return false; + if (!this.partitionPrivileges.equals(that.partitionPrivileges)) + return false; + } + + boolean this_present_columnPrivileges = true && this.isSetColumnPrivileges(); + boolean that_present_columnPrivileges = true && that.isSetColumnPrivileges(); + if (this_present_columnPrivileges || that_present_columnPrivileges) { + if (!(this_present_columnPrivileges && that_present_columnPrivileges)) + return false; + if (!this.columnPrivileges.equals(that.columnPrivileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(PrivilegeBag other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + PrivilegeBag typedOther = (PrivilegeBag)other; + + lastComparison = Boolean.valueOf(isSetUserPrivileges()).compareTo(typedOther.isSetUserPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.userPrivileges, typedOther.userPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbPrivileges()).compareTo(typedOther.isSetDbPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.dbPrivileges, typedOther.dbPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTablePrivileges()).compareTo(typedOther.isSetTablePrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTablePrivileges()) { + lastComparison = TBaseHelper.compareTo(this.tablePrivileges, typedOther.tablePrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionPrivileges()).compareTo(typedOther.isSetPartitionPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.partitionPrivileges, typedOther.partitionPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumnPrivileges()).compareTo(typedOther.isSetColumnPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.columnPrivileges, typedOther.columnPrivileges); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // USER_PRIVILEGES + if (field.type == TType.STRING) { + this.userPrivileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DB_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map88 = iprot.readMapBegin(); + this.dbPrivileges = new HashMap(2*_map88.size); + for (int _i89 = 0; _i89 < _map88.size; ++_i89) + { + Database _key90; + String _val91; + _key90 = new Database(); + _key90.read(iprot); + _val91 = iprot.readString(); + this.dbPrivileges.put(_key90, _val91); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // TABLE_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map92 = iprot.readMapBegin(); + this.tablePrivileges = new HashMap(2*_map92.size); + for (int _i93 = 0; _i93 < _map92.size; ++_i93) + { + Table _key94; + String _val95; + _key94 = new Table(); + _key94.read(iprot); + _val95 = iprot.readString(); + this.tablePrivileges.put(_key94, _val95); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // PARTITION_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map96 = iprot.readMapBegin(); + this.partitionPrivileges = new HashMap(2*_map96.size); + for (int _i97 = 0; _i97 < _map96.size; ++_i97) + { + Partition _key98; + String _val99; + _key98 = new Partition(); + _key98.read(iprot); + _val99 = iprot.readString(); + this.partitionPrivileges.put(_key98, _val99); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // COLUMN_PRIVILEGES + if (field.type == TType.LIST) { + { + TList _list100 = iprot.readListBegin(); + this.columnPrivileges = new ArrayList(_list100.size); + for (int _i101 = 0; _i101 < _list100.size; ++_i101) + { + ColumnPrivilegeBag _elem102; + _elem102 = new ColumnPrivilegeBag(); + _elem102.read(iprot); + this.columnPrivileges.add(_elem102); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.userPrivileges != null) { + oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); + oprot.writeString(this.userPrivileges); + oprot.writeFieldEnd(); + } + if (this.dbPrivileges != null) { + oprot.writeFieldBegin(DB_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.STRING, this.dbPrivileges.size())); + for (Map.Entry _iter103 : this.dbPrivileges.entrySet()) + { + _iter103.getKey().write(oprot); + oprot.writeString(_iter103.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.tablePrivileges != null) { + oprot.writeFieldBegin(TABLE_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.STRING, this.tablePrivileges.size())); + for (Map.Entry _iter104 : this.tablePrivileges.entrySet()) + { + _iter104.getKey().write(oprot); + oprot.writeString(_iter104.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.partitionPrivileges != null) { + oprot.writeFieldBegin(PARTITION_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.STRING, this.partitionPrivileges.size())); + for (Map.Entry _iter105 : this.partitionPrivileges.entrySet()) + { + _iter105.getKey().write(oprot); + oprot.writeString(_iter105.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.columnPrivileges != null) { + oprot.writeFieldBegin(COLUMN_PRIVILEGES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.columnPrivileges.size())); + for (ColumnPrivilegeBag _iter106 : this.columnPrivileges) + { + _iter106.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("PrivilegeBag("); + boolean first = true; + + sb.append("userPrivileges:"); + if (this.userPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.userPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbPrivileges:"); + if (this.dbPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.dbPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("tablePrivileges:"); + if (this.tablePrivileges == null) { + sb.append("null"); + } else { + sb.append(this.tablePrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("partitionPrivileges:"); + if (this.partitionPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.partitionPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("columnPrivileges:"); + if (this.columnPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.columnPrivileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (revision 0) @@ -0,0 +1,702 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class Role implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("Role"); + + private static final TField ROLE_NAME_FIELD_DESC = new TField("roleName", TType.STRING, (short)1); + private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)2); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)3); + private static final TField OWNER_NAME_FIELD_DESC = new TField("ownerName", TType.STRING, (short)4); + private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)5); + + private String roleName; + private Database database; + private int createTime; + private String ownerName; + private Map parameters; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + ROLE_NAME((short)1, "roleName"), + DATABASE((short)2, "database"), + CREATE_TIME((short)3, "createTime"), + OWNER_NAME((short)4, "ownerName"), + PARAMETERS((short)5, "parameters"); + + 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: // ROLE_NAME + return ROLE_NAME; + case 2: // DATABASE + return DATABASE; + case 3: // CREATE_TIME + return CREATE_TIME; + case 4: // OWNER_NAME + return OWNER_NAME; + case 5: // PARAMETERS + return PARAMETERS; + 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 __CREATETIME_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("roleName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.OWNER_NAME, new FieldMetaData("ownerName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Role.class, metaDataMap); + } + + public Role() { + } + + public Role( + String roleName, + Database database, + int createTime, + String ownerName, + Map parameters) + { + this(); + this.roleName = roleName; + this.database = database; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.ownerName = ownerName; + this.parameters = parameters; + } + + /** + * Performs a deep copy on other. + */ + public Role(Role other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetRoleName()) { + this.roleName = other.roleName; + } + if (other.isSetDatabase()) { + this.database = new Database(other.database); + } + this.createTime = other.createTime; + if (other.isSetOwnerName()) { + this.ownerName = other.ownerName; + } + if (other.isSetParameters()) { + Map __this__parameters = new HashMap(); + for (Map.Entry other_element : other.parameters.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__parameters_copy_key = other_element_key; + + String __this__parameters_copy_value = other_element_value; + + __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); + } + this.parameters = __this__parameters; + } + } + + public Role deepCopy() { + return new Role(this); + } + + @Override + public void clear() { + this.roleName = null; + this.database = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.ownerName = null; + this.parameters = null; + } + + public String getRoleName() { + return this.roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + public void unsetRoleName() { + this.roleName = null; + } + + /** Returns true if field roleName is set (has been asigned a value) and false otherwise */ + public boolean isSetRoleName() { + return this.roleName != null; + } + + public void setRoleNameIsSet(boolean value) { + if (!value) { + this.roleName = null; + } + } + + public Database getDatabase() { + return this.database; + } + + public void setDatabase(Database database) { + this.database = database; + } + + public void unsetDatabase() { + this.database = null; + } + + /** Returns true if field database is set (has been asigned a value) and false otherwise */ + public boolean isSetDatabase() { + return this.database != null; + } + + public void setDatabaseIsSet(boolean value) { + if (!value) { + this.database = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + } + + public String getOwnerName() { + return this.ownerName; + } + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + public void unsetOwnerName() { + this.ownerName = null; + } + + /** Returns true if field ownerName is set (has been asigned a value) and false otherwise */ + public boolean isSetOwnerName() { + return this.ownerName != null; + } + + public void setOwnerNameIsSet(boolean value) { + if (!value) { + this.ownerName = null; + } + } + + public int getParametersSize() { + return (this.parameters == null) ? 0 : this.parameters.size(); + } + + public void putToParameters(String key, String val) { + if (this.parameters == null) { + this.parameters = new HashMap(); + } + this.parameters.put(key, val); + } + + public Map getParameters() { + return this.parameters; + } + + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + public void unsetParameters() { + this.parameters = null; + } + + /** Returns true if field parameters is set (has been asigned a value) and false otherwise */ + public boolean isSetParameters() { + return this.parameters != null; + } + + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRoleName(); + } else { + setRoleName((String)value); + } + break; + + case DATABASE: + if (value == null) { + unsetDatabase(); + } else { + setDatabase((Database)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case OWNER_NAME: + if (value == null) { + unsetOwnerName(); + } else { + setOwnerName((String)value); + } + break; + + case PARAMETERS: + if (value == null) { + unsetParameters(); + } else { + setParameters((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE_NAME: + return getRoleName(); + + case DATABASE: + return getDatabase(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case OWNER_NAME: + return getOwnerName(); + + case PARAMETERS: + return getParameters(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROLE_NAME: + return isSetRoleName(); + case DATABASE: + return isSetDatabase(); + case CREATE_TIME: + return isSetCreateTime(); + case OWNER_NAME: + return isSetOwnerName(); + case PARAMETERS: + return isSetParameters(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Role) + return this.equals((Role)that); + return false; + } + + public boolean equals(Role that) { + if (that == null) + return false; + + boolean this_present_roleName = true && this.isSetRoleName(); + boolean that_present_roleName = true && that.isSetRoleName(); + if (this_present_roleName || that_present_roleName) { + if (!(this_present_roleName && that_present_roleName)) + return false; + if (!this.roleName.equals(that.roleName)) + return false; + } + + boolean this_present_database = true && this.isSetDatabase(); + boolean that_present_database = true && that.isSetDatabase(); + if (this_present_database || that_present_database) { + if (!(this_present_database && that_present_database)) + return false; + if (!this.database.equals(that.database)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_ownerName = true && this.isSetOwnerName(); + boolean that_present_ownerName = true && that.isSetOwnerName(); + if (this_present_ownerName || that_present_ownerName) { + if (!(this_present_ownerName && that_present_ownerName)) + return false; + if (!this.ownerName.equals(that.ownerName)) + return false; + } + + boolean this_present_parameters = true && this.isSetParameters(); + boolean that_present_parameters = true && that.isSetParameters(); + if (this_present_parameters || that_present_parameters) { + if (!(this_present_parameters && that_present_parameters)) + return false; + if (!this.parameters.equals(that.parameters)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Role other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Role typedOther = (Role)other; + + lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRoleName()) { + lastComparison = TBaseHelper.compareTo(this.roleName, typedOther.roleName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(typedOther.isSetDatabase()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatabase()) { + lastComparison = TBaseHelper.compareTo(this.database, typedOther.database); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(typedOther.isSetOwnerName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwnerName()) { + lastComparison = TBaseHelper.compareTo(this.ownerName, typedOther.ownerName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // ROLE_NAME + if (field.type == TType.STRING) { + this.roleName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DATABASE + if (field.type == TType.STRUCT) { + this.database = new Database(); + this.database.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // OWNER_NAME + if (field.type == TType.STRING) { + this.ownerName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // PARAMETERS + if (field.type == TType.MAP) { + { + TMap _map24 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map24.size); + for (int _i25 = 0; _i25 < _map24.size; ++_i25) + { + String _key26; + String _val27; + _key26 = iprot.readString(); + _val27 = iprot.readString(); + this.parameters.put(_key26, _val27); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.roleName != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.roleName); + oprot.writeFieldEnd(); + } + if (this.database != null) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + this.database.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.ownerName != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(this.ownerName); + oprot.writeFieldEnd(); + } + if (this.parameters != null) { + oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); + for (Map.Entry _iter28 : this.parameters.entrySet()) + { + oprot.writeString(_iter28.getKey()); + oprot.writeString(_iter28.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Role("); + boolean first = true; + + sb.append("roleName:"); + if (this.roleName == null) { + sb.append("null"); + } else { + sb.append(this.roleName); + } + first = false; + if (!first) sb.append(", "); + sb.append("database:"); + if (this.database == null) { + sb.append("null"); + } else { + sb.append(this.database); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("ownerName:"); + if (this.ownerName == null) { + sb.append("null"); + } else { + sb.append(this.ownerName); + } + first = false; + if (!first) sb.append(", "); + sb.append("parameters:"); + if (this.parameters == null) { + sb.append("null"); + } else { + sb.append(this.parameters); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (revision 1044070) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (working copy) @@ -369,14 +369,14 @@ case 1: // FIELD_SCHEMAS if (field.type == TType.LIST) { { - TList _list54 = iprot.readListBegin(); - this.fieldSchemas = new ArrayList(_list54.size); - for (int _i55 = 0; _i55 < _list54.size; ++_i55) + TList _list74 = iprot.readListBegin(); + this.fieldSchemas = new ArrayList(_list74.size); + for (int _i75 = 0; _i75 < _list74.size; ++_i75) { - FieldSchema _elem56; - _elem56 = new FieldSchema(); - _elem56.read(iprot); - this.fieldSchemas.add(_elem56); + FieldSchema _elem76; + _elem76 = new FieldSchema(); + _elem76.read(iprot); + this.fieldSchemas.add(_elem76); } iprot.readListEnd(); } @@ -387,15 +387,15 @@ case 2: // PROPERTIES if (field.type == TType.MAP) { { - TMap _map57 = iprot.readMapBegin(); - this.properties = new HashMap(2*_map57.size); - for (int _i58 = 0; _i58 < _map57.size; ++_i58) + TMap _map77 = iprot.readMapBegin(); + this.properties = new HashMap(2*_map77.size); + for (int _i78 = 0; _i78 < _map77.size; ++_i78) { - String _key59; - String _val60; - _key59 = iprot.readString(); - _val60 = iprot.readString(); - this.properties.put(_key59, _val60); + String _key79; + String _val80; + _key79 = iprot.readString(); + _val80 = iprot.readString(); + this.properties.put(_key79, _val80); } iprot.readMapEnd(); } @@ -420,9 +420,9 @@ oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.fieldSchemas.size())); - for (FieldSchema _iter61 : this.fieldSchemas) + for (FieldSchema _iter81 : this.fieldSchemas) { - _iter61.write(oprot); + _iter81.write(oprot); } oprot.writeListEnd(); } @@ -432,10 +432,10 @@ oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.properties.size())); - for (Map.Entry _iter62 : this.properties.entrySet()) + for (Map.Entry _iter82 : this.properties.entrySet()) { - oprot.writeString(_iter62.getKey()); - oprot.writeString(_iter62.getValue()); + oprot.writeString(_iter82.getKey()); + oprot.writeString(_iter82.getValue()); } oprot.writeMapEnd(); } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityColumn.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityColumn.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityColumn.java (revision 0) @@ -0,0 +1,1000 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class SecurityColumn implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("SecurityColumn"); + + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("isRole", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("isGroup", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)6); + private static final TField TABLE_FIELD_DESC = new TField("table", TType.STRUCT, (short)7); + private static final TField PARTITION_FIELD_DESC = new TField("partition", TType.STRUCT, (short)8); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)9); + + private String principalName; + private boolean isRole; + private boolean isGroup; + private String privileges; + private int createTime; + private String grantor; + private Table table; + private Partition partition; + private String column; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PRINCIPAL_NAME((short)1, "principalName"), + IS_ROLE((short)2, "isRole"), + IS_GROUP((short)3, "isGroup"), + PRIVILEGES((short)4, "privileges"), + CREATE_TIME((short)5, "createTime"), + GRANTOR((short)6, "grantor"), + TABLE((short)7, "table"), + PARTITION((short)8, "partition"), + COLUMN((short)9, "column"); + + 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: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; + case 4: // PRIVILEGES + return PRIVILEGES; + case 5: // CREATE_TIME + return CREATE_TIME; + case 6: // GRANTOR + return GRANTOR; + case 7: // TABLE + return TABLE; + case 8: // PARTITION + return PARTITION; + case 9: // COLUMN + return COLUMN; + 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 __ISROLE_ISSET_ID = 0; + private static final int __ISGROUP_ISSET_ID = 1; + private static final int __CREATETIME_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("isRole", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("isGroup", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE, new FieldMetaData("table", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + tmpMap.put(_Fields.PARTITION, new FieldMetaData("partition", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(SecurityColumn.class, metaDataMap); + } + + public SecurityColumn() { + } + + public SecurityColumn( + String principalName, + boolean isRole, + boolean isGroup, + String privileges, + int createTime, + String grantor, + Table table, + Partition partition, + String column) + { + this(); + this.principalName = principalName; + this.isRole = isRole; + setIsRoleIsSet(true); + this.isGroup = isGroup; + setIsGroupIsSet(true); + this.privileges = privileges; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.grantor = grantor; + this.table = table; + this.partition = partition; + this.column = column; + } + + /** + * Performs a deep copy on other. + */ + public SecurityColumn(SecurityColumn other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + this.isRole = other.isRole; + this.isGroup = other.isGroup; + if (other.isSetPrivileges()) { + this.privileges = other.privileges; + } + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetTable()) { + this.table = new Table(other.table); + } + if (other.isSetPartition()) { + this.partition = new Partition(other.partition); + } + if (other.isSetColumn()) { + this.column = other.column; + } + } + + public SecurityColumn deepCopy() { + return new SecurityColumn(this); + } + + @Override + public void clear() { + this.principalName = null; + setIsRoleIsSet(false); + this.isRole = false; + setIsGroupIsSet(false); + this.isGroup = false; + this.privileges = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.grantor = null; + this.table = null; + this.partition = null; + this.column = null; + } + + public String getPrincipalName() { + return this.principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public void unsetPrincipalName() { + this.principalName = null; + } + + /** Returns true if field principalName is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipalName() { + return this.principalName != null; + } + + public void setPrincipalNameIsSet(boolean value) { + if (!value) { + this.principalName = null; + } + } + + public boolean isIsRole() { + return this.isRole; + } + + public void setIsRole(boolean isRole) { + this.isRole = isRole; + setIsRoleIsSet(true); + } + + public void unsetIsRole() { + __isset_bit_vector.clear(__ISROLE_ISSET_ID); + } + + /** Returns true if field isRole is set (has been asigned a value) and false otherwise */ + public boolean isSetIsRole() { + return __isset_bit_vector.get(__ISROLE_ISSET_ID); + } + + public void setIsRoleIsSet(boolean value) { + __isset_bit_vector.set(__ISROLE_ISSET_ID, value); + } + + public boolean isIsGroup() { + return this.isGroup; + } + + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + setIsGroupIsSet(true); + } + + public void unsetIsGroup() { + __isset_bit_vector.clear(__ISGROUP_ISSET_ID); + } + + /** Returns true if field isGroup is set (has been asigned a value) and false otherwise */ + public boolean isSetIsGroup() { + return __isset_bit_vector.get(__ISGROUP_ISSET_ID); + } + + public void setIsGroupIsSet(boolean value) { + __isset_bit_vector.set(__ISGROUP_ISSET_ID, value); + } + + public String getPrivileges() { + return this.privileges; + } + + public void setPrivileges(String privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been asigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + } + + public String getGrantor() { + return this.grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void unsetGrantor() { + this.grantor = null; + } + + /** Returns true if field grantor is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantor() { + return this.grantor != null; + } + + public void setGrantorIsSet(boolean value) { + if (!value) { + this.grantor = null; + } + } + + public Table getTable() { + return this.table; + } + + public void setTable(Table table) { + this.table = table; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been asigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public Partition getPartition() { + return this.partition; + } + + public void setPartition(Partition partition) { + this.partition = partition; + } + + public void unsetPartition() { + this.partition = null; + } + + /** Returns true if field partition is set (has been asigned a value) and false otherwise */ + public boolean isSetPartition() { + return this.partition != null; + } + + public void setPartitionIsSet(boolean value) { + if (!value) { + this.partition = null; + } + } + + public String getColumn() { + return this.column; + } + + public void setColumn(String column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been asigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIsRole(); + } else { + setIsRole((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIsGroup(); + } else { + setIsGroup((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((Table)value); + } + break; + + case PARTITION: + if (value == null) { + unsetPartition(); + } else { + setPartition((Partition)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_NAME: + return getPrincipalName(); + + case IS_ROLE: + return new Boolean(isIsRole()); + + case IS_GROUP: + return new Boolean(isIsGroup()); + + case PRIVILEGES: + return getPrivileges(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + case TABLE: + return getTable(); + + case PARTITION: + return getPartition(); + + case COLUMN: + return getColumn(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_NAME: + return isSetPrincipalName(); + case IS_ROLE: + return isSetIsRole(); + case IS_GROUP: + return isSetIsGroup(); + case PRIVILEGES: + return isSetPrivileges(); + case CREATE_TIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + case TABLE: + return isSetTable(); + case PARTITION: + return isSetPartition(); + case COLUMN: + return isSetColumn(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SecurityColumn) + return this.equals((SecurityColumn)that); + return false; + } + + public boolean equals(SecurityColumn that) { + if (that == null) + return false; + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_isRole = true; + boolean that_present_isRole = true; + if (this_present_isRole || that_present_isRole) { + if (!(this_present_isRole && that_present_isRole)) + return false; + if (this.isRole != that.isRole) + return false; + } + + boolean this_present_isGroup = true; + boolean that_present_isGroup = true; + if (this_present_isGroup || that_present_isGroup) { + if (!(this_present_isGroup && that_present_isGroup)) + return false; + if (this.isGroup != that.isGroup) + 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_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_partition = true && this.isSetPartition(); + boolean that_present_partition = true && that.isSetPartition(); + if (this_present_partition || that_present_partition) { + if (!(this_present_partition && that_present_partition)) + return false; + if (!this.partition.equals(that.partition)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(SecurityColumn other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SecurityColumn typedOther = (SecurityColumn)other; + + lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(typedOther.isSetPrincipalName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalName()) { + lastComparison = TBaseHelper.compareTo(this.principalName, typedOther.principalName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsRole()).compareTo(typedOther.isSetIsRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsRole()) { + lastComparison = TBaseHelper.compareTo(this.isRole, typedOther.isRole); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsGroup()).compareTo(typedOther.isSetIsGroup()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsGroup()) { + lastComparison = TBaseHelper.compareTo(this.isGroup, typedOther.isGroup); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(typedOther.isSetGrantor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantor()) { + lastComparison = TBaseHelper.compareTo(this.grantor, typedOther.grantor); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable()).compareTo(typedOther.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = TBaseHelper.compareTo(this.table, typedOther.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartition()).compareTo(typedOther.isSetPartition()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartition()) { + lastComparison = TBaseHelper.compareTo(this.partition, typedOther.partition); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IS_ROLE + if (field.type == TType.BOOL) { + this.isRole = iprot.readBool(); + setIsRoleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.isGroup = iprot.readBool(); + setIsGroupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // PRIVILEGES + if (field.type == TType.STRING) { + this.privileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // GRANTOR + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // TABLE + if (field.type == TType.STRUCT) { + this.table = new Table(); + this.table.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // PARTITION + if (field.type == TType.STRUCT) { + this.partition = new Partition(); + this.partition.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 9: // COLUMN + if (field.type == TType.STRING) { + this.column = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.isRole); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.isGroup); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + oprot.writeString(this.privileges); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + if (this.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + this.table.write(oprot); + oprot.writeFieldEnd(); + } + if (this.partition != null) { + oprot.writeFieldBegin(PARTITION_FIELD_DESC); + this.partition.write(oprot); + oprot.writeFieldEnd(); + } + if (this.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeString(this.column); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SecurityColumn("); + boolean first = true; + + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRole:"); + sb.append(this.isRole); + first = false; + if (!first) sb.append(", "); + sb.append("isGroup:"); + sb.append(this.isGroup); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + sb.append(this.table); + } + first = false; + if (!first) sb.append(", "); + sb.append("partition:"); + if (this.partition == null) { + sb.append("null"); + } else { + sb.append(this.partition); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityDB.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityDB.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityDB.java (revision 0) @@ -0,0 +1,823 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class SecurityDB implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("SecurityDB"); + + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("isRole", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("isGroup", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)6); + private static final TField DB_FIELD_DESC = new TField("db", TType.STRUCT, (short)7); + + private String principalName; + private boolean isRole; + private boolean isGroup; + private String privileges; + private int createTime; + private String grantor; + private Database db; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PRINCIPAL_NAME((short)1, "principalName"), + IS_ROLE((short)2, "isRole"), + IS_GROUP((short)3, "isGroup"), + PRIVILEGES((short)4, "privileges"), + CREATE_TIME((short)5, "createTime"), + GRANTOR((short)6, "grantor"), + DB((short)7, "db"); + + 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: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; + case 4: // PRIVILEGES + return PRIVILEGES; + case 5: // CREATE_TIME + return CREATE_TIME; + case 6: // GRANTOR + return GRANTOR; + case 7: // DB + return DB; + 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 __ISROLE_ISSET_ID = 0; + private static final int __ISGROUP_ISSET_ID = 1; + private static final int __CREATETIME_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("isRole", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("isGroup", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DB, new FieldMetaData("db", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(SecurityDB.class, metaDataMap); + } + + public SecurityDB() { + } + + public SecurityDB( + String principalName, + boolean isRole, + boolean isGroup, + String privileges, + int createTime, + String grantor, + Database db) + { + this(); + this.principalName = principalName; + this.isRole = isRole; + setIsRoleIsSet(true); + this.isGroup = isGroup; + setIsGroupIsSet(true); + this.privileges = privileges; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.grantor = grantor; + this.db = db; + } + + /** + * Performs a deep copy on other. + */ + public SecurityDB(SecurityDB other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + this.isRole = other.isRole; + this.isGroup = other.isGroup; + if (other.isSetPrivileges()) { + this.privileges = other.privileges; + } + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetDb()) { + this.db = new Database(other.db); + } + } + + public SecurityDB deepCopy() { + return new SecurityDB(this); + } + + @Override + public void clear() { + this.principalName = null; + setIsRoleIsSet(false); + this.isRole = false; + setIsGroupIsSet(false); + this.isGroup = false; + this.privileges = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.grantor = null; + this.db = null; + } + + public String getPrincipalName() { + return this.principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public void unsetPrincipalName() { + this.principalName = null; + } + + /** Returns true if field principalName is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipalName() { + return this.principalName != null; + } + + public void setPrincipalNameIsSet(boolean value) { + if (!value) { + this.principalName = null; + } + } + + public boolean isIsRole() { + return this.isRole; + } + + public void setIsRole(boolean isRole) { + this.isRole = isRole; + setIsRoleIsSet(true); + } + + public void unsetIsRole() { + __isset_bit_vector.clear(__ISROLE_ISSET_ID); + } + + /** Returns true if field isRole is set (has been asigned a value) and false otherwise */ + public boolean isSetIsRole() { + return __isset_bit_vector.get(__ISROLE_ISSET_ID); + } + + public void setIsRoleIsSet(boolean value) { + __isset_bit_vector.set(__ISROLE_ISSET_ID, value); + } + + public boolean isIsGroup() { + return this.isGroup; + } + + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + setIsGroupIsSet(true); + } + + public void unsetIsGroup() { + __isset_bit_vector.clear(__ISGROUP_ISSET_ID); + } + + /** Returns true if field isGroup is set (has been asigned a value) and false otherwise */ + public boolean isSetIsGroup() { + return __isset_bit_vector.get(__ISGROUP_ISSET_ID); + } + + public void setIsGroupIsSet(boolean value) { + __isset_bit_vector.set(__ISGROUP_ISSET_ID, value); + } + + public String getPrivileges() { + return this.privileges; + } + + public void setPrivileges(String privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been asigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + } + + public String getGrantor() { + return this.grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void unsetGrantor() { + this.grantor = null; + } + + /** Returns true if field grantor is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantor() { + return this.grantor != null; + } + + public void setGrantorIsSet(boolean value) { + if (!value) { + this.grantor = null; + } + } + + public Database getDb() { + return this.db; + } + + public void setDb(Database db) { + this.db = db; + } + + public void unsetDb() { + this.db = null; + } + + /** Returns true if field db is set (has been asigned a value) and false otherwise */ + public boolean isSetDb() { + return this.db != null; + } + + public void setDbIsSet(boolean value) { + if (!value) { + this.db = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIsRole(); + } else { + setIsRole((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIsGroup(); + } else { + setIsGroup((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case DB: + if (value == null) { + unsetDb(); + } else { + setDb((Database)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_NAME: + return getPrincipalName(); + + case IS_ROLE: + return new Boolean(isIsRole()); + + case IS_GROUP: + return new Boolean(isIsGroup()); + + case PRIVILEGES: + return getPrivileges(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + case DB: + return getDb(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_NAME: + return isSetPrincipalName(); + case IS_ROLE: + return isSetIsRole(); + case IS_GROUP: + return isSetIsGroup(); + case PRIVILEGES: + return isSetPrivileges(); + case CREATE_TIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + case DB: + return isSetDb(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SecurityDB) + return this.equals((SecurityDB)that); + return false; + } + + public boolean equals(SecurityDB that) { + if (that == null) + return false; + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_isRole = true; + boolean that_present_isRole = true; + if (this_present_isRole || that_present_isRole) { + if (!(this_present_isRole && that_present_isRole)) + return false; + if (this.isRole != that.isRole) + return false; + } + + boolean this_present_isGroup = true; + boolean that_present_isGroup = true; + if (this_present_isGroup || that_present_isGroup) { + if (!(this_present_isGroup && that_present_isGroup)) + return false; + if (this.isGroup != that.isGroup) + 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_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_db = true && this.isSetDb(); + boolean that_present_db = true && that.isSetDb(); + if (this_present_db || that_present_db) { + if (!(this_present_db && that_present_db)) + return false; + if (!this.db.equals(that.db)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(SecurityDB other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SecurityDB typedOther = (SecurityDB)other; + + lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(typedOther.isSetPrincipalName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalName()) { + lastComparison = TBaseHelper.compareTo(this.principalName, typedOther.principalName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsRole()).compareTo(typedOther.isSetIsRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsRole()) { + lastComparison = TBaseHelper.compareTo(this.isRole, typedOther.isRole); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsGroup()).compareTo(typedOther.isSetIsGroup()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsGroup()) { + lastComparison = TBaseHelper.compareTo(this.isGroup, typedOther.isGroup); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(typedOther.isSetGrantor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantor()) { + lastComparison = TBaseHelper.compareTo(this.grantor, typedOther.grantor); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDb()).compareTo(typedOther.isSetDb()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb()) { + lastComparison = TBaseHelper.compareTo(this.db, typedOther.db); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IS_ROLE + if (field.type == TType.BOOL) { + this.isRole = iprot.readBool(); + setIsRoleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.isGroup = iprot.readBool(); + setIsGroupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // PRIVILEGES + if (field.type == TType.STRING) { + this.privileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // GRANTOR + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // DB + if (field.type == TType.STRUCT) { + this.db = new Database(); + this.db.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.isRole); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.isGroup); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + oprot.writeString(this.privileges); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + if (this.db != null) { + oprot.writeFieldBegin(DB_FIELD_DESC); + this.db.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SecurityDB("); + boolean first = true; + + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRole:"); + sb.append(this.isRole); + first = false; + if (!first) sb.append(", "); + sb.append("isGroup:"); + sb.append(this.isGroup); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("db:"); + if (this.db == null) { + sb.append("null"); + } else { + sb.append(this.db); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityTablePartition.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityTablePartition.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityTablePartition.java (revision 0) @@ -0,0 +1,912 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class SecurityTablePartition implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("SecurityTablePartition"); + + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("isRole", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("isGroup", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)6); + private static final TField TABLE_FIELD_DESC = new TField("table", TType.STRUCT, (short)7); + private static final TField PART_FIELD_DESC = new TField("part", TType.STRUCT, (short)8); + + private String principalName; + private boolean isRole; + private boolean isGroup; + private String privileges; + private int createTime; + private String grantor; + private Table table; + private Partition part; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PRINCIPAL_NAME((short)1, "principalName"), + IS_ROLE((short)2, "isRole"), + IS_GROUP((short)3, "isGroup"), + PRIVILEGES((short)4, "privileges"), + CREATE_TIME((short)5, "createTime"), + GRANTOR((short)6, "grantor"), + TABLE((short)7, "table"), + PART((short)8, "part"); + + 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: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; + case 4: // PRIVILEGES + return PRIVILEGES; + case 5: // CREATE_TIME + return CREATE_TIME; + case 6: // GRANTOR + return GRANTOR; + case 7: // TABLE + return TABLE; + case 8: // PART + return PART; + 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 __ISROLE_ISSET_ID = 0; + private static final int __ISGROUP_ISSET_ID = 1; + private static final int __CREATETIME_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("isRole", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("isGroup", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE, new FieldMetaData("table", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + tmpMap.put(_Fields.PART, new FieldMetaData("part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(SecurityTablePartition.class, metaDataMap); + } + + public SecurityTablePartition() { + } + + public SecurityTablePartition( + String principalName, + boolean isRole, + boolean isGroup, + String privileges, + int createTime, + String grantor, + Table table, + Partition part) + { + this(); + this.principalName = principalName; + this.isRole = isRole; + setIsRoleIsSet(true); + this.isGroup = isGroup; + setIsGroupIsSet(true); + this.privileges = privileges; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.grantor = grantor; + this.table = table; + this.part = part; + } + + /** + * Performs a deep copy on other. + */ + public SecurityTablePartition(SecurityTablePartition other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + this.isRole = other.isRole; + this.isGroup = other.isGroup; + if (other.isSetPrivileges()) { + this.privileges = other.privileges; + } + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetTable()) { + this.table = new Table(other.table); + } + if (other.isSetPart()) { + this.part = new Partition(other.part); + } + } + + public SecurityTablePartition deepCopy() { + return new SecurityTablePartition(this); + } + + @Override + public void clear() { + this.principalName = null; + setIsRoleIsSet(false); + this.isRole = false; + setIsGroupIsSet(false); + this.isGroup = false; + this.privileges = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.grantor = null; + this.table = null; + this.part = null; + } + + public String getPrincipalName() { + return this.principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public void unsetPrincipalName() { + this.principalName = null; + } + + /** Returns true if field principalName is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipalName() { + return this.principalName != null; + } + + public void setPrincipalNameIsSet(boolean value) { + if (!value) { + this.principalName = null; + } + } + + public boolean isIsRole() { + return this.isRole; + } + + public void setIsRole(boolean isRole) { + this.isRole = isRole; + setIsRoleIsSet(true); + } + + public void unsetIsRole() { + __isset_bit_vector.clear(__ISROLE_ISSET_ID); + } + + /** Returns true if field isRole is set (has been asigned a value) and false otherwise */ + public boolean isSetIsRole() { + return __isset_bit_vector.get(__ISROLE_ISSET_ID); + } + + public void setIsRoleIsSet(boolean value) { + __isset_bit_vector.set(__ISROLE_ISSET_ID, value); + } + + public boolean isIsGroup() { + return this.isGroup; + } + + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + setIsGroupIsSet(true); + } + + public void unsetIsGroup() { + __isset_bit_vector.clear(__ISGROUP_ISSET_ID); + } + + /** Returns true if field isGroup is set (has been asigned a value) and false otherwise */ + public boolean isSetIsGroup() { + return __isset_bit_vector.get(__ISGROUP_ISSET_ID); + } + + public void setIsGroupIsSet(boolean value) { + __isset_bit_vector.set(__ISGROUP_ISSET_ID, value); + } + + public String getPrivileges() { + return this.privileges; + } + + public void setPrivileges(String privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been asigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + } + + public String getGrantor() { + return this.grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void unsetGrantor() { + this.grantor = null; + } + + /** Returns true if field grantor is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantor() { + return this.grantor != null; + } + + public void setGrantorIsSet(boolean value) { + if (!value) { + this.grantor = null; + } + } + + public Table getTable() { + return this.table; + } + + public void setTable(Table table) { + this.table = table; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been asigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public Partition getPart() { + return this.part; + } + + public void setPart(Partition part) { + this.part = part; + } + + public void unsetPart() { + this.part = null; + } + + /** Returns true if field part is set (has been asigned a value) and false otherwise */ + public boolean isSetPart() { + return this.part != null; + } + + public void setPartIsSet(boolean value) { + if (!value) { + this.part = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIsRole(); + } else { + setIsRole((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIsGroup(); + } else { + setIsGroup((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((Table)value); + } + break; + + case PART: + if (value == null) { + unsetPart(); + } else { + setPart((Partition)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_NAME: + return getPrincipalName(); + + case IS_ROLE: + return new Boolean(isIsRole()); + + case IS_GROUP: + return new Boolean(isIsGroup()); + + case PRIVILEGES: + return getPrivileges(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + case TABLE: + return getTable(); + + case PART: + return getPart(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_NAME: + return isSetPrincipalName(); + case IS_ROLE: + return isSetIsRole(); + case IS_GROUP: + return isSetIsGroup(); + case PRIVILEGES: + return isSetPrivileges(); + case CREATE_TIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + case TABLE: + return isSetTable(); + case PART: + return isSetPart(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SecurityTablePartition) + return this.equals((SecurityTablePartition)that); + return false; + } + + public boolean equals(SecurityTablePartition that) { + if (that == null) + return false; + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_isRole = true; + boolean that_present_isRole = true; + if (this_present_isRole || that_present_isRole) { + if (!(this_present_isRole && that_present_isRole)) + return false; + if (this.isRole != that.isRole) + return false; + } + + boolean this_present_isGroup = true; + boolean that_present_isGroup = true; + if (this_present_isGroup || that_present_isGroup) { + if (!(this_present_isGroup && that_present_isGroup)) + return false; + if (this.isGroup != that.isGroup) + 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_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_part = true && this.isSetPart(); + boolean that_present_part = true && that.isSetPart(); + if (this_present_part || that_present_part) { + if (!(this_present_part && that_present_part)) + return false; + if (!this.part.equals(that.part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(SecurityTablePartition other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SecurityTablePartition typedOther = (SecurityTablePartition)other; + + lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(typedOther.isSetPrincipalName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalName()) { + lastComparison = TBaseHelper.compareTo(this.principalName, typedOther.principalName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsRole()).compareTo(typedOther.isSetIsRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsRole()) { + lastComparison = TBaseHelper.compareTo(this.isRole, typedOther.isRole); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsGroup()).compareTo(typedOther.isSetIsGroup()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsGroup()) { + lastComparison = TBaseHelper.compareTo(this.isGroup, typedOther.isGroup); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(typedOther.isSetGrantor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantor()) { + lastComparison = TBaseHelper.compareTo(this.grantor, typedOther.grantor); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable()).compareTo(typedOther.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = TBaseHelper.compareTo(this.table, typedOther.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart()).compareTo(typedOther.isSetPart()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart()) { + lastComparison = TBaseHelper.compareTo(this.part, typedOther.part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IS_ROLE + if (field.type == TType.BOOL) { + this.isRole = iprot.readBool(); + setIsRoleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.isGroup = iprot.readBool(); + setIsGroupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // PRIVILEGES + if (field.type == TType.STRING) { + this.privileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // GRANTOR + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // TABLE + if (field.type == TType.STRUCT) { + this.table = new Table(); + this.table.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // PART + if (field.type == TType.STRUCT) { + this.part = new Partition(); + this.part.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.isRole); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.isGroup); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + oprot.writeString(this.privileges); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + if (this.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + this.table.write(oprot); + oprot.writeFieldEnd(); + } + if (this.part != null) { + oprot.writeFieldBegin(PART_FIELD_DESC); + this.part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SecurityTablePartition("); + boolean first = true; + + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRole:"); + sb.append(this.isRole); + first = false; + if (!first) sb.append(", "); + sb.append("isGroup:"); + sb.append(this.isGroup); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + sb.append(this.table); + } + first = false; + if (!first) sb.append(", "); + sb.append("part:"); + if (this.part == null) { + sb.append("null"); + } else { + sb.append(this.part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityUser.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityUser.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityUser.java (revision 0) @@ -0,0 +1,734 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class SecurityUser implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("SecurityUser"); + + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("isRole", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("isGroup", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)6); + + private String principalName; + private boolean isRole; + private boolean isGroup; + private String privileges; + private int createTime; + private String grantor; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PRINCIPAL_NAME((short)1, "principalName"), + IS_ROLE((short)2, "isRole"), + IS_GROUP((short)3, "isGroup"), + PRIVILEGES((short)4, "privileges"), + CREATE_TIME((short)5, "createTime"), + GRANTOR((short)6, "grantor"); + + 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: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; + case 4: // PRIVILEGES + return PRIVILEGES; + case 5: // CREATE_TIME + return CREATE_TIME; + case 6: // GRANTOR + return GRANTOR; + 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 __ISROLE_ISSET_ID = 0; + private static final int __ISGROUP_ISSET_ID = 1; + private static final int __CREATETIME_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("isRole", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("isGroup", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(SecurityUser.class, metaDataMap); + } + + public SecurityUser() { + } + + public SecurityUser( + String principalName, + boolean isRole, + boolean isGroup, + String privileges, + int createTime, + String grantor) + { + this(); + this.principalName = principalName; + this.isRole = isRole; + setIsRoleIsSet(true); + this.isGroup = isGroup; + setIsGroupIsSet(true); + this.privileges = privileges; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.grantor = grantor; + } + + /** + * Performs a deep copy on other. + */ + public SecurityUser(SecurityUser other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + this.isRole = other.isRole; + this.isGroup = other.isGroup; + if (other.isSetPrivileges()) { + this.privileges = other.privileges; + } + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + } + + public SecurityUser deepCopy() { + return new SecurityUser(this); + } + + @Override + public void clear() { + this.principalName = null; + setIsRoleIsSet(false); + this.isRole = false; + setIsGroupIsSet(false); + this.isGroup = false; + this.privileges = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.grantor = null; + } + + public String getPrincipalName() { + return this.principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public void unsetPrincipalName() { + this.principalName = null; + } + + /** Returns true if field principalName is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipalName() { + return this.principalName != null; + } + + public void setPrincipalNameIsSet(boolean value) { + if (!value) { + this.principalName = null; + } + } + + public boolean isIsRole() { + return this.isRole; + } + + public void setIsRole(boolean isRole) { + this.isRole = isRole; + setIsRoleIsSet(true); + } + + public void unsetIsRole() { + __isset_bit_vector.clear(__ISROLE_ISSET_ID); + } + + /** Returns true if field isRole is set (has been asigned a value) and false otherwise */ + public boolean isSetIsRole() { + return __isset_bit_vector.get(__ISROLE_ISSET_ID); + } + + public void setIsRoleIsSet(boolean value) { + __isset_bit_vector.set(__ISROLE_ISSET_ID, value); + } + + public boolean isIsGroup() { + return this.isGroup; + } + + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + setIsGroupIsSet(true); + } + + public void unsetIsGroup() { + __isset_bit_vector.clear(__ISGROUP_ISSET_ID); + } + + /** Returns true if field isGroup is set (has been asigned a value) and false otherwise */ + public boolean isSetIsGroup() { + return __isset_bit_vector.get(__ISGROUP_ISSET_ID); + } + + public void setIsGroupIsSet(boolean value) { + __isset_bit_vector.set(__ISGROUP_ISSET_ID, value); + } + + public String getPrivileges() { + return this.privileges; + } + + public void setPrivileges(String privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been asigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + public void unsetCreateTime() { + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); + } + + public String getGrantor() { + return this.grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void unsetGrantor() { + this.grantor = null; + } + + /** Returns true if field grantor is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantor() { + return this.grantor != null; + } + + public void setGrantorIsSet(boolean value) { + if (!value) { + this.grantor = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIsRole(); + } else { + setIsRole((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIsGroup(); + } else { + setIsGroup((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRINCIPAL_NAME: + return getPrincipalName(); + + case IS_ROLE: + return new Boolean(isIsRole()); + + case IS_GROUP: + return new Boolean(isIsGroup()); + + case PRIVILEGES: + return getPrivileges(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRINCIPAL_NAME: + return isSetPrincipalName(); + case IS_ROLE: + return isSetIsRole(); + case IS_GROUP: + return isSetIsGroup(); + case PRIVILEGES: + return isSetPrivileges(); + case CREATE_TIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SecurityUser) + return this.equals((SecurityUser)that); + return false; + } + + public boolean equals(SecurityUser that) { + if (that == null) + return false; + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_isRole = true; + boolean that_present_isRole = true; + if (this_present_isRole || that_present_isRole) { + if (!(this_present_isRole && that_present_isRole)) + return false; + if (this.isRole != that.isRole) + return false; + } + + boolean this_present_isGroup = true; + boolean that_present_isGroup = true; + if (this_present_isGroup || that_present_isGroup) { + if (!(this_present_isGroup && that_present_isGroup)) + return false; + if (this.isGroup != that.isGroup) + 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_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(SecurityUser other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SecurityUser typedOther = (SecurityUser)other; + + lastComparison = Boolean.valueOf(isSetPrincipalName()).compareTo(typedOther.isSetPrincipalName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalName()) { + lastComparison = TBaseHelper.compareTo(this.principalName, typedOther.principalName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsRole()).compareTo(typedOther.isSetIsRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsRole()) { + lastComparison = TBaseHelper.compareTo(this.isRole, typedOther.isRole); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsGroup()).compareTo(typedOther.isSetIsGroup()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsGroup()) { + lastComparison = TBaseHelper.compareTo(this.isGroup, typedOther.isGroup); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(typedOther.isSetGrantor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantor()) { + lastComparison = TBaseHelper.compareTo(this.grantor, typedOther.grantor); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IS_ROLE + if (field.type == TType.BOOL) { + this.isRole = iprot.readBool(); + setIsRoleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.isGroup = iprot.readBool(); + setIsGroupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // PRIVILEGES + if (field.type == TType.STRING) { + this.privileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // GRANTOR + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.isRole); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.isGroup); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + oprot.writeString(this.privileges); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SecurityUser("); + boolean first = true; + + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRole:"); + sb.append(this.isRole); + first = false; + if (!first) sb.append(", "); + sb.append("isGroup:"); + sb.append(this.isGroup); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (revision 1044070) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (working copy) @@ -431,15 +431,15 @@ case 3: // PARAMETERS if (field.type == TType.MAP) { { - TMap _map9 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map9.size); - for (int _i10 = 0; _i10 < _map9.size; ++_i10) + TMap _map29 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map29.size); + for (int _i30 = 0; _i30 < _map29.size; ++_i30) { - String _key11; - String _val12; - _key11 = iprot.readString(); - _val12 = iprot.readString(); - this.parameters.put(_key11, _val12); + String _key31; + String _val32; + _key31 = iprot.readString(); + _val32 = iprot.readString(); + this.parameters.put(_key31, _val32); } iprot.readMapEnd(); } @@ -474,10 +474,10 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter13 : this.parameters.entrySet()) + for (Map.Entry _iter33 : this.parameters.entrySet()) { - oprot.writeString(_iter13.getKey()); - oprot.writeString(_iter13.getValue()); + oprot.writeString(_iter33.getKey()); + oprot.writeString(_iter33.getValue()); } oprot.writeMapEnd(); } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (revision 1044070) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (working copy) @@ -956,14 +956,14 @@ case 1: // COLS if (field.type == TType.LIST) { { - TList _list14 = iprot.readListBegin(); - this.cols = new ArrayList(_list14.size); - for (int _i15 = 0; _i15 < _list14.size; ++_i15) + TList _list34 = iprot.readListBegin(); + this.cols = new ArrayList(_list34.size); + for (int _i35 = 0; _i35 < _list34.size; ++_i35) { - FieldSchema _elem16; - _elem16 = new FieldSchema(); - _elem16.read(iprot); - this.cols.add(_elem16); + FieldSchema _elem36; + _elem36 = new FieldSchema(); + _elem36.read(iprot); + this.cols.add(_elem36); } iprot.readListEnd(); } @@ -1019,13 +1019,13 @@ case 8: // BUCKET_COLS if (field.type == TType.LIST) { { - TList _list17 = iprot.readListBegin(); - this.bucketCols = new ArrayList(_list17.size); - for (int _i18 = 0; _i18 < _list17.size; ++_i18) + TList _list37 = iprot.readListBegin(); + this.bucketCols = new ArrayList(_list37.size); + for (int _i38 = 0; _i38 < _list37.size; ++_i38) { - String _elem19; - _elem19 = iprot.readString(); - this.bucketCols.add(_elem19); + String _elem39; + _elem39 = iprot.readString(); + this.bucketCols.add(_elem39); } iprot.readListEnd(); } @@ -1036,14 +1036,14 @@ case 9: // SORT_COLS if (field.type == TType.LIST) { { - TList _list20 = iprot.readListBegin(); - this.sortCols = new ArrayList(_list20.size); - for (int _i21 = 0; _i21 < _list20.size; ++_i21) + TList _list40 = iprot.readListBegin(); + this.sortCols = new ArrayList(_list40.size); + for (int _i41 = 0; _i41 < _list40.size; ++_i41) { - Order _elem22; - _elem22 = new Order(); - _elem22.read(iprot); - this.sortCols.add(_elem22); + Order _elem42; + _elem42 = new Order(); + _elem42.read(iprot); + this.sortCols.add(_elem42); } iprot.readListEnd(); } @@ -1054,15 +1054,15 @@ case 10: // PARAMETERS if (field.type == TType.MAP) { { - TMap _map23 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map23.size); - for (int _i24 = 0; _i24 < _map23.size; ++_i24) + TMap _map43 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map43.size); + for (int _i44 = 0; _i44 < _map43.size; ++_i44) { - String _key25; - String _val26; - _key25 = iprot.readString(); - _val26 = iprot.readString(); - this.parameters.put(_key25, _val26); + String _key45; + String _val46; + _key45 = iprot.readString(); + _val46 = iprot.readString(); + this.parameters.put(_key45, _val46); } iprot.readMapEnd(); } @@ -1087,9 +1087,9 @@ oprot.writeFieldBegin(COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.cols.size())); - for (FieldSchema _iter27 : this.cols) + for (FieldSchema _iter47 : this.cols) { - _iter27.write(oprot); + _iter47.write(oprot); } oprot.writeListEnd(); } @@ -1125,9 +1125,9 @@ oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.bucketCols.size())); - for (String _iter28 : this.bucketCols) + for (String _iter48 : this.bucketCols) { - oprot.writeString(_iter28); + oprot.writeString(_iter48); } oprot.writeListEnd(); } @@ -1137,9 +1137,9 @@ oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.sortCols.size())); - for (Order _iter29 : this.sortCols) + for (Order _iter49 : this.sortCols) { - _iter29.write(oprot); + _iter49.write(oprot); } oprot.writeListEnd(); } @@ -1149,10 +1149,10 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter30 : this.parameters.entrySet()) + for (Map.Entry _iter50 : this.parameters.entrySet()) { - oprot.writeString(_iter30.getKey()); - oprot.writeString(_iter30.getValue()); + oprot.writeString(_iter50.getKey()); + oprot.writeString(_iter50.getValue()); } oprot.writeMapEnd(); } Index: metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (revision 1044070) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (working copy) @@ -41,6 +41,7 @@ private static final TField VIEW_ORIGINAL_TEXT_FIELD_DESC = new TField("viewOriginalText", TType.STRING, (short)10); private static final TField VIEW_EXPANDED_TEXT_FIELD_DESC = new TField("viewExpandedText", TType.STRING, (short)11); private static final TField TABLE_TYPE_FIELD_DESC = new TField("tableType", TType.STRING, (short)12); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)13); private String tableName; private String dbName; @@ -54,6 +55,7 @@ private String viewOriginalText; private String viewExpandedText; private String tableType; + private PrincipalPrivilegeSet privileges; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { @@ -68,7 +70,8 @@ PARAMETERS((short)9, "parameters"), VIEW_ORIGINAL_TEXT((short)10, "viewOriginalText"), VIEW_EXPANDED_TEXT((short)11, "viewExpandedText"), - TABLE_TYPE((short)12, "tableType"); + TABLE_TYPE((short)12, "tableType"), + PRIVILEGES((short)13, "privileges"); private static final Map byName = new HashMap(); @@ -107,6 +110,8 @@ return VIEW_EXPANDED_TEXT; case 12: // TABLE_TYPE return TABLE_TYPE; + case 13: // PRIVILEGES + return PRIVILEGES; default: return null; } @@ -182,6 +187,8 @@ new FieldValueMetaData(TType.STRING))); tmpMap.put(_Fields.TABLE_TYPE, new FieldMetaData("tableType", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap); } @@ -273,6 +280,9 @@ if (other.isSetTableType()) { this.tableType = other.tableType; } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } } public Table deepCopy() { @@ -296,6 +306,7 @@ this.viewOriginalText = null; this.viewExpandedText = null; this.tableType = null; + this.privileges = null; } public String getTableName() { @@ -597,6 +608,29 @@ } } + public PrincipalPrivilegeSet getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrincipalPrivilegeSet privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + /** Returns true if field privileges is set (has been asigned 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 TABLE_NAME: @@ -695,6 +729,14 @@ } break; + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + } } @@ -736,6 +778,9 @@ case TABLE_TYPE: return getTableType(); + case PRIVILEGES: + return getPrivileges(); + } throw new IllegalStateException(); } @@ -771,6 +816,8 @@ return isSetViewExpandedText(); case TABLE_TYPE: return isSetTableType(); + case PRIVILEGES: + return isSetPrivileges(); } throw new IllegalStateException(); } @@ -896,6 +943,15 @@ 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; } @@ -1032,6 +1088,16 @@ return lastComparison; } } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1105,14 +1171,14 @@ case 8: // PARTITION_KEYS if (field.type == TType.LIST) { { - TList _list31 = iprot.readListBegin(); - this.partitionKeys = new ArrayList(_list31.size); - for (int _i32 = 0; _i32 < _list31.size; ++_i32) + TList _list51 = iprot.readListBegin(); + this.partitionKeys = new ArrayList(_list51.size); + for (int _i52 = 0; _i52 < _list51.size; ++_i52) { - FieldSchema _elem33; - _elem33 = new FieldSchema(); - _elem33.read(iprot); - this.partitionKeys.add(_elem33); + FieldSchema _elem53; + _elem53 = new FieldSchema(); + _elem53.read(iprot); + this.partitionKeys.add(_elem53); } iprot.readListEnd(); } @@ -1123,15 +1189,15 @@ case 9: // PARAMETERS if (field.type == TType.MAP) { { - TMap _map34 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map34.size); - for (int _i35 = 0; _i35 < _map34.size; ++_i35) + TMap _map54 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map54.size); + for (int _i55 = 0; _i55 < _map54.size; ++_i55) { - String _key36; - String _val37; - _key36 = iprot.readString(); - _val37 = iprot.readString(); - this.parameters.put(_key36, _val37); + String _key56; + String _val57; + _key56 = iprot.readString(); + _val57 = iprot.readString(); + this.parameters.put(_key56, _val57); } iprot.readMapEnd(); } @@ -1160,6 +1226,14 @@ TProtocolUtil.skip(iprot, field.type); } break; + case 13: // PRIVILEGES + if (field.type == TType.STRUCT) { + this.privileges = new PrincipalPrivilegeSet(); + this.privileges.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; default: TProtocolUtil.skip(iprot, field.type); } @@ -1206,9 +1280,9 @@ oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.partitionKeys.size())); - for (FieldSchema _iter38 : this.partitionKeys) + for (FieldSchema _iter58 : this.partitionKeys) { - _iter38.write(oprot); + _iter58.write(oprot); } oprot.writeListEnd(); } @@ -1218,10 +1292,10 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter39 : this.parameters.entrySet()) + for (Map.Entry _iter59 : this.parameters.entrySet()) { - oprot.writeString(_iter39.getKey()); - oprot.writeString(_iter39.getValue()); + oprot.writeString(_iter59.getKey()); + oprot.writeString(_iter59.getValue()); } oprot.writeMapEnd(); } @@ -1242,6 +1316,13 @@ oprot.writeString(this.tableType); oprot.writeFieldEnd(); } + if (this.privileges != null) { + if (isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1334,6 +1415,16 @@ sb.append(this.tableType); } first = false; + if (isSetPrivileges()) { + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + } sb.append(")"); return sb.toString(); } Index: 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 (revision 1044070) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -79,14 +79,20 @@ public Partition get_partition(String db_name, String tbl_name, List part_vals) throws MetaException, NoSuchObjectException, TException; + public Partition get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws MetaException, NoSuchObjectException, TException; + public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, TException; public List get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, TException; + public List get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, TException; + public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, TException; public List get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException; + public List get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, TException; + public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException; public List get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, TException; @@ -111,6 +117,42 @@ public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, TException; + public PrincipalPrivilegeSet get_user_privilege_set(String user_name, List group_names) throws MetaException, TException; + + public PrincipalPrivilegeSet get_db_privilege_set(String db_name, String user_name, List group_names) throws MetaException, TException; + + public PrincipalPrivilegeSet get_table_privilege_set(String db_name, String table_name, String user_name, List group_names) throws MetaException, TException; + + public PrincipalPrivilegeSet get_partition_privilege_set(String db_name, String table_name, String part_name, String user_name, List group_names) throws MetaException, TException; + + public PrincipalPrivilegeSet get_column_privilege_set(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names) throws MetaException, TException; + + public boolean create_role(String role_name, String owner_name, String db_name) throws MetaException, TException; + + public boolean drop_role(String role_name, String db_name) throws MetaException, TException; + + public boolean add_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + public boolean remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + public List list_roles(String principal_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + public List list_security_user_grant(String principla_name, boolean is_role, boolean is_group) throws MetaException, TException; + + public List list_security_db_grant(String principal_name, boolean is_group, boolean is_role, String db_name) throws MetaException, TException; + + public List list_security_table_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name) throws MetaException, TException; + + public List list_security_partition_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name) throws MetaException, TException; + + public List list_security_column_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name) throws MetaException, TException; + + public boolean grant_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor) throws MetaException, TException; + + public boolean revoke_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges) throws MetaException, TException; + + public boolean revoke_all_privileges(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns) throws MetaException, TException; + } public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface { @@ -161,14 +203,20 @@ public void get_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException; + public void get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + public void get_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException; public void get_partitions(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException; + public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + public void get_partition_names(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException; public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException; + public void get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException; public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback resultHandler) throws TException; @@ -193,6 +241,42 @@ public void get_index_names(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException; + public void get_user_privilege_set(String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + + public void get_db_privilege_set(String db_name, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + + public void get_table_privilege_set(String db_name, String table_name, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + + public void get_partition_privilege_set(String db_name, String table_name, String part_name, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + + public void get_column_privilege_set(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + + public void create_role(String role_name, String owner_name, String db_name, AsyncMethodCallback resultHandler) throws TException; + + public void drop_role(String role_name, String db_name, AsyncMethodCallback resultHandler) throws TException; + + public void add_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler) throws TException; + + public void remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler) throws TException; + + public void list_roles(String principal_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler) throws TException; + + public void list_security_user_grant(String principla_name, boolean is_role, boolean is_group, AsyncMethodCallback resultHandler) throws TException; + + public void list_security_db_grant(String principal_name, boolean is_group, boolean is_role, String db_name, AsyncMethodCallback resultHandler) throws TException; + + public void list_security_table_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException; + + public void list_security_partition_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, AsyncMethodCallback resultHandler) throws TException; + + public void list_security_column_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name, AsyncMethodCallback resultHandler) throws TException; + + public void grant_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor, AsyncMethodCallback resultHandler) throws TException; + + public void revoke_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, AsyncMethodCallback resultHandler) throws TException; + + public void revoke_all_privileges(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns, AsyncMethodCallback resultHandler) throws TException; + } public static class Client extends com.facebook.fb303.FacebookService.Client implements TServiceClient, Iface { @@ -1202,6 +1286,52 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); } + public Partition get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws MetaException, NoSuchObjectException, TException + { + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + return recv_get_partition_with_auth(); + } + + public void send_get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.CALL, ++seqid_)); + get_partition_with_auth_args args = new get_partition_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public Partition recv_get_partition_with_auth() throws MetaException, NoSuchObjectException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partition_with_auth failed: out of sequence response"); + } + get_partition_with_auth_result result = new get_partition_with_auth_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result"); + } + public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, TException { send_get_partition_by_name(db_name, tbl_name, part_name); @@ -1290,6 +1420,52 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); } + public List get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, TException + { + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + return recv_get_partitions_with_auth(); + } + + public void send_get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.CALL, ++seqid_)); + get_partitions_with_auth_args args = new get_partitions_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_partitions_with_auth() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partitions_with_auth failed: out of sequence response"); + } + get_partitions_with_auth_result result = new get_partitions_with_auth_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); + } + public List get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, TException { send_get_partition_names(db_name, tbl_name, max_parts); @@ -1373,6 +1549,53 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); } + public List get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws NoSuchObjectException, MetaException, TException + { + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); + return recv_get_partitions_ps_with_auth(); + } + + public void send_get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.CALL, ++seqid_)); + get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_get_partitions_ps_with_auth() throws NoSuchObjectException, MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partitions_ps_with_auth failed: out of sequence response"); + } + get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); + } + public List get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws MetaException, TException { send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); @@ -1881,1116 +2104,1224 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); } - } - public static class AsyncClient extends com.facebook.fb303.FacebookService.AsyncClient implements AsyncIface { - public static class Factory implements TAsyncClientFactory { - private TAsyncClientManager clientManager; - private TProtocolFactory protocolFactory; - public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { - this.clientManager = clientManager; - this.protocolFactory = protocolFactory; - } - public AsyncClient getAsyncClient(TNonblockingTransport transport) { - return new AsyncClient(protocolFactory, clientManager, transport); - } - } - - public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { - super(protocolFactory, clientManager, transport); + public PrincipalPrivilegeSet get_user_privilege_set(String user_name, List group_names) throws MetaException, TException + { + send_get_user_privilege_set(user_name, group_names); + return recv_get_user_privilege_set(); } - public void create_database(Database database, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - create_database_call method_call = new create_database_call(database, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public void send_get_user_privilege_set(String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_user_privilege_set", TMessageType.CALL, ++seqid_)); + get_user_privilege_set_args args = new get_user_privilege_set_args(); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); } - public static class create_database_call extends TAsyncMethodCall { - private Database database; - public create_database_call(Database database, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.database = database; + public PrincipalPrivilegeSet recv_get_user_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("create_database", TMessageType.CALL, 0)); - create_database_args args = new create_database_args(); - args.setDatabase(database); - args.write(prot); - prot.writeMessageEnd(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_user_privilege_set failed: out of sequence response"); } - - public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_create_database(); + get_user_privilege_set_result result = new get_user_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_user_privilege_set failed: unknown result"); } - public void get_database(String name, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_database_call method_call = new get_database_call(name, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public PrincipalPrivilegeSet get_db_privilege_set(String db_name, String user_name, List group_names) throws MetaException, TException + { + send_get_db_privilege_set(db_name, user_name, group_names); + return recv_get_db_privilege_set(); } - public static class get_database_call extends TAsyncMethodCall { - private String name; - public get_database_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; + public void send_get_db_privilege_set(String db_name, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_db_privilege_set", TMessageType.CALL, ++seqid_)); + get_db_privilege_set_args args = new get_db_privilege_set_args(); + args.setDb_name(db_name); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public PrincipalPrivilegeSet recv_get_db_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_database", TMessageType.CALL, 0)); - get_database_args args = new get_database_args(); - args.setName(name); - args.write(prot); - prot.writeMessageEnd(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_db_privilege_set failed: out of sequence response"); } - - public Database getResult() throws NoSuchObjectException, MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_database(); + get_db_privilege_set_result result = new get_db_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_db_privilege_set failed: unknown result"); } - public void drop_database(String name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - drop_database_call method_call = new drop_database_call(name, deleteData, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public PrincipalPrivilegeSet get_table_privilege_set(String db_name, String table_name, String user_name, List group_names) throws MetaException, TException + { + send_get_table_privilege_set(db_name, table_name, user_name, group_names); + return recv_get_table_privilege_set(); } - public static class drop_database_call extends TAsyncMethodCall { - private String name; - private boolean deleteData; - public drop_database_call(String name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - this.deleteData = deleteData; - } + public void send_get_table_privilege_set(String db_name, String table_name, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_table_privilege_set", TMessageType.CALL, ++seqid_)); + get_table_privilege_set_args args = new get_table_privilege_set_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("drop_database", TMessageType.CALL, 0)); - drop_database_args args = new drop_database_args(); - args.setName(name); - args.setDeleteData(deleteData); - args.write(prot); - prot.writeMessageEnd(); + public PrincipalPrivilegeSet recv_get_table_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public void getResult() throws NoSuchObjectException, InvalidOperationException, MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_drop_database(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_table_privilege_set failed: out of sequence response"); } - } - - public void get_databases(String pattern, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_databases_call method_call = new get_databases_call(pattern, resultHandler, this, protocolFactory, transport); - manager.call(method_call); - } - - public static class get_databases_call extends TAsyncMethodCall { - private String pattern; - public get_databases_call(String pattern, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.pattern = pattern; + get_table_privilege_set_result result = new get_table_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; } - - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_databases", TMessageType.CALL, 0)); - get_databases_args args = new get_databases_args(); - args.setPattern(pattern); - args.write(prot); - prot.writeMessageEnd(); + if (result.o1 != null) { + throw result.o1; } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_table_privilege_set failed: unknown result"); + } - public List getResult() throws MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_databases(); - } + public PrincipalPrivilegeSet get_partition_privilege_set(String db_name, String table_name, String part_name, String user_name, List group_names) throws MetaException, TException + { + send_get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names); + return recv_get_partition_privilege_set(); } - public void get_all_databases(AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_all_databases_call method_call = new get_all_databases_call(resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public void send_get_partition_privilege_set(String db_name, String table_name, String part_name, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_partition_privilege_set", TMessageType.CALL, ++seqid_)); + get_partition_privilege_set_args args = new get_partition_privilege_set_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setPart_name(part_name); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); } - public static class get_all_databases_call extends TAsyncMethodCall { - public get_all_databases_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); + public PrincipalPrivilegeSet recv_get_partition_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.CALL, 0)); - get_all_databases_args args = new get_all_databases_args(); - args.write(prot); - prot.writeMessageEnd(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partition_privilege_set failed: out of sequence response"); } - - public List getResult() throws MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_all_databases(); + get_partition_privilege_set_result result = new get_partition_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_privilege_set failed: unknown result"); } - public void get_type(String name, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_type_call method_call = new get_type_call(name, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public PrincipalPrivilegeSet get_column_privilege_set(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names) throws MetaException, TException + { + send_get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names); + return recv_get_column_privilege_set(); } - public static class get_type_call extends TAsyncMethodCall { - private String name; - public get_type_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - } + public void send_get_column_privilege_set(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_column_privilege_set", TMessageType.CALL, ++seqid_)); + get_column_privilege_set_args args = new get_column_privilege_set_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setPart_name(part_name); + args.setColumn_name(column_name); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_type", TMessageType.CALL, 0)); - get_type_args args = new get_type_args(); - args.setName(name); - args.write(prot); - prot.writeMessageEnd(); + public PrincipalPrivilegeSet recv_get_column_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public Type getResult() throws MetaException, NoSuchObjectException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_type(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_column_privilege_set failed: out of sequence response"); + } + get_column_privilege_set_result result = new get_column_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_column_privilege_set failed: unknown result"); } - public void create_type(Type type, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - create_type_call method_call = new create_type_call(type, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public boolean create_role(String role_name, String owner_name, String db_name) throws MetaException, TException + { + send_create_role(role_name, owner_name, db_name); + return recv_create_role(); } - public static class create_type_call extends TAsyncMethodCall { - private Type type; - public create_type_call(Type type, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.type = type; - } + public void send_create_role(String role_name, String owner_name, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("create_role", TMessageType.CALL, ++seqid_)); + create_role_args args = new create_role_args(); + args.setRole_name(role_name); + args.setOwner_name(owner_name); + args.setDb_name(db_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("create_type", TMessageType.CALL, 0)); - create_type_args args = new create_type_args(); - args.setType(type); - args.write(prot); - prot.writeMessageEnd(); + public boolean recv_create_role() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public boolean getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_create_type(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "create_role failed: out of sequence response"); + } + create_role_result result = new create_role_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "create_role failed: unknown result"); } - public void drop_type(String type, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - drop_type_call method_call = new drop_type_call(type, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public boolean drop_role(String role_name, String db_name) throws MetaException, TException + { + send_drop_role(role_name, db_name); + return recv_drop_role(); } - public static class drop_type_call extends TAsyncMethodCall { - private String type; - public drop_type_call(String type, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.type = type; - } + public void send_drop_role(String role_name, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("drop_role", TMessageType.CALL, ++seqid_)); + drop_role_args args = new drop_role_args(); + args.setRole_name(role_name); + args.setDb_name(db_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("drop_type", TMessageType.CALL, 0)); - drop_type_args args = new drop_type_args(); - args.setType(type); - args.write(prot); - prot.writeMessageEnd(); + public boolean recv_drop_role() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public boolean getResult() throws MetaException, NoSuchObjectException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_type(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "drop_role failed: out of sequence response"); + } + drop_role_result result = new drop_role_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_role failed: unknown result"); } - public void get_type_all(String name, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_type_all_call method_call = new get_type_all_call(name, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public boolean add_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException + { + send_add_role_member(role_name, user_name, is_role, is_group, db_name); + return recv_add_role_member(); } - public static class get_type_all_call extends TAsyncMethodCall { - private String name; - public get_type_all_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.name = name; - } + public void send_add_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("add_role_member", TMessageType.CALL, ++seqid_)); + add_role_member_args args = new add_role_member_args(); + args.setRole_name(role_name); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setDb_name(db_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_type_all", TMessageType.CALL, 0)); - get_type_all_args args = new get_type_all_args(); - args.setName(name); - args.write(prot); - prot.writeMessageEnd(); + public boolean recv_add_role_member() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public Map getResult() throws MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_type_all(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "add_role_member failed: out of sequence response"); + } + add_role_member_result result = new add_role_member_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "add_role_member failed: unknown result"); } - public void get_fields(String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_fields_call method_call = new get_fields_call(db_name, table_name, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public boolean remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException + { + send_remove_role_member(role_name, user_name, is_role, is_group, db_name); + return recv_remove_role_member(); } - public static class get_fields_call extends TAsyncMethodCall { - private String db_name; - private String table_name; - public get_fields_call(String db_name, String table_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.table_name = table_name; - } + public void send_remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("remove_role_member", TMessageType.CALL, ++seqid_)); + remove_role_member_args args = new remove_role_member_args(); + args.setRole_name(role_name); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setDb_name(db_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_fields", TMessageType.CALL, 0)); - get_fields_args args = new get_fields_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - args.write(prot); - prot.writeMessageEnd(); + public boolean recv_remove_role_member() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public List getResult() throws MetaException, UnknownTableException, UnknownDBException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_fields(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "remove_role_member failed: out of sequence response"); + } + remove_role_member_result result = new remove_role_member_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "remove_role_member failed: unknown result"); } - public void get_schema(String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_schema_call method_call = new get_schema_call(db_name, table_name, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public List list_roles(String principal_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException + { + send_list_roles(principal_name, is_role, is_group, db_name); + return recv_list_roles(); } - public static class get_schema_call extends TAsyncMethodCall { - private String db_name; - private String table_name; - public get_schema_call(String db_name, String table_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.table_name = table_name; - } + public void send_list_roles(String principal_name, boolean is_role, boolean is_group, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_roles", TMessageType.CALL, ++seqid_)); + list_roles_args args = new list_roles_args(); + args.setPrincipal_name(principal_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setDb_name(db_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_schema", TMessageType.CALL, 0)); - get_schema_args args = new get_schema_args(); - args.setDb_name(db_name); - args.setTable_name(table_name); - args.write(prot); - prot.writeMessageEnd(); + public List recv_list_roles() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public List getResult() throws MetaException, UnknownTableException, UnknownDBException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_schema(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "list_roles failed: out of sequence response"); } + list_roles_result result = new list_roles_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_roles failed: unknown result"); } - public void create_table(Table tbl, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - create_table_call method_call = new create_table_call(tbl, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public List list_security_user_grant(String principla_name, boolean is_role, boolean is_group) throws MetaException, TException + { + send_list_security_user_grant(principla_name, is_role, is_group); + return recv_list_security_user_grant(); } - public static class create_table_call extends TAsyncMethodCall { - private Table tbl; - public create_table_call(Table tbl, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.tbl = tbl; - } + public void send_list_security_user_grant(String principla_name, boolean is_role, boolean is_group) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_user_grant", TMessageType.CALL, ++seqid_)); + list_security_user_grant_args args = new list_security_user_grant_args(); + args.setPrincipla_name(principla_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("create_table", TMessageType.CALL, 0)); - create_table_args args = new create_table_args(); - args.setTbl(tbl); - args.write(prot); - prot.writeMessageEnd(); + public List recv_list_security_user_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_create_table(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "list_security_user_grant failed: out of sequence response"); } + list_security_user_grant_result result = new list_security_user_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_user_grant failed: unknown result"); } - public void drop_table(String dbname, String name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - drop_table_call method_call = new drop_table_call(dbname, name, deleteData, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public List list_security_db_grant(String principal_name, boolean is_group, boolean is_role, String db_name) throws MetaException, TException + { + send_list_security_db_grant(principal_name, is_group, is_role, db_name); + return recv_list_security_db_grant(); } - public static class drop_table_call extends TAsyncMethodCall { - private String dbname; - private String name; - private boolean deleteData; - public drop_table_call(String dbname, String name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - } + public void send_list_security_db_grant(String principal_name, boolean is_group, boolean is_role, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_db_grant", TMessageType.CALL, ++seqid_)); + list_security_db_grant_args args = new list_security_db_grant_args(); + args.setPrincipal_name(principal_name); + args.setIs_group(is_group); + args.setIs_role(is_role); + args.setDb_name(db_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("drop_table", TMessageType.CALL, 0)); - drop_table_args args = new drop_table_args(); - args.setDbname(dbname); - args.setName(name); - args.setDeleteData(deleteData); - args.write(prot); - prot.writeMessageEnd(); + public List recv_list_security_db_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public void getResult() throws NoSuchObjectException, MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_drop_table(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "list_security_db_grant failed: out of sequence response"); + } + list_security_db_grant_result result = new list_security_db_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_db_grant failed: unknown result"); } - public void get_tables(String db_name, String pattern, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_tables_call method_call = new get_tables_call(db_name, pattern, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public List list_security_table_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name) throws MetaException, TException + { + send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name); + return recv_list_security_table_grant(); } - public static class get_tables_call extends TAsyncMethodCall { - private String db_name; - private String pattern; - public get_tables_call(String db_name, String pattern, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.pattern = pattern; - } + public void send_list_security_table_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_table_grant", TMessageType.CALL, ++seqid_)); + list_security_table_grant_args args = new list_security_table_grant_args(); + args.setPrincipal_name(principal_name); + args.setIs_group(is_group); + args.setIs_role(is_role); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_tables", TMessageType.CALL, 0)); - get_tables_args args = new get_tables_args(); - args.setDb_name(db_name); - args.setPattern(pattern); - args.write(prot); - prot.writeMessageEnd(); + public List recv_list_security_table_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public List getResult() throws MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_tables(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "list_security_table_grant failed: out of sequence response"); + } + list_security_table_grant_result result = new list_security_table_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_table_grant failed: unknown result"); } - public void get_all_tables(String db_name, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_all_tables_call method_call = new get_all_tables_call(db_name, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public List list_security_partition_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name) throws MetaException, TException + { + send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name); + return recv_list_security_partition_grant(); } - public static class get_all_tables_call extends TAsyncMethodCall { - private String db_name; - public get_all_tables_call(String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - } + public void send_list_security_partition_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_partition_grant", TMessageType.CALL, ++seqid_)); + list_security_partition_grant_args args = new list_security_partition_grant_args(); + args.setPrincipal_name(principal_name); + args.setIs_group(is_group); + args.setIs_role(is_role); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setPart_name(part_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.CALL, 0)); - get_all_tables_args args = new get_all_tables_args(); - args.setDb_name(db_name); - args.write(prot); - prot.writeMessageEnd(); + public List recv_list_security_partition_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public List getResult() throws MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_all_tables(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "list_security_partition_grant failed: out of sequence response"); } + list_security_partition_grant_result result = new list_security_partition_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_partition_grant failed: unknown result"); } - public void get_table(String dbname, String tbl_name, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - get_table_call method_call = new get_table_call(dbname, tbl_name, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public List list_security_column_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name) throws MetaException, TException + { + send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name); + return recv_list_security_column_grant(); } - public static class get_table_call extends TAsyncMethodCall { - private String dbname; - private String tbl_name; - public get_table_call(String dbname, String tbl_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.tbl_name = tbl_name; - } + public void send_list_security_column_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_column_grant", TMessageType.CALL, ++seqid_)); + list_security_column_grant_args args = new list_security_column_grant_args(); + args.setPrincipal_name(principal_name); + args.setIs_group(is_group); + args.setIs_role(is_role); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setPart_name(part_name); + args.setColumn_name(column_name); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_table", TMessageType.CALL, 0)); - get_table_args args = new get_table_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.write(prot); - prot.writeMessageEnd(); + public List recv_list_security_column_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public Table getResult() throws MetaException, NoSuchObjectException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_table(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "list_security_column_grant failed: out of sequence response"); + } + list_security_column_grant_result result = new list_security_column_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_column_grant failed: unknown result"); } - public void alter_table(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - alter_table_call method_call = new alter_table_call(dbname, tbl_name, new_tbl, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public boolean grant_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor) throws MetaException, TException + { + send_grant_privileges(user_name, is_role, is_group, privileges, grantor); + return recv_grant_privileges(); } - public static class alter_table_call extends TAsyncMethodCall { - private String dbname; - private String tbl_name; - private Table new_tbl; - public alter_table_call(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; - } + public void send_grant_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor) throws TException + { + oprot_.writeMessageBegin(new TMessage("grant_privileges", TMessageType.CALL, ++seqid_)); + grant_privileges_args args = new grant_privileges_args(); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setPrivileges(privileges); + args.setGrantor(grantor); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("alter_table", TMessageType.CALL, 0)); - alter_table_args args = new alter_table_args(); - args.setDbname(dbname); - args.setTbl_name(tbl_name); - args.setNew_tbl(new_tbl); - args.write(prot); - prot.writeMessageEnd(); + public boolean recv_grant_privileges() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - public void getResult() throws InvalidOperationException, MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_table(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "grant_privileges failed: out of sequence response"); } + grant_privileges_result result = new grant_privileges_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result"); } - public void add_partition(Partition new_part, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - add_partition_call method_call = new add_partition_call(new_part, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public boolean revoke_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges) throws MetaException, TException + { + send_revoke_privileges(user_name, is_role, is_group, privileges); + return recv_revoke_privileges(); } - public static class add_partition_call extends TAsyncMethodCall { - private Partition new_part; - public add_partition_call(Partition new_part, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.new_part = new_part; - } + public void send_revoke_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges) throws TException + { + oprot_.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.CALL, ++seqid_)); + revoke_privileges_args args = new revoke_privileges_args(); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setPrivileges(privileges); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("add_partition", TMessageType.CALL, 0)); - add_partition_args args = new add_partition_args(); - args.setNew_part(new_part); - args.write(prot); - prot.writeMessageEnd(); + public boolean recv_revoke_privileges() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "revoke_privileges failed: out of sequence response"); + } + revoke_privileges_result result = new revoke_privileges_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result"); + } - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_partition(); + public boolean revoke_all_privileges(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns) throws MetaException, TException + { + send_revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns); + return recv_revoke_all_privileges(); + } + + public void send_revoke_all_privileges(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns) throws TException + { + oprot_.writeMessageBegin(new TMessage("revoke_all_privileges", TMessageType.CALL, ++seqid_)); + revoke_all_privileges_args args = new revoke_all_privileges_args(); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setRemove_user_priv(remove_user_priv); + args.setDbs(dbs); + args.setTables(tables); + args.setParts(parts); + args.setColumns(columns); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_revoke_all_privileges() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "revoke_all_privileges failed: out of sequence response"); + } + revoke_all_privileges_result result = new revoke_all_privileges_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "revoke_all_privileges failed: unknown result"); } - public void append_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException { + } + public static class AsyncClient extends com.facebook.fb303.FacebookService.AsyncClient implements AsyncIface { + public static class Factory implements TAsyncClientFactory { + private TAsyncClientManager clientManager; + private TProtocolFactory protocolFactory; + public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void create_database(Database database, AsyncMethodCallback resultHandler) throws TException { checkReady(); - append_partition_call method_call = new append_partition_call(db_name, tbl_name, part_vals, resultHandler, this, protocolFactory, transport); + create_database_call method_call = new create_database_call(database, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class append_partition_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - public append_partition_call(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class create_database_call extends TAsyncMethodCall { + private Database database; + public create_database_call(Database database, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; + this.database = database; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("append_partition", TMessageType.CALL, 0)); - append_partition_args args = new append_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); + prot.writeMessageBegin(new TMessage("create_database", TMessageType.CALL, 0)); + create_database_args args = new create_database_args(); + args.setDatabase(database); args.write(prot); prot.writeMessageEnd(); } - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_append_partition(); + (new Client(prot)).recv_create_database(); } } - public void append_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException { + public void get_database(String name, AsyncMethodCallback resultHandler) throws TException { checkReady(); - append_partition_by_name_call method_call = new append_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, protocolFactory, transport); + get_database_call method_call = new get_database_call(name, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class append_partition_by_name_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - public append_partition_by_name_call(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class get_database_call extends TAsyncMethodCall { + private String name; + public get_database_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; + this.name = name; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.CALL, 0)); - append_partition_by_name_args args = new append_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); + prot.writeMessageBegin(new TMessage("get_database", TMessageType.CALL, 0)); + get_database_args args = new get_database_args(); + args.setName(name); args.write(prot); prot.writeMessageEnd(); } - public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { + public Database getResult() throws NoSuchObjectException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_append_partition_by_name(); + return (new Client(prot)).recv_get_database(); } } - public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + public void drop_database(String name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { checkReady(); - drop_partition_call method_call = new drop_partition_call(db_name, tbl_name, part_vals, deleteData, resultHandler, this, protocolFactory, transport); + drop_database_call method_call = new drop_database_call(name, deleteData, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class drop_partition_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; + public static class drop_database_call extends TAsyncMethodCall { + private String name; private boolean deleteData; - public drop_partition_call(String db_name, String tbl_name, List part_vals, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public drop_database_call(String name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; + this.name = name; this.deleteData = deleteData; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("drop_partition", TMessageType.CALL, 0)); - drop_partition_args args = new drop_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); + prot.writeMessageBegin(new TMessage("drop_database", TMessageType.CALL, 0)); + drop_database_args args = new drop_database_args(); + args.setName(name); args.setDeleteData(deleteData); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws NoSuchObjectException, MetaException, TException { + public void getResult() throws NoSuchObjectException, InvalidOperationException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_partition(); + (new Client(prot)).recv_drop_database(); } } - public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + public void get_databases(String pattern, AsyncMethodCallback resultHandler) throws TException { checkReady(); - drop_partition_by_name_call method_call = new drop_partition_by_name_call(db_name, tbl_name, part_name, deleteData, resultHandler, this, protocolFactory, transport); + get_databases_call method_call = new get_databases_call(pattern, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class drop_partition_by_name_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - private boolean deleteData; - public drop_partition_by_name_call(String db_name, String tbl_name, String part_name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class get_databases_call extends TAsyncMethodCall { + private String pattern; + public get_databases_call(String pattern, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; + this.pattern = pattern; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.CALL, 0)); - drop_partition_by_name_args args = new drop_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); - args.setDeleteData(deleteData); + prot.writeMessageBegin(new TMessage("get_databases", TMessageType.CALL, 0)); + get_databases_args args = new get_databases_args(); + args.setPattern(pattern); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws NoSuchObjectException, MetaException, TException { + public List getResult() throws MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_partition_by_name(); + return (new Client(prot)).recv_get_databases(); } } - public void get_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException { + public void get_all_databases(AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_partition_call method_call = new get_partition_call(db_name, tbl_name, part_vals, resultHandler, this, protocolFactory, transport); + get_all_databases_call method_call = new get_all_databases_call(resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_partition_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - public get_partition_call(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class get_all_databases_call extends TAsyncMethodCall { + public get_all_databases_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_partition", TMessageType.CALL, 0)); - get_partition_args args = new get_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); + prot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.CALL, 0)); + get_all_databases_args args = new get_all_databases_args(); args.write(prot); prot.writeMessageEnd(); } - public Partition getResult() throws MetaException, NoSuchObjectException, TException { + public List getResult() throws MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition(); + return (new Client(prot)).recv_get_all_databases(); } } - public void get_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException { + public void get_type(String name, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_partition_by_name_call method_call = new get_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, protocolFactory, transport); + get_type_call method_call = new get_type_call(name, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_partition_by_name_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String part_name; - public get_partition_by_name_call(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class get_type_call extends TAsyncMethodCall { + private String name; + public get_type_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; + this.name = name; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.CALL, 0)); - get_partition_by_name_args args = new get_partition_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_name(part_name); + prot.writeMessageBegin(new TMessage("get_type", TMessageType.CALL, 0)); + get_type_args args = new get_type_args(); + args.setName(name); args.write(prot); prot.writeMessageEnd(); } - public Partition getResult() throws MetaException, NoSuchObjectException, TException { + public Type getResult() throws MetaException, NoSuchObjectException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition_by_name(); + return (new Client(prot)).recv_get_type(); } } - public void get_partitions(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException { + public void create_type(Type type, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_partitions_call method_call = new get_partitions_call(db_name, tbl_name, max_parts, resultHandler, this, protocolFactory, transport); + create_type_call method_call = new create_type_call(type, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_partitions_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private short max_parts; - public get_partitions_call(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class create_type_call extends TAsyncMethodCall { + private Type type; + public create_type_call(Type type, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; + this.type = type; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_partitions", TMessageType.CALL, 0)); - get_partitions_args args = new get_partitions_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); + prot.writeMessageBegin(new TMessage("create_type", TMessageType.CALL, 0)); + create_type_args args = new create_type_args(); + args.setType(type); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws NoSuchObjectException, MetaException, TException { + public boolean getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions(); + return (new Client(prot)).recv_create_type(); } } - public void get_partition_names(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException { + public void drop_type(String type, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_partition_names_call method_call = new get_partition_names_call(db_name, tbl_name, max_parts, resultHandler, this, protocolFactory, transport); + drop_type_call method_call = new drop_type_call(type, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_partition_names_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private short max_parts; - public get_partition_names_call(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class drop_type_call extends TAsyncMethodCall { + private String type; + public drop_type_call(String type, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; + this.type = type; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.CALL, 0)); - get_partition_names_args args = new get_partition_names_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setMax_parts(max_parts); + prot.writeMessageBegin(new TMessage("drop_type", TMessageType.CALL, 0)); + drop_type_args args = new drop_type_args(); + args.setType(type); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws MetaException, TException { + public boolean getResult() throws MetaException, NoSuchObjectException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition_names(); + return (new Client(prot)).recv_drop_type(); } } - public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException { + public void get_type_all(String name, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_partitions_ps_call method_call = new get_partitions_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, protocolFactory, transport); + get_type_all_call method_call = new get_type_all_call(name, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_partitions_ps_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private List part_vals; - private short max_parts; - public get_partitions_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class get_type_all_call extends TAsyncMethodCall { + private String name; + public get_type_all_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; + this.name = name; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.CALL, 0)); - get_partitions_ps_args args = new get_partitions_ps_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setMax_parts(max_parts); + prot.writeMessageBegin(new TMessage("get_type_all", TMessageType.CALL, 0)); + get_type_all_args args = new get_type_all_args(); + args.setName(name); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws MetaException, TException { + public Map getResult() throws MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_ps(); + return (new Client(prot)).recv_get_type_all(); } } - public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException { + public void get_fields(String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_partition_names_ps_call method_call = new get_partition_names_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, protocolFactory, transport); + get_fields_call method_call = new get_fields_call(db_name, table_name, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_partition_names_ps_call extends TAsyncMethodCall { + public static class get_fields_call extends TAsyncMethodCall { private String db_name; - private String tbl_name; - private List part_vals; - private short max_parts; - public get_partition_names_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + private String table_name; + public get_fields_call(String db_name, String table_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; + this.table_name = table_name; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.CALL, 0)); - get_partition_names_ps_args args = new get_partition_names_ps_args(); + prot.writeMessageBegin(new TMessage("get_fields", TMessageType.CALL, 0)); + get_fields_args args = new get_fields_args(); args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setPart_vals(part_vals); - args.setMax_parts(max_parts); + args.setTable_name(table_name); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws MetaException, TException { + public List getResult() throws MetaException, UnknownTableException, UnknownDBException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partition_names_ps(); + return (new Client(prot)).recv_get_fields(); } } - public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback resultHandler) throws TException { + public void get_schema(String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_partitions_by_filter_call method_call = new get_partitions_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, protocolFactory, transport); + get_schema_call method_call = new get_schema_call(db_name, table_name, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_partitions_by_filter_call extends TAsyncMethodCall { + public static class get_schema_call extends TAsyncMethodCall { private String db_name; - private String tbl_name; - private String filter; - private short max_parts; - public get_partitions_by_filter_call(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + private String table_name; + public get_schema_call(String db_name, String table_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; + this.table_name = table_name; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.CALL, 0)); - get_partitions_by_filter_args args = new get_partitions_by_filter_args(); + prot.writeMessageBegin(new TMessage("get_schema", TMessageType.CALL, 0)); + get_schema_args args = new get_schema_args(); args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setFilter(filter); - args.setMax_parts(max_parts); + args.setTable_name(table_name); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws MetaException, NoSuchObjectException, TException { + public List getResult() throws MetaException, UnknownTableException, UnknownDBException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_partitions_by_filter(); + return (new Client(prot)).recv_get_schema(); } } - public void alter_partition(String db_name, String tbl_name, Partition new_part, AsyncMethodCallback resultHandler) throws TException { + public void create_table(Table tbl, AsyncMethodCallback resultHandler) throws TException { checkReady(); - alter_partition_call method_call = new alter_partition_call(db_name, tbl_name, new_part, resultHandler, this, protocolFactory, transport); + create_table_call method_call = new create_table_call(tbl, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class alter_partition_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private Partition new_part; - public alter_partition_call(String db_name, String tbl_name, Partition new_part, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class create_table_call extends TAsyncMethodCall { + private Table tbl; + public create_table_call(Table tbl, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; + this.tbl = tbl; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("alter_partition", TMessageType.CALL, 0)); - alter_partition_args args = new alter_partition_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setNew_part(new_part); + prot.writeMessageBegin(new TMessage("create_table", TMessageType.CALL, 0)); + create_table_args args = new create_table_args(); + args.setTbl(tbl); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws InvalidOperationException, MetaException, TException { + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_partition(); + (new Client(prot)).recv_create_table(); } } - public void get_config_value(String name, String defaultValue, AsyncMethodCallback resultHandler) throws TException { + public void drop_table(String dbname, String name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_config_value_call method_call = new get_config_value_call(name, defaultValue, resultHandler, this, protocolFactory, transport); + drop_table_call method_call = new drop_table_call(dbname, name, deleteData, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_config_value_call extends TAsyncMethodCall { + public static class drop_table_call extends TAsyncMethodCall { + private String dbname; private String name; - private String defaultValue; - public get_config_value_call(String name, String defaultValue, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + private boolean deleteData; + public drop_table_call(String dbname, String name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; this.name = name; - this.defaultValue = defaultValue; + this.deleteData = deleteData; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_config_value", TMessageType.CALL, 0)); - get_config_value_args args = new get_config_value_args(); + prot.writeMessageBegin(new TMessage("drop_table", TMessageType.CALL, 0)); + drop_table_args args = new drop_table_args(); + args.setDbname(dbname); args.setName(name); - args.setDefaultValue(defaultValue); + args.setDeleteData(deleteData); args.write(prot); prot.writeMessageEnd(); } - public String getResult() throws ConfigValSecurityException, TException { + public void getResult() throws NoSuchObjectException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_config_value(); + (new Client(prot)).recv_drop_table(); } } - public void partition_name_to_vals(String part_name, AsyncMethodCallback resultHandler) throws TException { + public void get_tables(String db_name, String pattern, AsyncMethodCallback resultHandler) throws TException { checkReady(); - partition_name_to_vals_call method_call = new partition_name_to_vals_call(part_name, resultHandler, this, protocolFactory, transport); + get_tables_call method_call = new get_tables_call(db_name, pattern, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class partition_name_to_vals_call extends TAsyncMethodCall { - private String part_name; - public partition_name_to_vals_call(String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class get_tables_call extends TAsyncMethodCall { + private String db_name; + private String pattern; + public get_tables_call(String db_name, String pattern, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.part_name = part_name; + this.db_name = db_name; + this.pattern = pattern; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.CALL, 0)); - partition_name_to_vals_args args = new partition_name_to_vals_args(); - args.setPart_name(part_name); + prot.writeMessageBegin(new TMessage("get_tables", TMessageType.CALL, 0)); + get_tables_args args = new get_tables_args(); + args.setDb_name(db_name); + args.setPattern(pattern); args.write(prot); prot.writeMessageEnd(); } @@ -3001,101 +3332,98 @@ } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_partition_name_to_vals(); + return (new Client(prot)).recv_get_tables(); } } - public void partition_name_to_spec(String part_name, AsyncMethodCallback resultHandler) throws TException { + public void get_all_tables(String db_name, AsyncMethodCallback resultHandler) throws TException { checkReady(); - partition_name_to_spec_call method_call = new partition_name_to_spec_call(part_name, resultHandler, this, protocolFactory, transport); + get_all_tables_call method_call = new get_all_tables_call(db_name, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class partition_name_to_spec_call extends TAsyncMethodCall { - private String part_name; - public partition_name_to_spec_call(String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class get_all_tables_call extends TAsyncMethodCall { + private String db_name; + public get_all_tables_call(String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.part_name = part_name; + this.db_name = db_name; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.CALL, 0)); - partition_name_to_spec_args args = new partition_name_to_spec_args(); - args.setPart_name(part_name); + prot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.CALL, 0)); + get_all_tables_args args = new get_all_tables_args(); + args.setDb_name(db_name); args.write(prot); prot.writeMessageEnd(); } - public Map getResult() throws MetaException, TException { + public List getResult() throws MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_partition_name_to_spec(); + return (new Client(prot)).recv_get_all_tables(); } } - public void add_index(Index new_index, Table index_table, AsyncMethodCallback resultHandler) throws TException { + public void get_table(String dbname, String tbl_name, AsyncMethodCallback resultHandler) throws TException { checkReady(); - add_index_call method_call = new add_index_call(new_index, index_table, resultHandler, this, protocolFactory, transport); + get_table_call method_call = new get_table_call(dbname, tbl_name, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class add_index_call extends TAsyncMethodCall { - private Index new_index; - private Table index_table; - public add_index_call(Index new_index, Table index_table, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class get_table_call extends TAsyncMethodCall { + private String dbname; + private String tbl_name; + public get_table_call(String dbname, String tbl_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.new_index = new_index; - this.index_table = index_table; + this.dbname = dbname; + this.tbl_name = tbl_name; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("add_index", TMessageType.CALL, 0)); - add_index_args args = new add_index_args(); - args.setNew_index(new_index); - args.setIndex_table(index_table); + prot.writeMessageBegin(new TMessage("get_table", TMessageType.CALL, 0)); + get_table_args args = new get_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); args.write(prot); prot.writeMessageEnd(); } - public Index getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { + public Table getResult() throws MetaException, NoSuchObjectException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_add_index(); + return (new Client(prot)).recv_get_table(); } } - public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, AsyncMethodCallback resultHandler) throws TException { + public void alter_table(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler) throws TException { checkReady(); - alter_index_call method_call = new alter_index_call(dbname, base_tbl_name, idx_name, new_idx, resultHandler, this, protocolFactory, transport); + alter_table_call method_call = new alter_table_call(dbname, tbl_name, new_tbl, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class alter_index_call extends TAsyncMethodCall { + public static class alter_table_call extends TAsyncMethodCall { private String dbname; - private String base_tbl_name; - private String idx_name; - private Index new_idx; - public alter_index_call(String dbname, String base_tbl_name, String idx_name, Index new_idx, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + private String tbl_name; + private Table new_tbl; + public alter_table_call(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.dbname = dbname; - this.base_tbl_name = base_tbl_name; - this.idx_name = idx_name; - this.new_idx = new_idx; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("alter_index", TMessageType.CALL, 0)); - alter_index_args args = new alter_index_args(); + prot.writeMessageBegin(new TMessage("alter_table", TMessageType.CALL, 0)); + alter_table_args args = new alter_table_args(); args.setDbname(dbname); - args.setBase_tbl_name(base_tbl_name); - args.setIdx_name(idx_name); - args.setNew_idx(new_idx); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); args.write(prot); prot.writeMessageEnd(); } @@ -3106,1805 +3434,21741 @@ } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_alter_index(); + (new Client(prot)).recv_alter_table(); } } - public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + public void add_partition(Partition new_part, AsyncMethodCallback resultHandler) throws TException { checkReady(); - drop_index_by_name_call method_call = new drop_index_by_name_call(db_name, tbl_name, index_name, deleteData, resultHandler, this, protocolFactory, transport); + add_partition_call method_call = new add_partition_call(new_part, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class drop_index_by_name_call extends TAsyncMethodCall { - private String db_name; - private String tbl_name; - private String index_name; - private boolean deleteData; - public drop_index_by_name_call(String db_name, String tbl_name, String index_name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class add_partition_call extends TAsyncMethodCall { + private Partition new_part; + public add_partition_call(Partition new_part, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - this.deleteData = deleteData; + this.new_part = new_part; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.CALL, 0)); - drop_index_by_name_args args = new drop_index_by_name_args(); - args.setDb_name(db_name); - args.setTbl_name(tbl_name); - args.setIndex_name(index_name); - args.setDeleteData(deleteData); + prot.writeMessageBegin(new TMessage("add_partition", TMessageType.CALL, 0)); + add_partition_args args = new add_partition_args(); + args.setNew_part(new_part); args.write(prot); prot.writeMessageEnd(); } - public boolean getResult() throws NoSuchObjectException, MetaException, TException { + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_drop_index_by_name(); + return (new Client(prot)).recv_add_partition(); } } - public void get_index_by_name(String db_name, String tbl_name, String index_name, AsyncMethodCallback resultHandler) throws TException { + public void append_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_index_by_name_call method_call = new get_index_by_name_call(db_name, tbl_name, index_name, resultHandler, this, protocolFactory, transport); + append_partition_call method_call = new append_partition_call(db_name, tbl_name, part_vals, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_index_by_name_call extends TAsyncMethodCall { + public static class append_partition_call extends TAsyncMethodCall { private String db_name; private String tbl_name; - private String index_name; - public get_index_by_name_call(String db_name, String tbl_name, String index_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + private List part_vals; + public append_partition_call(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; - this.index_name = index_name; + this.part_vals = part_vals; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.CALL, 0)); - get_index_by_name_args args = new get_index_by_name_args(); + prot.writeMessageBegin(new TMessage("append_partition", TMessageType.CALL, 0)); + append_partition_args args = new append_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); - args.setIndex_name(index_name); + args.setPart_vals(part_vals); args.write(prot); prot.writeMessageEnd(); } - public Index getResult() throws MetaException, NoSuchObjectException, TException { + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_index_by_name(); + return (new Client(prot)).recv_append_partition(); } } - public void get_indexes(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException { + public void append_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_indexes_call method_call = new get_indexes_call(db_name, tbl_name, max_indexes, resultHandler, this, protocolFactory, transport); + append_partition_by_name_call method_call = new append_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_indexes_call extends TAsyncMethodCall { + public static class append_partition_by_name_call extends TAsyncMethodCall { private String db_name; private String tbl_name; - private short max_indexes; - public get_indexes_call(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + private String part_name; + public append_partition_by_name_call(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; - this.max_indexes = max_indexes; + this.part_name = part_name; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_indexes", TMessageType.CALL, 0)); - get_indexes_args args = new get_indexes_args(); + prot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.CALL, 0)); + append_partition_by_name_args args = new append_partition_by_name_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); - args.setMax_indexes(max_indexes); + args.setPart_name(part_name); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws NoSuchObjectException, MetaException, TException { + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_indexes(); + return (new Client(prot)).recv_append_partition_by_name(); } } - public void get_index_names(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException { + public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { checkReady(); - get_index_names_call method_call = new get_index_names_call(db_name, tbl_name, max_indexes, resultHandler, this, protocolFactory, transport); + drop_partition_call method_call = new drop_partition_call(db_name, tbl_name, part_vals, deleteData, resultHandler, this, protocolFactory, transport); manager.call(method_call); } - public static class get_index_names_call extends TAsyncMethodCall { + public static class drop_partition_call extends TAsyncMethodCall { private String db_name; private String tbl_name; - private short max_indexes; - public get_index_names_call(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + private List part_vals; + private boolean deleteData; + public drop_partition_call(String db_name, String tbl_name, List part_vals, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.db_name = db_name; this.tbl_name = tbl_name; - this.max_indexes = max_indexes; + this.part_vals = part_vals; + this.deleteData = deleteData; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("get_index_names", TMessageType.CALL, 0)); - get_index_names_args args = new get_index_names_args(); + prot.writeMessageBegin(new TMessage("drop_partition", TMessageType.CALL, 0)); + drop_partition_args args = new drop_partition_args(); args.setDb_name(db_name); args.setTbl_name(tbl_name); - args.setMax_indexes(max_indexes); + args.setPart_vals(part_vals); + args.setDeleteData(deleteData); args.write(prot); prot.writeMessageEnd(); } - public List getResult() throws MetaException, TException { + public boolean getResult() throws NoSuchObjectException, MetaException, TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_get_index_names(); + return (new Client(prot)).recv_drop_partition(); } } - } - - public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(Iface iface) - { - super(iface); - iface_ = iface; - processMap_.put("create_database", new create_database()); - processMap_.put("get_database", new get_database()); - processMap_.put("drop_database", new drop_database()); - processMap_.put("get_databases", new get_databases()); - processMap_.put("get_all_databases", new get_all_databases()); - processMap_.put("get_type", new get_type()); - processMap_.put("create_type", new create_type()); - processMap_.put("drop_type", new drop_type()); - processMap_.put("get_type_all", new get_type_all()); - processMap_.put("get_fields", new get_fields()); - processMap_.put("get_schema", new get_schema()); - processMap_.put("create_table", new create_table()); - processMap_.put("drop_table", new drop_table()); - processMap_.put("get_tables", new get_tables()); - processMap_.put("get_all_tables", new get_all_tables()); - processMap_.put("get_table", new get_table()); - processMap_.put("alter_table", new alter_table()); - processMap_.put("add_partition", new add_partition()); - processMap_.put("append_partition", new append_partition()); - processMap_.put("append_partition_by_name", new append_partition_by_name()); - processMap_.put("drop_partition", new drop_partition()); - processMap_.put("drop_partition_by_name", new drop_partition_by_name()); - processMap_.put("get_partition", new get_partition()); - processMap_.put("get_partition_by_name", new get_partition_by_name()); - processMap_.put("get_partitions", new get_partitions()); - processMap_.put("get_partition_names", new get_partition_names()); - processMap_.put("get_partitions_ps", new get_partitions_ps()); - processMap_.put("get_partition_names_ps", new get_partition_names_ps()); - processMap_.put("get_partitions_by_filter", new get_partitions_by_filter()); - processMap_.put("alter_partition", new alter_partition()); - processMap_.put("get_config_value", new get_config_value()); - processMap_.put("partition_name_to_vals", new partition_name_to_vals()); - processMap_.put("partition_name_to_spec", new partition_name_to_spec()); - processMap_.put("add_index", new add_index()); - processMap_.put("alter_index", new alter_index()); - processMap_.put("drop_index_by_name", new drop_index_by_name()); - processMap_.put("get_index_by_name", new get_index_by_name()); - processMap_.put("get_indexes", new get_indexes()); - processMap_.put("get_index_names", new get_index_names()); + public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_partition_by_name_call method_call = new drop_partition_by_name_call(db_name, tbl_name, part_name, deleteData, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private Iface iface_; + public static class drop_partition_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private boolean deleteData; + public drop_partition_by_name_call(String db_name, String tbl_name, String part_name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + } - public boolean process(TProtocol iprot, TProtocol oprot) throws TException - { - TMessage msg = iprot.readMessageBegin(); - ProcessFunction fn = processMap_.get(msg.name); - if (fn == null) { - TProtocolUtil.skip(iprot, TType.STRUCT); - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); - oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return true; + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.CALL, 0)); + drop_partition_by_name_args args = new drop_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); } - fn.process(msg.seqid, iprot, oprot); - return true; - } - private class create_database implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - create_database_args args = new create_database_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - create_database_result result = new create_database_result(); - try { - iface_.create_database(args.database); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing create_database", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_database"); - oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public boolean getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("create_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_partition_by_name(); } + } + public void get_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_call method_call = new get_partition_call(db_name, tbl_name, part_vals, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_database implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_database_args args = new get_database_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_database_result result = new get_database_result(); - try { - result.success = iface_.get_database(args.name); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_database", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_database"); - oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_partition_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + public get_partition_call(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition", TMessageType.CALL, 0)); + get_partition_args args = new get_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition(); } + } + public void get_partition_with_auth(String db_name, String tbl_name, List part_vals, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_with_auth_call method_call = new get_partition_with_auth_call(db_name, tbl_name, part_vals, user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class drop_database implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_database_args args = new drop_database_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - drop_database_result result = new drop_database_result(); - try { - iface_.drop_database(args.name, args.deleteData); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (InvalidOperationException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_database", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_database"); - oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_partition_with_auth_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private String user_name; + private List group_names; + public get_partition_with_auth_call(String db_name, String tbl_name, List part_vals, String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.CALL, 0)); + get_partition_with_auth_args args = new get_partition_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_with_auth(); } + } + public void get_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_by_name_call method_call = new get_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_databases implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_databases_args args = new get_databases_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_databases_result result = new get_databases_result(); - try { - result.success = iface_.get_databases(args.pattern); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_databases", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_databases"); - oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_partition_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + public get_partition_by_name_call(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.CALL, 0)); + get_partition_by_name_args args = new get_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_by_name(); } + } + public void get_partitions(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partitions_call method_call = new get_partitions_call(db_name, tbl_name, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_all_databases implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_all_databases_args args = new get_all_databases_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_all_databases_result result = new get_all_databases_result(); - try { - result.success = iface_.get_all_databases(); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_all_databases", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_databases"); - oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class get_partitions_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_parts; + public get_partitions_call(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partitions", TMessageType.CALL, 0)); + get_partitions_args args = new get_partitions_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } - private class get_type implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_type_args args = new get_type_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_type_result result = new get_type_result(); - try { - result.success = iface_.get_type(args.name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_type", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_type"); - oprot.writeMessageBegin(new TMessage("get_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public List getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_type", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions(); } + } + public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partitions_with_auth_call method_call = new get_partitions_with_auth_call(db_name, tbl_name, max_parts, user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class create_type implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - create_type_args args = new create_type_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("create_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - create_type_result result = new create_type_result(); - try { - result.success = iface_.create_type(args.type); - result.setSuccessIsSet(true); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing create_type", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_type"); - oprot.writeMessageBegin(new TMessage("create_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_partitions_with_auth_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_parts; + private String user_name; + private List group_names; + public get_partitions_with_auth_call(String db_name, String tbl_name, short max_parts, String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.CALL, 0)); + get_partitions_with_auth_args args = new get_partitions_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("create_type", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_with_auth(); } + } + public void get_partition_names(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_names_call method_call = new get_partition_names_call(db_name, tbl_name, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class drop_type implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_type_args args = new drop_type_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - drop_type_result result = new drop_type_result(); - try { - result.success = iface_.drop_type(args.type); - result.setSuccessIsSet(true); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_type", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_type"); - oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_partition_names_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_parts; + public get_partition_names_call(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.CALL, 0)); + get_partition_names_args args = new get_partition_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_names(); } + } + public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partitions_ps_call method_call = new get_partitions_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_type_all implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_type_all_args args = new get_type_all_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_type_all_result result = new get_type_all_result(); - try { - result.success = iface_.get_type_all(args.name); - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_type_all", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_type_all"); - oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_partitions_ps_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + public get_partitions_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.CALL, 0)); + get_partitions_ps_args args = new get_partitions_ps_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_ps(); } + } + public void get_partitions_ps_with_auth(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partitions_ps_with_auth_call method_call = new get_partitions_ps_with_auth_call(db_name, tbl_name, part_vals, max_parts, user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_fields implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_fields_args args = new get_fields_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_fields_result result = new get_fields_result(); - try { - result.success = iface_.get_fields(args.db_name, args.table_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_fields", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_fields"); - oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class get_partitions_ps_with_auth_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + private String user_name; + private List group_names; + public get_partitions_ps_with_auth_call(String db_name, String tbl_name, List part_vals, short max_parts, String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + this.user_name = user_name; + this.group_names = group_names; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.CALL, 0)); + get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } - private class get_schema implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_schema_args args = new get_schema_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_schema_result result = new get_schema_result(); - try { - result.success = iface_.get_schema(args.db_name, args.table_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_schema", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_schema"); - oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public List getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_ps_with_auth(); } + } + public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_names_ps_call method_call = new get_partition_names_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class create_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - create_table_args args = new create_table_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - create_table_result result = new create_table_result(); - try { - iface_.create_table(args.tbl); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (NoSuchObjectException o4) { - result.o4 = o4; - } catch (Throwable th) { - LOGGER.error("Internal error processing create_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_table"); - oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_partition_names_ps_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + public get_partition_names_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.CALL, 0)); + get_partition_names_ps_args args = new get_partition_names_ps_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("create_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_names_ps(); } + } + public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partitions_by_filter_call method_call = new get_partitions_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class drop_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_table_args args = new drop_table_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - drop_table_result result = new drop_table_result(); - try { - iface_.drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_table"); - oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_partitions_by_filter_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String filter; + private short max_parts; + public get_partitions_by_filter_call(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.CALL, 0)); + get_partitions_by_filter_args args = new get_partitions_by_filter_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_by_filter(); } + } + public void alter_partition(String db_name, String tbl_name, Partition new_part, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + alter_partition_call method_call = new alter_partition_call(db_name, tbl_name, new_part, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_tables implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_tables_args args = new get_tables_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_tables_result result = new get_tables_result(); - try { - result.success = iface_.get_tables(args.db_name, args.pattern); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_tables", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_tables"); - oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class alter_partition_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private Partition new_part; + public alter_partition_call(String db_name, String tbl_name, Partition new_part, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("alter_partition", TMessageType.CALL, 0)); + alter_partition_args args = new alter_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_part(new_part); + args.write(prot); + prot.writeMessageEnd(); + } - private class get_all_tables implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_all_tables_args args = new get_all_tables_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_all_tables_result result = new get_all_tables_result(); - try { - result.success = iface_.get_all_tables(args.db_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_all_tables", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_tables"); - oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public void getResult() throws InvalidOperationException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_partition(); } + } + public void get_config_value(String name, String defaultValue, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_config_value_call method_call = new get_config_value_call(name, defaultValue, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_table_args args = new get_table_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_table_result result = new get_table_result(); - try { - result.success = iface_.get_table(args.dbname, args.tbl_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table"); - oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class get_config_value_call extends TAsyncMethodCall { + private String name; + private String defaultValue; + public get_config_value_call(String name, String defaultValue, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + this.defaultValue = defaultValue; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_config_value", TMessageType.CALL, 0)); + get_config_value_args args = new get_config_value_args(); + args.setName(name); + args.setDefaultValue(defaultValue); + args.write(prot); + prot.writeMessageEnd(); + } - private class alter_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_table_args args = new alter_table_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - alter_table_result result = new alter_table_result(); - try { - iface_.alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_table"); - oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public String getResult() throws ConfigValSecurityException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_config_value(); } + } + public void partition_name_to_vals(String part_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + partition_name_to_vals_call method_call = new partition_name_to_vals_call(part_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class add_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - add_partition_args args = new add_partition_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - add_partition_result result = new add_partition_result(); - try { - result.success = iface_.add_partition(args.new_part); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing add_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_partition"); - oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class partition_name_to_vals_call extends TAsyncMethodCall { + private String part_name; + public partition_name_to_vals_call(String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.part_name = part_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.CALL, 0)); + partition_name_to_vals_args args = new partition_name_to_vals_args(); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_partition_name_to_vals(); } + } + public void partition_name_to_spec(String part_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + partition_name_to_spec_call method_call = new partition_name_to_spec_call(part_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class append_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - append_partition_args args = new append_partition_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - append_partition_result result = new append_partition_result(); - try { - result.success = iface_.append_partition(args.db_name, args.tbl_name, args.part_vals); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing append_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition"); - oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class partition_name_to_spec_call extends TAsyncMethodCall { + private String part_name; + public partition_name_to_spec_call(String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.part_name = part_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.CALL, 0)); + partition_name_to_spec_args args = new partition_name_to_spec_args(); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_partition_name_to_spec(); } + } + public void add_index(Index new_index, Table index_table, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + add_index_call method_call = new add_index_call(new_index, index_table, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class append_partition_by_name implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - append_partition_by_name_args args = new append_partition_by_name_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - append_partition_by_name_result result = new append_partition_by_name_result(); - try { - result.success = iface_.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing append_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition_by_name"); - oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class add_index_call extends TAsyncMethodCall { + private Index new_index; + private Table index_table; + public add_index_call(Index new_index, Table index_table, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.new_index = new_index; + this.index_table = index_table; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("add_index", TMessageType.CALL, 0)); + add_index_args args = new add_index_args(); + args.setNew_index(new_index); + args.setIndex_table(index_table); + args.write(prot); + prot.writeMessageEnd(); + } - private class drop_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_partition_args args = new drop_partition_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - drop_partition_result result = new drop_partition_result(); - try { - result.success = iface_.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition"); - oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public Index getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_index(); } + } + public void alter_index(String dbname, String base_tbl_name, String idx_name, Index new_idx, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + alter_index_call method_call = new alter_index_call(dbname, base_tbl_name, idx_name, new_idx, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class drop_partition_by_name implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_partition_by_name_args args = new drop_partition_by_name_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - drop_partition_by_name_result result = new drop_partition_by_name_result(); - try { - result.success = iface_.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition_by_name"); - oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class alter_index_call extends TAsyncMethodCall { + private String dbname; + private String base_tbl_name; + private String idx_name; + private Index new_idx; + public alter_index_call(String dbname, String base_tbl_name, String idx_name, Index new_idx, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.base_tbl_name = base_tbl_name; + this.idx_name = idx_name; + this.new_idx = new_idx; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("alter_index", TMessageType.CALL, 0)); + alter_index_args args = new alter_index_args(); + args.setDbname(dbname); + args.setBase_tbl_name(base_tbl_name); + args.setIdx_name(idx_name); + args.setNew_idx(new_idx); + args.write(prot); + prot.writeMessageEnd(); + } - private class get_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_args args = new get_partition_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_partition_result result = new get_partition_result(); - try { - result.success = iface_.get_partition(args.db_name, args.tbl_name, args.part_vals); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition"); - oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public void getResult() throws InvalidOperationException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_index(); } + } + public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_index_by_name_call method_call = new drop_index_by_name_call(db_name, tbl_name, index_name, deleteData, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_partition_by_name implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_by_name_args args = new get_partition_by_name_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_partition_by_name_result result = new get_partition_by_name_result(); - try { - result.success = iface_.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_by_name"); - oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class drop_index_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String index_name; + private boolean deleteData; + public drop_index_by_name_call(String db_name, String tbl_name, String index_name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + this.deleteData = deleteData; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.CALL, 0)); + drop_index_by_name_args args = new drop_index_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } - private class get_partitions implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partitions_args args = new get_partitions_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_partitions_result result = new get_partitions_result(); - try { - result.success = iface_.get_partitions(args.db_name, args.tbl_name, args.max_parts); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions"); - oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public boolean getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_index_by_name(); } + } + public void get_index_by_name(String db_name, String tbl_name, String index_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_index_by_name_call method_call = new get_index_by_name_call(db_name, tbl_name, index_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_partition_names implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_names_args args = new get_partition_names_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_partition_names_result result = new get_partition_names_result(); - try { - result.success = iface_.get_partition_names(args.db_name, args.tbl_name, args.max_parts); - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_names", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names"); - oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_index_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String index_name; + public get_index_by_name_call(String db_name, String tbl_name, String index_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.CALL, 0)); + get_index_by_name_args args = new get_index_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Index getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_index_by_name(); } + } + public void get_indexes(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_indexes_call method_call = new get_indexes_call(db_name, tbl_name, max_indexes, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_partitions_ps implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partitions_ps_args args = new get_partitions_ps_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_partitions_ps_result result = new get_partitions_ps_result(); - try { - result.success = iface_.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions_ps", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps"); - oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class get_indexes_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_indexes; + public get_indexes_call(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_indexes", TMessageType.CALL, 0)); + get_indexes_args args = new get_indexes_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); + args.write(prot); + prot.writeMessageEnd(); + } - private class get_partition_names_ps implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_names_ps_args args = new get_partition_names_ps_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_partition_names_ps_result result = new get_partition_names_ps_result(); - try { - result.success = iface_.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_names_ps", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names_ps"); - oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public List getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_indexes(); } + } + public void get_index_names(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_index_names_call method_call = new get_index_names_call(db_name, tbl_name, max_indexes, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_partitions_by_filter implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partitions_by_filter_args args = new get_partitions_by_filter_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_partitions_by_filter_result result = new get_partitions_by_filter_result(); - try { - result.success = iface_.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions_by_filter", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_by_filter"); - oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class get_index_names_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_indexes; + public get_index_names_call(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_index_names", TMessageType.CALL, 0)); + get_index_names_args args = new get_index_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); + args.write(prot); + prot.writeMessageEnd(); + } - private class alter_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_partition_args args = new alter_partition_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - alter_partition_result result = new alter_partition_result(); - try { - iface_.alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_partition"); - oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_index_names(); } + } + public void get_user_privilege_set(String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_user_privilege_set_call method_call = new get_user_privilege_set_call(user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_config_value implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_config_value_args args = new get_config_value_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_config_value_result result = new get_config_value_result(); - try { - result.success = iface_.get_config_value(args.name, args.defaultValue); - } catch (ConfigValSecurityException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_config_value", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_config_value"); - oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class get_user_privilege_set_call extends TAsyncMethodCall { + private String user_name; + private List group_names; + public get_user_privilege_set_call(String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_user_privilege_set", TMessageType.CALL, 0)); + get_user_privilege_set_args args = new get_user_privilege_set_args(); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public PrincipalPrivilegeSet getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_user_privilege_set(); } + } + public void get_db_privilege_set(String db_name, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_db_privilege_set_call method_call = new get_db_privilege_set_call(db_name, user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class partition_name_to_vals implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - partition_name_to_vals_args args = new partition_name_to_vals_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - partition_name_to_vals_result result = new partition_name_to_vals_result(); - try { - result.success = iface_.partition_name_to_vals(args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing partition_name_to_vals", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_vals"); - oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class get_db_privilege_set_call extends TAsyncMethodCall { + private String db_name; + private String user_name; + private List group_names; + public get_db_privilege_set_call(String db_name, String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.user_name = user_name; + this.group_names = group_names; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_db_privilege_set", TMessageType.CALL, 0)); + get_db_privilege_set_args args = new get_db_privilege_set_args(); + args.setDb_name(db_name); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } - private class partition_name_to_spec implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - partition_name_to_spec_args args = new partition_name_to_spec_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - partition_name_to_spec_result result = new partition_name_to_spec_result(); - try { - result.success = iface_.partition_name_to_spec(args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing partition_name_to_spec", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_spec"); - oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public PrincipalPrivilegeSet getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_db_privilege_set(); } + } + public void get_table_privilege_set(String db_name, String table_name, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_table_privilege_set_call method_call = new get_table_privilege_set_call(db_name, table_name, user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class add_index implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - add_index_args args = new add_index_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - add_index_result result = new add_index_result(); - try { - result.success = iface_.add_index(args.new_index, args.index_table); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing add_index", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_index"); - oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("add_index", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class get_table_privilege_set_call extends TAsyncMethodCall { + private String db_name; + private String table_name; + private String user_name; + private List group_names; + public get_table_privilege_set_call(String db_name, String table_name, String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + this.user_name = user_name; + this.group_names = group_names; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_table_privilege_set", TMessageType.CALL, 0)); + get_table_privilege_set_args args = new get_table_privilege_set_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } - private class alter_index implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_index_args args = new alter_index_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - alter_index_result result = new alter_index_result(); - try { - iface_.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_index", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_index"); - oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public PrincipalPrivilegeSet getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_privilege_set(); } + } + public void get_partition_privilege_set(String db_name, String table_name, String part_name, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_privilege_set_call method_call = new get_partition_privilege_set_call(db_name, table_name, part_name, user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class drop_index_by_name implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_index_by_name_args args = new drop_index_by_name_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - drop_index_by_name_result result = new drop_index_by_name_result(); - try { - result.success = iface_.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); - result.setSuccessIsSet(true); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_index_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_index_by_name"); - oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class get_partition_privilege_set_call extends TAsyncMethodCall { + private String db_name; + private String table_name; + private String part_name; + private String user_name; + private List group_names; + public get_partition_privilege_set_call(String db_name, String table_name, String part_name, String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; + this.user_name = user_name; + this.group_names = group_names; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition_privilege_set", TMessageType.CALL, 0)); + get_partition_privilege_set_args args = new get_partition_privilege_set_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setPart_name(part_name); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } - private class get_index_by_name implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_index_by_name_args args = new get_index_by_name_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - get_index_by_name_result result = new get_index_by_name_result(); - try { - result.success = iface_.get_index_by_name(args.db_name, args.tbl_name, args.index_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_index_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_by_name"); - oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public PrincipalPrivilegeSet getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_privilege_set(); } + } + public void get_column_privilege_set(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_column_privilege_set_call method_call = new get_column_privilege_set_call(db_name, table_name, part_name, column_name, user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_column_privilege_set_call extends TAsyncMethodCall { + private String db_name; + private String table_name; + private String part_name; + private String column_name; + private String user_name; + private List group_names; + public get_column_privilege_set_call(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; + this.column_name = column_name; + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_column_privilege_set", TMessageType.CALL, 0)); + get_column_privilege_set_args args = new get_column_privilege_set_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setPart_name(part_name); + args.setColumn_name(column_name); + args.setUser_name(user_name); + args.setGroup_names(group_names); + args.write(prot); + prot.writeMessageEnd(); + } + + public PrincipalPrivilegeSet getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_column_privilege_set(); + } + } + + public void create_role(String role_name, String owner_name, String db_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + create_role_call method_call = new create_role_call(role_name, owner_name, db_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class create_role_call extends TAsyncMethodCall { + private String role_name; + private String owner_name; + private String db_name; + public create_role_call(String role_name, String owner_name, String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + this.owner_name = owner_name; + this.db_name = db_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("create_role", TMessageType.CALL, 0)); + create_role_args args = new create_role_args(); + args.setRole_name(role_name); + args.setOwner_name(owner_name); + args.setDb_name(db_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_create_role(); + } + } + + public void drop_role(String role_name, String db_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_role_call method_call = new drop_role_call(role_name, db_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class drop_role_call extends TAsyncMethodCall { + private String role_name; + private String db_name; + public drop_role_call(String role_name, String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + this.db_name = db_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_role", TMessageType.CALL, 0)); + drop_role_args args = new drop_role_args(); + args.setRole_name(role_name); + args.setDb_name(db_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_role(); + } + } + + public void add_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + add_role_member_call method_call = new add_role_member_call(role_name, user_name, is_role, is_group, db_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class add_role_member_call extends TAsyncMethodCall { + private String role_name; + private String user_name; + private boolean is_role; + private boolean is_group; + private String db_name; + public add_role_member_call(String role_name, String user_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + this.user_name = user_name; + this.is_role = is_role; + this.is_group = is_group; + this.db_name = db_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("add_role_member", TMessageType.CALL, 0)); + add_role_member_args args = new add_role_member_args(); + args.setRole_name(role_name); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setDb_name(db_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_role_member(); + } + } + + public void remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + remove_role_member_call method_call = new remove_role_member_call(role_name, user_name, is_role, is_group, db_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class remove_role_member_call extends TAsyncMethodCall { + private String role_name; + private String user_name; + private boolean is_role; + private boolean is_group; + private String db_name; + public remove_role_member_call(String role_name, String user_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + this.user_name = user_name; + this.is_role = is_role; + this.is_group = is_group; + this.db_name = db_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("remove_role_member", TMessageType.CALL, 0)); + remove_role_member_args args = new remove_role_member_args(); + args.setRole_name(role_name); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setDb_name(db_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_remove_role_member(); + } + } + + public void list_roles(String principal_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + list_roles_call method_call = new list_roles_call(principal_name, is_role, is_group, db_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class list_roles_call extends TAsyncMethodCall { + private String principal_name; + private boolean is_role; + private boolean is_group; + private String db_name; + public list_roles_call(String principal_name, boolean is_role, boolean is_group, String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.is_role = is_role; + this.is_group = is_group; + this.db_name = db_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("list_roles", TMessageType.CALL, 0)); + list_roles_args args = new list_roles_args(); + args.setPrincipal_name(principal_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setDb_name(db_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_list_roles(); + } + } + + public void list_security_user_grant(String principla_name, boolean is_role, boolean is_group, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + list_security_user_grant_call method_call = new list_security_user_grant_call(principla_name, is_role, is_group, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class list_security_user_grant_call extends TAsyncMethodCall { + private String principla_name; + private boolean is_role; + private boolean is_group; + public list_security_user_grant_call(String principla_name, boolean is_role, boolean is_group, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principla_name = principla_name; + this.is_role = is_role; + this.is_group = is_group; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("list_security_user_grant", TMessageType.CALL, 0)); + list_security_user_grant_args args = new list_security_user_grant_args(); + args.setPrincipla_name(principla_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_list_security_user_grant(); + } + } + + public void list_security_db_grant(String principal_name, boolean is_group, boolean is_role, String db_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + list_security_db_grant_call method_call = new list_security_db_grant_call(principal_name, is_group, is_role, db_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class list_security_db_grant_call extends TAsyncMethodCall { + private String principal_name; + private boolean is_group; + private boolean is_role; + private String db_name; + public list_security_db_grant_call(String principal_name, boolean is_group, boolean is_role, String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.is_group = is_group; + this.is_role = is_role; + this.db_name = db_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("list_security_db_grant", TMessageType.CALL, 0)); + list_security_db_grant_args args = new list_security_db_grant_args(); + args.setPrincipal_name(principal_name); + args.setIs_group(is_group); + args.setIs_role(is_role); + args.setDb_name(db_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_list_security_db_grant(); + } + } + + public void list_security_table_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + list_security_table_grant_call method_call = new list_security_table_grant_call(principal_name, is_group, is_role, db_name, table_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class list_security_table_grant_call extends TAsyncMethodCall { + private String principal_name; + private boolean is_group; + private boolean is_role; + private String db_name; + private String table_name; + public list_security_table_grant_call(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.is_group = is_group; + this.is_role = is_role; + this.db_name = db_name; + this.table_name = table_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("list_security_table_grant", TMessageType.CALL, 0)); + list_security_table_grant_args args = new list_security_table_grant_args(); + args.setPrincipal_name(principal_name); + args.setIs_group(is_group); + args.setIs_role(is_role); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_list_security_table_grant(); + } + } + + public void list_security_partition_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + list_security_partition_grant_call method_call = new list_security_partition_grant_call(principal_name, is_group, is_role, db_name, table_name, part_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class list_security_partition_grant_call extends TAsyncMethodCall { + private String principal_name; + private boolean is_group; + private boolean is_role; + private String db_name; + private String table_name; + private String part_name; + public list_security_partition_grant_call(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.is_group = is_group; + this.is_role = is_role; + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("list_security_partition_grant", TMessageType.CALL, 0)); + list_security_partition_grant_args args = new list_security_partition_grant_args(); + args.setPrincipal_name(principal_name); + args.setIs_group(is_group); + args.setIs_role(is_role); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_list_security_partition_grant(); + } + } + + public void list_security_column_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + list_security_column_grant_call method_call = new list_security_column_grant_call(principal_name, is_group, is_role, db_name, table_name, part_name, column_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class list_security_column_grant_call extends TAsyncMethodCall { + private String principal_name; + private boolean is_group; + private boolean is_role; + private String db_name; + private String table_name; + private String part_name; + private String column_name; + public list_security_column_grant_call(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.is_group = is_group; + this.is_role = is_role; + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; + this.column_name = column_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("list_security_column_grant", TMessageType.CALL, 0)); + list_security_column_grant_args args = new list_security_column_grant_args(); + args.setPrincipal_name(principal_name); + args.setIs_group(is_group); + args.setIs_role(is_role); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.setPart_name(part_name); + args.setColumn_name(column_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_list_security_column_grant(); + } + } + + public void grant_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + grant_privileges_call method_call = new grant_privileges_call(user_name, is_role, is_group, privileges, grantor, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class grant_privileges_call extends TAsyncMethodCall { + private String user_name; + private boolean is_role; + private boolean is_group; + private PrivilegeBag privileges; + private String grantor; + public grant_privileges_call(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.user_name = user_name; + this.is_role = is_role; + this.is_group = is_group; + this.privileges = privileges; + this.grantor = grantor; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("grant_privileges", TMessageType.CALL, 0)); + grant_privileges_args args = new grant_privileges_args(); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setPrivileges(privileges); + args.setGrantor(grantor); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_grant_privileges(); + } + } + + public void revoke_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + revoke_privileges_call method_call = new revoke_privileges_call(user_name, is_role, is_group, privileges, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class revoke_privileges_call extends TAsyncMethodCall { + private String user_name; + private boolean is_role; + private boolean is_group; + private PrivilegeBag privileges; + public revoke_privileges_call(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.user_name = user_name; + this.is_role = is_role; + this.is_group = is_group; + this.privileges = privileges; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.CALL, 0)); + revoke_privileges_args args = new revoke_privileges_args(); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setPrivileges(privileges); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_revoke_privileges(); + } + } + + public void revoke_all_privileges(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + revoke_all_privileges_call method_call = new revoke_all_privileges_call(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class revoke_all_privileges_call extends TAsyncMethodCall { + private String user_name; + private boolean is_role; + private boolean is_group; + private boolean remove_user_priv; + private List dbs; + private List
tables; + private List parts; + private Map> columns; + public revoke_all_privileges_call(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.user_name = user_name; + this.is_role = is_role; + this.is_group = is_group; + this.remove_user_priv = remove_user_priv; + this.dbs = dbs; + this.tables = tables; + this.parts = parts; + this.columns = columns; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("revoke_all_privileges", TMessageType.CALL, 0)); + revoke_all_privileges_args args = new revoke_all_privileges_args(); + args.setUser_name(user_name); + args.setIs_role(is_role); + args.setIs_group(is_group); + args.setRemove_user_priv(remove_user_priv); + args.setDbs(dbs); + args.setTables(tables); + args.setParts(parts); + args.setColumns(columns); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_revoke_all_privileges(); + } + } + + } + + public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(Iface iface) + { + super(iface); + iface_ = iface; + processMap_.put("create_database", new create_database()); + processMap_.put("get_database", new get_database()); + processMap_.put("drop_database", new drop_database()); + processMap_.put("get_databases", new get_databases()); + processMap_.put("get_all_databases", new get_all_databases()); + processMap_.put("get_type", new get_type()); + processMap_.put("create_type", new create_type()); + processMap_.put("drop_type", new drop_type()); + processMap_.put("get_type_all", new get_type_all()); + processMap_.put("get_fields", new get_fields()); + processMap_.put("get_schema", new get_schema()); + processMap_.put("create_table", new create_table()); + processMap_.put("drop_table", new drop_table()); + processMap_.put("get_tables", new get_tables()); + processMap_.put("get_all_tables", new get_all_tables()); + processMap_.put("get_table", new get_table()); + processMap_.put("alter_table", new alter_table()); + processMap_.put("add_partition", new add_partition()); + processMap_.put("append_partition", new append_partition()); + processMap_.put("append_partition_by_name", new append_partition_by_name()); + processMap_.put("drop_partition", new drop_partition()); + processMap_.put("drop_partition_by_name", new drop_partition_by_name()); + processMap_.put("get_partition", new get_partition()); + processMap_.put("get_partition_with_auth", new get_partition_with_auth()); + processMap_.put("get_partition_by_name", new get_partition_by_name()); + processMap_.put("get_partitions", new get_partitions()); + processMap_.put("get_partitions_with_auth", new get_partitions_with_auth()); + processMap_.put("get_partition_names", new get_partition_names()); + processMap_.put("get_partitions_ps", new get_partitions_ps()); + processMap_.put("get_partitions_ps_with_auth", new get_partitions_ps_with_auth()); + processMap_.put("get_partition_names_ps", new get_partition_names_ps()); + processMap_.put("get_partitions_by_filter", new get_partitions_by_filter()); + processMap_.put("alter_partition", new alter_partition()); + processMap_.put("get_config_value", new get_config_value()); + processMap_.put("partition_name_to_vals", new partition_name_to_vals()); + processMap_.put("partition_name_to_spec", new partition_name_to_spec()); + processMap_.put("add_index", new add_index()); + processMap_.put("alter_index", new alter_index()); + processMap_.put("drop_index_by_name", new drop_index_by_name()); + processMap_.put("get_index_by_name", new get_index_by_name()); + processMap_.put("get_indexes", new get_indexes()); + processMap_.put("get_index_names", new get_index_names()); + processMap_.put("get_user_privilege_set", new get_user_privilege_set()); + processMap_.put("get_db_privilege_set", new get_db_privilege_set()); + processMap_.put("get_table_privilege_set", new get_table_privilege_set()); + processMap_.put("get_partition_privilege_set", new get_partition_privilege_set()); + processMap_.put("get_column_privilege_set", new get_column_privilege_set()); + processMap_.put("create_role", new create_role()); + processMap_.put("drop_role", new drop_role()); + processMap_.put("add_role_member", new add_role_member()); + processMap_.put("remove_role_member", new remove_role_member()); + processMap_.put("list_roles", new list_roles()); + processMap_.put("list_security_user_grant", new list_security_user_grant()); + processMap_.put("list_security_db_grant", new list_security_db_grant()); + processMap_.put("list_security_table_grant", new list_security_table_grant()); + processMap_.put("list_security_partition_grant", new list_security_partition_grant()); + processMap_.put("list_security_column_grant", new list_security_column_grant()); + processMap_.put("grant_privileges", new grant_privileges()); + processMap_.put("revoke_privileges", new revoke_privileges()); + processMap_.put("revoke_all_privileges", new revoke_all_privileges()); + } + + private Iface iface_; + + public boolean process(TProtocol iprot, TProtocol oprot) throws TException + { + TMessage msg = iprot.readMessageBegin(); + ProcessFunction fn = processMap_.get(msg.name); + if (fn == null) { + TProtocolUtil.skip(iprot, TType.STRUCT); + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); + oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return true; + } + fn.process(msg.seqid, iprot, oprot); + return true; + } + + private class create_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_database_args args = new create_database_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + create_database_result result = new create_database_result(); + try { + iface_.create_database(args.database); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing create_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_database"); + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_database_args args = new get_database_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_database_result result = new get_database_result(); + try { + result.success = iface_.get_database(args.name); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_database"); + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_database_args args = new drop_database_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + drop_database_result result = new drop_database_result(); + try { + iface_.drop_database(args.name, args.deleteData); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidOperationException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_database"); + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_databases implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_databases_args args = new get_databases_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_databases_result result = new get_databases_result(); + try { + result.success = iface_.get_databases(args.pattern); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_databases", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_databases"); + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_all_databases implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_all_databases_args args = new get_all_databases_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_all_databases_result result = new get_all_databases_result(); + try { + result.success = iface_.get_all_databases(); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_all_databases", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_databases"); + oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_type implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_type_args args = new get_type_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_type_result result = new get_type_result(); + try { + result.success = iface_.get_type(args.name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_type", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_type"); + oprot.writeMessageBegin(new TMessage("get_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_type", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class create_type implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_type_args args = new create_type_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("create_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + create_type_result result = new create_type_result(); + try { + result.success = iface_.create_type(args.type); + result.setSuccessIsSet(true); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing create_type", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_type"); + oprot.writeMessageBegin(new TMessage("create_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_type", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_type implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_type_args args = new drop_type_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + drop_type_result result = new drop_type_result(); + try { + result.success = iface_.drop_type(args.type); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_type", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_type"); + oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_type_all implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_type_all_args args = new get_type_all_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_type_all_result result = new get_type_all_result(); + try { + result.success = iface_.get_type_all(args.name); + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_type_all", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_type_all"); + oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_fields implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_fields_args args = new get_fields_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_fields_result result = new get_fields_result(); + try { + result.success = iface_.get_fields(args.db_name, args.table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_fields", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_fields"); + oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_schema implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_schema_args args = new get_schema_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_schema_result result = new get_schema_result(); + try { + result.success = iface_.get_schema(args.db_name, args.table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_schema", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_schema"); + oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class create_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_table_args args = new create_table_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + create_table_result result = new create_table_result(); + try { + iface_.create_table(args.tbl); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } catch (Throwable th) { + LOGGER.error("Internal error processing create_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_table"); + oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_table_args args = new drop_table_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + drop_table_result result = new drop_table_result(); + try { + iface_.drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_table"); + oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_tables implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_tables_args args = new get_tables_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_tables_result result = new get_tables_result(); + try { + result.success = iface_.get_tables(args.db_name, args.pattern); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_tables", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_tables"); + oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_all_tables implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_all_tables_args args = new get_all_tables_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_all_tables_result result = new get_all_tables_result(); + try { + result.success = iface_.get_all_tables(args.db_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_all_tables", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_tables"); + oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_table_args args = new get_table_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_table_result result = new get_table_result(); + try { + result.success = iface_.get_table(args.dbname, args.tbl_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table"); + oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_table_args args = new alter_table_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + alter_table_result result = new alter_table_result(); + try { + iface_.alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_table"); + oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class add_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + add_partition_args args = new add_partition_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + add_partition_result result = new add_partition_result(); + try { + result.success = iface_.add_partition(args.new_part); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing add_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_partition"); + oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class append_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + append_partition_args args = new append_partition_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + append_partition_result result = new append_partition_result(); + try { + result.success = iface_.append_partition(args.db_name, args.tbl_name, args.part_vals); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing append_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition"); + oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class append_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + append_partition_by_name_args args = new append_partition_by_name_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + append_partition_by_name_result result = new append_partition_by_name_result(); + try { + result.success = iface_.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing append_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition_by_name"); + oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_partition_args args = new drop_partition_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + drop_partition_result result = new drop_partition_result(); + try { + result.success = iface_.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition"); + oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_partition_by_name_args args = new drop_partition_by_name_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + drop_partition_by_name_result result = new drop_partition_by_name_result(); + try { + result.success = iface_.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition_by_name"); + oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_args args = new get_partition_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partition_result result = new get_partition_result(); + try { + result.success = iface_.get_partition(args.db_name, args.tbl_name, args.part_vals); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition"); + oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_with_auth implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_with_auth_args args = new get_partition_with_auth_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partition_with_auth_result result = new get_partition_with_auth_result(); + try { + result.success = iface_.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_with_auth", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_with_auth"); + oprot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_by_name_args args = new get_partition_by_name_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partition_by_name_result result = new get_partition_by_name_result(); + try { + result.success = iface_.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_by_name"); + oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_args args = new get_partitions_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partitions_result result = new get_partitions_result(); + try { + result.success = iface_.get_partitions(args.db_name, args.tbl_name, args.max_parts); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions"); + oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_with_auth implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_with_auth_args args = new get_partitions_with_auth_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partitions_with_auth_result result = new get_partitions_with_auth_result(); + try { + result.success = iface_.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_with_auth", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_with_auth"); + oprot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_names implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_names_args args = new get_partition_names_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partition_names_result result = new get_partition_names_result(); + try { + result.success = iface_.get_partition_names(args.db_name, args.tbl_name, args.max_parts); + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_names", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names"); + oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_ps implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_ps_args args = new get_partitions_ps_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partitions_ps_result result = new get_partitions_ps_result(); + try { + result.success = iface_.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_ps", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps"); + oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_ps_with_auth implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); + try { + result.success = iface_.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_ps_with_auth", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps_with_auth"); + oprot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_names_ps implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_names_ps_args args = new get_partition_names_ps_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partition_names_ps_result result = new get_partition_names_ps_result(); + try { + result.success = iface_.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_names_ps", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names_ps"); + oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_by_filter implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_by_filter_args args = new get_partitions_by_filter_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partitions_by_filter_result result = new get_partitions_by_filter_result(); + try { + result.success = iface_.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_by_filter", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_by_filter"); + oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_partition_args args = new alter_partition_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + alter_partition_result result = new alter_partition_result(); + try { + iface_.alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_partition"); + oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_config_value implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_config_value_args args = new get_config_value_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_config_value_result result = new get_config_value_result(); + try { + result.success = iface_.get_config_value(args.name, args.defaultValue); + } catch (ConfigValSecurityException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_config_value", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_config_value"); + oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class partition_name_to_vals implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + partition_name_to_vals_args args = new partition_name_to_vals_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + partition_name_to_vals_result result = new partition_name_to_vals_result(); + try { + result.success = iface_.partition_name_to_vals(args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing partition_name_to_vals", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_vals"); + oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class partition_name_to_spec implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + partition_name_to_spec_args args = new partition_name_to_spec_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + partition_name_to_spec_result result = new partition_name_to_spec_result(); + try { + result.success = iface_.partition_name_to_spec(args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing partition_name_to_spec", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_spec"); + oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class add_index implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + add_index_args args = new add_index_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + add_index_result result = new add_index_result(); + try { + result.success = iface_.add_index(args.new_index, args.index_table); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing add_index", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_index"); + oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("add_index", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_index implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_index_args args = new alter_index_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + alter_index_result result = new alter_index_result(); + try { + iface_.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_index", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_index"); + oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_index_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_index_by_name_args args = new drop_index_by_name_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + drop_index_by_name_result result = new drop_index_by_name_result(); + try { + result.success = iface_.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_index_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_index_by_name"); + oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_index_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_index_by_name_args args = new get_index_by_name_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_index_by_name_result result = new get_index_by_name_result(); + try { + result.success = iface_.get_index_by_name(args.db_name, args.tbl_name, args.index_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_index_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_by_name"); + oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + } private class get_indexes implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { - get_indexes_args args = new get_indexes_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + get_indexes_args args = new get_indexes_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_indexes_result result = new get_indexes_result(); + try { + result.success = iface_.get_indexes(args.db_name, args.tbl_name, args.max_indexes); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_indexes", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_indexes"); + oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_index_names implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_index_names_args args = new get_index_names_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_index_names_result result = new get_index_names_result(); + try { + result.success = iface_.get_index_names(args.db_name, args.tbl_name, args.max_indexes); + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_index_names", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_names"); + oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_user_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_user_privilege_set_args args = new get_user_privilege_set_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_user_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_user_privilege_set_result result = new get_user_privilege_set_result(); + try { + result.success = iface_.get_user_privilege_set(args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_user_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_user_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_user_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_user_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_db_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_db_privilege_set_args args = new get_db_privilege_set_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_db_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_db_privilege_set_result result = new get_db_privilege_set_result(); + try { + result.success = iface_.get_db_privilege_set(args.db_name, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_db_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_db_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_db_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_db_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_table_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_table_privilege_set_args args = new get_table_privilege_set_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_table_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_table_privilege_set_result result = new get_table_privilege_set_result(); + try { + result.success = iface_.get_table_privilege_set(args.db_name, args.table_name, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_table_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_table_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_table_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_privilege_set_args args = new get_partition_privilege_set_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_partition_privilege_set_result result = new get_partition_privilege_set_result(); + try { + result.success = iface_.get_partition_privilege_set(args.db_name, args.table_name, args.part_name, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_partition_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_column_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_column_privilege_set_args args = new get_column_privilege_set_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_column_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_column_privilege_set_result result = new get_column_privilege_set_result(); + try { + result.success = iface_.get_column_privilege_set(args.db_name, args.table_name, args.part_name, args.column_name, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_column_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_column_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_column_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_column_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class create_role implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_role_args args = new create_role_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("create_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + create_role_result result = new create_role_result(); + try { + result.success = iface_.create_role(args.role_name, args.owner_name, args.db_name); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing create_role", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_role"); + oprot.writeMessageBegin(new TMessage("create_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_role", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_role implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_role_args args = new drop_role_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + drop_role_result result = new drop_role_result(); + try { + result.success = iface_.drop_role(args.role_name, args.db_name); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_role", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_role"); + oprot.writeMessageBegin(new TMessage("drop_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_role", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class add_role_member implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + add_role_member_args args = new add_role_member_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("add_role_member", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + add_role_member_result result = new add_role_member_result(); + try { + result.success = iface_.add_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing add_role_member", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_role_member"); + oprot.writeMessageBegin(new TMessage("add_role_member", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("add_role_member", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class remove_role_member implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + remove_role_member_args args = new remove_role_member_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("remove_role_member", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + remove_role_member_result result = new remove_role_member_result(); + try { + result.success = iface_.remove_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing remove_role_member", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing remove_role_member"); + oprot.writeMessageBegin(new TMessage("remove_role_member", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("remove_role_member", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_roles implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_roles_args args = new list_roles_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("list_roles", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + list_roles_result result = new list_roles_result(); + try { + result.success = iface_.list_roles(args.principal_name, args.is_role, args.is_group, args.db_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_roles", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_roles"); + oprot.writeMessageBegin(new TMessage("list_roles", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_roles", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_user_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_user_grant_args args = new list_security_user_grant_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("list_security_user_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + list_security_user_grant_result result = new list_security_user_grant_result(); + try { + result.success = iface_.list_security_user_grant(args.principla_name, args.is_role, args.is_group); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_user_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_user_grant"); + oprot.writeMessageBegin(new TMessage("list_security_user_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_user_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_db_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_db_grant_args args = new list_security_db_grant_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("list_security_db_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + list_security_db_grant_result result = new list_security_db_grant_result(); + try { + result.success = iface_.list_security_db_grant(args.principal_name, args.is_group, args.is_role, args.db_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_db_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_db_grant"); + oprot.writeMessageBegin(new TMessage("list_security_db_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_db_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_table_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_table_grant_args args = new list_security_table_grant_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("list_security_table_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + list_security_table_grant_result result = new list_security_table_grant_result(); + try { + result.success = iface_.list_security_table_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_table_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_table_grant"); + oprot.writeMessageBegin(new TMessage("list_security_table_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_table_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_partition_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_partition_grant_args args = new list_security_partition_grant_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("list_security_partition_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + list_security_partition_grant_result result = new list_security_partition_grant_result(); + try { + result.success = iface_.list_security_partition_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_partition_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_partition_grant"); + oprot.writeMessageBegin(new TMessage("list_security_partition_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_partition_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_column_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_column_grant_args args = new list_security_column_grant_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("list_security_column_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + list_security_column_grant_result result = new list_security_column_grant_result(); + try { + result.success = iface_.list_security_column_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name, args.column_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_column_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_column_grant"); + oprot.writeMessageBegin(new TMessage("list_security_column_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_column_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class grant_privileges implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + grant_privileges_args args = new grant_privileges_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("grant_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + grant_privileges_result result = new grant_privileges_result(); + try { + result.success = iface_.grant_privileges(args.user_name, args.is_role, args.is_group, args.privileges, args.grantor); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing grant_privileges", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing grant_privileges"); + oprot.writeMessageBegin(new TMessage("grant_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("grant_privileges", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class revoke_privileges implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + revoke_privileges_args args = new revoke_privileges_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + revoke_privileges_result result = new revoke_privileges_result(); + try { + result.success = iface_.revoke_privileges(args.user_name, args.is_role, args.is_group, args.privileges); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing revoke_privileges", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing revoke_privileges"); + oprot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class revoke_all_privileges implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + revoke_all_privileges_args args = new revoke_all_privileges_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("revoke_all_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + revoke_all_privileges_result result = new revoke_all_privileges_result(); + try { + result.success = iface_.revoke_all_privileges(args.user_name, args.is_role, args.is_group, args.remove_user_priv, args.dbs, args.tables, args.parts, args.columns); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing revoke_all_privileges", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing revoke_all_privileges"); + oprot.writeMessageBegin(new TMessage("revoke_all_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("revoke_all_privileges", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + } + + public static class create_database_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_database_args"); + + private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)1); + + private Database database; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DATABASE((short)1, "database"); + + 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: // DATABASE + return DATABASE; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); + } + + public create_database_args() { + } + + public create_database_args( + Database database) + { + this(); + this.database = database; + } + + /** + * Performs a deep copy on other. + */ + public create_database_args(create_database_args other) { + if (other.isSetDatabase()) { + this.database = new Database(other.database); + } + } + + public create_database_args deepCopy() { + return new create_database_args(this); + } + + @Override + public void clear() { + this.database = null; + } + + public Database getDatabase() { + return this.database; + } + + public void setDatabase(Database database) { + this.database = database; + } + + public void unsetDatabase() { + this.database = null; + } + + /** Returns true if field database is set (has been asigned a value) and false otherwise */ + public boolean isSetDatabase() { + return this.database != null; + } + + public void setDatabaseIsSet(boolean value) { + if (!value) { + this.database = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DATABASE: + if (value == null) { + unsetDatabase(); + } else { + setDatabase((Database)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DATABASE: + return getDatabase(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DATABASE: + return isSetDatabase(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_database_args) + return this.equals((create_database_args)that); + return false; + } + + public boolean equals(create_database_args that) { + if (that == null) + return false; + + boolean this_present_database = true && this.isSetDatabase(); + boolean that_present_database = true && that.isSetDatabase(); + if (this_present_database || that_present_database) { + if (!(this_present_database && that_present_database)) + return false; + if (!this.database.equals(that.database)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_database_args typedOther = (create_database_args)other; + + lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(typedOther.isSetDatabase()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatabase()) { + lastComparison = TBaseHelper.compareTo(this.database, typedOther.database); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DATABASE + if (field.type == TType.STRUCT) { + this.database = new Database(); + this.database.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.database != null) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + this.database.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_database_args("); + boolean first = true; + + sb.append("database:"); + if (this.database == null) { + sb.append("null"); + } else { + sb.append(this.database); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class create_database_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_database_result"); + + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private AlreadyExistsException o1; + private InvalidObjectException o2; + private MetaException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); + } + + public create_database_result() { + } + + public create_database_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public create_database_result(create_database_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public create_database_result deepCopy() { + return new create_database_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_database_result) + return this.equals((create_database_result)that); + return false; + } + + public boolean equals(create_database_result that) { + if (that == null) + 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_database_result typedOther = (create_database_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_database_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_database_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_database_args"); + + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + + private String name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"); + + 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: // NAME + return NAME; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); + } + + public get_database_args() { + } + + public get_database_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_database_args(get_database_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_database_args deepCopy() { + return new get_database_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been asigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_database_args) + return this.equals((get_database_args)that); + return false; + } + + public boolean equals(get_database_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_database_args typedOther = (get_database_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_database_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_database_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_database_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private Database success; + private NoSuchObjectException o1; + private MetaException o2; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + 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; + case 2: // O2 + return O2; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); + } + + public get_database_result() { + } + + public get_database_result( + Database success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_database_result(get_database_result other) { + if (other.isSetSuccess()) { + this.success = new Database(other.success); + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_database_result deepCopy() { + return new get_database_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Database getSuccess() { + return this.success; + } + + public void setSuccess(Database success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Database)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_database_result) + return this.equals((get_database_result)that); + return false; + } + + public boolean equals(get_database_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_database_result typedOther = (get_database_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Database(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_database_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_database_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_database_args"); + + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)2); + + private String name; + private boolean deleteData; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"), + DELETE_DATA((short)2, "deleteData"); + + 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: // NAME + return NAME; + case 2: // DELETE_DATA + return DELETE_DATA; + 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 __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); + } + + public drop_database_args() { + } + + public drop_database_args( + String name, + boolean deleteData) + { + this(); + this.name = name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_database_args(drop_database_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetName()) { + this.name = other.name; + } + this.deleteData = other.deleteData; + } + + public drop_database_args deepCopy() { + return new drop_database_args(this); + } + + @Override + public void clear() { + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been asigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_database_args) + return this.equals((drop_database_args)that); + return false; + } + + public boolean equals(drop_database_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_database_args typedOther = (drop_database_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_database_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_database_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_database_result"); + + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private NoSuchObjectException o1; + private InvalidOperationException o2; + private MetaException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_database_result.class, metaDataMap); + } + + public drop_database_result() { + } + + public drop_database_result( + NoSuchObjectException o1, + InvalidOperationException o2, + MetaException o3) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_database_result(drop_database_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidOperationException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_database_result deepCopy() { + return new drop_database_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidOperationException getO2() { + return this.o2; + } + + public void setO2(InvalidOperationException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidOperationException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_database_result) + return this.equals((drop_database_result)that); + return false; + } + + public boolean equals(drop_database_result that) { + if (that == null) + 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_database_result typedOther = (drop_database_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidOperationException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_database_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_databases_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_databases_args"); + + private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)1); + + private String pattern; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PATTERN((short)1, "pattern"); + + 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: // PATTERN + return PATTERN; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); + } + + public get_databases_args() { + } + + public get_databases_args( + String pattern) + { + this(); + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_databases_args(get_databases_args other) { + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + public get_databases_args deepCopy() { + return new get_databases_args(this); + } + + @Override + public void clear() { + this.pattern = null; + } + + public String getPattern() { + return this.pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been asigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PATTERN: + return getPattern(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PATTERN: + return isSetPattern(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_databases_args) + return this.equals((get_databases_args)that); + return false; + } + + public boolean equals(get_databases_args that) { + if (that == null) + return false; + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_databases_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_databases_args typedOther = (get_databases_args)other; + + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PATTERN + if (field.type == TType.STRING) { + this.pattern = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(this.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_databases_args("); + boolean first = true; + + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_databases_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_databases_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private List success; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); + } + + public get_databases_result() { + } + + public get_databases_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_databases_result(get_databases_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_databases_result deepCopy() { + return new get_databases_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(String 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 asigned 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 asigned 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 asigned 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 get_databases_result) + return this.equals((get_databases_result)that); + return false; + } + + public boolean equals(get_databases_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() { + return 0; + } + + public int compareTo(get_databases_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_databases_result typedOther = (get_databases_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list107 = iprot.readListBegin(); + this.success = new ArrayList(_list107.size); + for (int _i108 = 0; _i108 < _list107.size; ++_i108) + { + String _elem109; + _elem109 = iprot.readString(); + this.success.add(_elem109); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter110 : this.success) + { + oprot.writeString(_iter110); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_databases_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 TException { + // check for required fields + } + + } + + public static class get_all_databases_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_args"); + + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { +; + + 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) { + 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; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_all_databases_args.class, metaDataMap); + } + + public get_all_databases_args() { + } + + /** + * Performs a deep copy on other. + */ + public get_all_databases_args(get_all_databases_args other) { + } + + public get_all_databases_args deepCopy() { + return new get_all_databases_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_databases_args) + return this.equals((get_all_databases_args)that); + return false; + } + + public boolean equals(get_all_databases_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_all_databases_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_databases_args typedOther = (get_all_databases_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_databases_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_all_databases_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private List success; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); + } + + public get_all_databases_result() { + } + + public get_all_databases_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_databases_result(get_all_databases_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_all_databases_result deepCopy() { + return new get_all_databases_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(String 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 asigned 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 asigned 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 asigned 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 get_all_databases_result) + return this.equals((get_all_databases_result)that); + return false; + } + + public boolean equals(get_all_databases_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() { + return 0; + } + + public int compareTo(get_all_databases_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_databases_result typedOther = (get_all_databases_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list111 = iprot.readListBegin(); + this.success = new ArrayList(_list111.size); + for (int _i112 = 0; _i112 < _list111.size; ++_i112) + { + String _elem113; + _elem113 = iprot.readString(); + this.success.add(_elem113); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter114 : this.success) + { + oprot.writeString(_iter114); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_databases_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 TException { + // check for required fields + } + + } + + public static class get_type_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_type_args"); + + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + + private String name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"); + + 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: // NAME + return NAME; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); + } + + public get_type_args() { + } + + public get_type_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_type_args(get_type_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_type_args deepCopy() { + return new get_type_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been asigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_args) + return this.equals((get_type_args)that); + return false; + } + + public boolean equals(get_type_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_args typedOther = (get_type_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_type_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_type_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_type_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private Type success; + private MetaException o1; + private NoSuchObjectException o2; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + 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; + case 2: // O2 + return O2; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Type.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); + } + + public get_type_result() { + } + + public get_type_result( + Type success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_type_result(get_type_result other) { + if (other.isSetSuccess()) { + this.success = new Type(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_type_result deepCopy() { + return new get_type_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Type getSuccess() { + return this.success; + } + + public void setSuccess(Type success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned 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 asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Type)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_result) + return this.equals((get_type_result)that); + return false; + } + + public boolean equals(get_type_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_result typedOther = (get_type_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Type(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_type_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class create_type_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_type_args"); + + private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRUCT, (short)1); + + private Type type; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TYPE((short)1, "type"); + + 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: // TYPE + return TYPE; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Type.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); + } + + public create_type_args() { + } + + public create_type_args( + Type type) + { + this(); + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public create_type_args(create_type_args other) { + if (other.isSetType()) { + this.type = new Type(other.type); + } + } + + public create_type_args deepCopy() { + return new create_type_args(this); + } + + @Override + public void clear() { + this.type = null; + } + + public Type getType() { + return this.type; + } + + public void setType(Type type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been asigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((Type)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TYPE: + return getType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TYPE: + return isSetType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_type_args) + return this.equals((create_type_args)that); + return false; + } + + public boolean equals(create_type_args that) { + if (that == null) + return false; + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_type_args typedOther = (create_type_args)other; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TYPE + if (field.type == TType.STRUCT) { + this.type = new Type(); + this.type.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + this.type.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_type_args("); + boolean first = true; + + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class create_type_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_type_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private boolean success; + private AlreadyExistsException o1; + private InvalidObjectException o2; + private MetaException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + 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 BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); + } + + public create_type_result() { + } + + public create_type_result( + boolean success, + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public create_type_result(create_type_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public create_type_result deepCopy() { + return new create_type_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_type_result) + return this.equals((create_type_result)that); + return false; + } + + public boolean equals(create_type_result that) { + if (that == null) + return false; + + 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 != 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_type_result typedOther = (create_type_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_type_result("); + boolean first = true; + + sb.append("success:"); + 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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_type_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_type_args"); + + private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRING, (short)1); + + private String type; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TYPE((short)1, "type"); + + 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: // TYPE + return TYPE; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap); + } + + public drop_type_args() { + } + + public drop_type_args( + String type) + { + this(); + this.type = type; + } + + /** + * Performs a deep copy on other. + */ + public drop_type_args(drop_type_args other) { + if (other.isSetType()) { + this.type = other.type; + } + } + + public drop_type_args deepCopy() { + return new drop_type_args(this); + } + + @Override + public void clear() { + this.type = null; + } + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public void unsetType() { + this.type = null; + } + + /** Returns true if field type is set (has been asigned a value) and false otherwise */ + public boolean isSetType() { + return this.type != null; + } + + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TYPE: + return getType(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TYPE: + return isSetType(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_type_args) + return this.equals((drop_type_args)that); + return false; + } + + public boolean equals(drop_type_args that) { + if (that == null) + return false; + + boolean this_present_type = true && this.isSetType(); + boolean that_present_type = true && that.isSetType(); + if (this_present_type || that_present_type) { + if (!(this_present_type && that_present_type)) + return false; + if (!this.type.equals(that.type)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_type_args typedOther = (drop_type_args)other; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TYPE + if (field.type == TType.STRING) { + this.type = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.type != null) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeString(this.type); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_type_args("); + boolean first = true; + + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_type_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_type_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private boolean success; + private MetaException o1; + private NoSuchObjectException o2; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + 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; + case 2: // O2 + return O2; + 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 BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap); + } + + public drop_type_result() { + } + + public drop_type_result( + boolean success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_type_result(drop_type_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public drop_type_result deepCopy() { + return new drop_type_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + 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 asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_type_result) + return this.equals((drop_type_result)that); + return false; + } + + public boolean equals(drop_type_result that) { + if (that == null) + return false; + + 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 != 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_type_result typedOther = (drop_type_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_type_result("); + boolean first = true; + + sb.append("success:"); + 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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_type_all_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_type_all_args"); + + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + + private String name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"); + + 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: // NAME + return NAME; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap); + } + + public get_type_all_args() { + } + + public get_type_all_args( + String name) + { + this(); + this.name = name; + } + + /** + * Performs a deep copy on other. + */ + public get_type_all_args(get_type_all_args other) { + if (other.isSetName()) { + this.name = other.name; + } + } + + public get_type_all_args deepCopy() { + return new get_type_all_args(this); + } + + @Override + public void clear() { + this.name = null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been asigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_all_args) + return this.equals((get_type_all_args)that); + return false; + } + + public boolean equals(get_type_all_args that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_type_all_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_all_args typedOther = (get_type_all_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_type_all_args("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_type_all_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_type_all_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); + + private Map success; + private MetaException o2; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O2((short)1, "o2"); + + 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: // O2 + return O2; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new StructMetaData(TType.STRUCT, Type.class)))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); + } + + public get_type_all_result() { + } + + public get_type_all_result( + Map success, + MetaException o2) + { + this(); + this.success = success; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_type_all_result(get_type_all_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(); + for (Map.Entry other_element : other.success.entrySet()) { + + String other_element_key = other_element.getKey(); + Type other_element_value = other_element.getValue(); + + String __this__success_copy_key = other_element_key; + + Type __this__success_copy_value = new Type(other_element_value); + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_type_all_result deepCopy() { + return new get_type_all_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, Type val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public void setSuccess(Map success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_type_all_result) + return this.equals((get_type_all_result)that); + return false; + } + + public boolean equals(get_type_all_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_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_type_all_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_all_result typedOther = (get_type_all_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.MAP) { + { + TMap _map115 = iprot.readMapBegin(); + this.success = new HashMap(2*_map115.size); + for (int _i116 = 0; _i116 < _map115.size; ++_i116) + { + String _key117; + Type _val118; + _key117 = iprot.readString(); + _val118 = new Type(); + _val118.read(iprot); + this.success.put(_key117, _val118); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); + for (Map.Entry _iter119 : this.success.entrySet()) + { + oprot.writeString(_iter119.getKey()); + _iter119.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_type_all_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("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_fields_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_fields_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + + private String db_name; + private String table_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"); + + 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: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap); + } + + public get_fields_args() { + } + + public get_fields_args( + String db_name, + String table_name) + { + this(); + this.db_name = db_name; + this.table_name = table_name; + } + + /** + * Performs a deep copy on other. + */ + public get_fields_args(get_fields_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + } + + public get_fields_args deepCopy() { + return new get_fields_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_fields_args) + return this.equals((get_fields_args)that); + return false; + } + + public boolean equals(get_fields_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_fields_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_fields_args typedOther = (get_fields_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_fields_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_fields_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_fields_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private List success; + private MetaException o1; + private UnknownTableException o2; + private UnknownDBException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); + } + + public get_fields_result() { + } + + public get_fields_result( + List success, + MetaException o1, + UnknownTableException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_fields_result(get_fields_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (FieldSchema other_element : other.success) { + __this__success.add(new FieldSchema(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new UnknownTableException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_fields_result deepCopy() { + return new get_fields_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = 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(FieldSchema 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 asigned 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 asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public UnknownTableException getO2() { + return this.o2; + } + + public void setO2(UnknownTableException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = 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; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((UnknownTableException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_fields_result) + return this.equals((get_fields_result)that); + return false; + } + + public boolean equals(get_fields_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_fields_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_fields_result typedOther = (get_fields_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list120 = iprot.readListBegin(); + this.success = new ArrayList(_list120.size); + for (int _i121 = 0; _i121 < _list120.size; ++_i121) + { + FieldSchema _elem122; + _elem122 = new FieldSchema(); + _elem122.read(iprot); + this.success.add(_elem122); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new UnknownTableException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new UnknownDBException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (FieldSchema _iter123 : this.success) + { + _iter123.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_fields_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_schema_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_schema_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + + private String db_name; + private String table_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"); + + 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: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap); + } + + public get_schema_args() { + } + + public get_schema_args( + String db_name, + String table_name) + { + this(); + this.db_name = db_name; + this.table_name = table_name; + } + + /** + * Performs a deep copy on other. + */ + public get_schema_args(get_schema_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + } + + public get_schema_args deepCopy() { + return new get_schema_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; + } + + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_schema_args) + return this.equals((get_schema_args)that); + return false; + } + + public boolean equals(get_schema_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_schema_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_schema_args typedOther = (get_schema_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_schema_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_schema_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_schema_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private List success; + private MetaException o1; + private UnknownTableException o2; + private UnknownDBException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, FieldSchema.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); + } + + public get_schema_result() { + } + + public get_schema_result( + List success, + MetaException o1, + UnknownTableException o2, + UnknownDBException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public get_schema_result(get_schema_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (FieldSchema other_element : other.success) { + __this__success.add(new FieldSchema(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new UnknownTableException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new UnknownDBException(other.o3); + } + } + + public get_schema_result deepCopy() { + return new get_schema_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = 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(FieldSchema 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 asigned 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 asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public UnknownTableException getO2() { + return this.o2; + } + + public void setO2(UnknownTableException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public UnknownDBException getO3() { + return this.o3; + } + + public void setO3(UnknownDBException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = 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; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((UnknownTableException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((UnknownDBException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_schema_result) + return this.equals((get_schema_result)that); + return false; + } + + public boolean equals(get_schema_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_schema_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_schema_result typedOther = (get_schema_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list124 = iprot.readListBegin(); + this.success = new ArrayList(_list124.size); + for (int _i125 = 0; _i125 < _list124.size; ++_i125) + { + FieldSchema _elem126; + _elem126 = new FieldSchema(); + _elem126.read(iprot); + this.success.add(_elem126); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new UnknownTableException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new UnknownDBException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (FieldSchema _iter127 : this.success) + { + _iter127.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_schema_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class create_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_table_args"); + + private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1); + + private Table tbl; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TBL((short)1, "tbl"); + + 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: // TBL + return TBL; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); + } + + public create_table_args() { + } + + public create_table_args( + Table tbl) + { + this(); + this.tbl = tbl; + } + + /** + * Performs a deep copy on other. + */ + public create_table_args(create_table_args other) { + if (other.isSetTbl()) { + this.tbl = new Table(other.tbl); + } + } + + public create_table_args deepCopy() { + return new create_table_args(this); + } + + @Override + public void clear() { + this.tbl = null; + } + + public Table getTbl() { + return this.tbl; + } + + public void setTbl(Table tbl) { + this.tbl = tbl; + } + + public void unsetTbl() { + this.tbl = null; + } + + /** Returns true if field tbl is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl() { + return this.tbl != null; + } + + public void setTblIsSet(boolean value) { + if (!value) { + this.tbl = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TBL: + if (value == null) { + unsetTbl(); + } else { + setTbl((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TBL: + return getTbl(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TBL: + return isSetTbl(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_args) + return this.equals((create_table_args)that); + return false; + } + + public boolean equals(create_table_args that) { + if (that == null) + return false; + + boolean this_present_tbl = true && this.isSetTbl(); + boolean that_present_tbl = true && that.isSetTbl(); + if (this_present_tbl || that_present_tbl) { + if (!(this_present_tbl && that_present_tbl)) + return false; + if (!this.tbl.equals(that.tbl)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_table_args typedOther = (create_table_args)other; + + lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl()) { + lastComparison = TBaseHelper.compareTo(this.tbl, typedOther.tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // TBL + if (field.type == TType.STRUCT) { + this.tbl = new Table(); + this.tbl.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + this.tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_table_args("); + boolean first = true; + + sb.append("tbl:"); + if (this.tbl == null) { + sb.append("null"); + } else { + sb.append(this.tbl); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class create_table_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_table_result"); + + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField O4_FIELD_DESC = new TField("o4", TType.STRUCT, (short)4); + + private AlreadyExistsException o1; + private InvalidObjectException o2; + private MetaException o3; + private NoSuchObjectException o4; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + 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: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); + } + + public create_table_result() { + } + + public create_table_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3, + NoSuchObjectException o4) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public create_table_result(create_table_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } + } + + public create_table_result deepCopy() { + return new create_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public AlreadyExistsException getO1() { + return this.o1; + } + + public void setO1(AlreadyExistsException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public NoSuchObjectException getO4() { + return this.o4; + } + + public void setO4(NoSuchObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been asigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_result) + return this.equals((create_table_result)that); + return false; + } + + public boolean equals(create_table_result that) { + if (that == null) + 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(create_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_table_result typedOther = (create_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // O4 + if (field.type == TType.STRUCT) { + this.o4 = new NoSuchObjectException(); + this.o4.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_table_args"); + + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2); + private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)3); + + private String dbname; + private String name; + private boolean deleteData; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DBNAME((short)1, "dbname"), + NAME((short)2, "name"), + DELETE_DATA((short)3, "deleteData"); + + 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: // DBNAME + return DBNAME; + case 2: // NAME + return NAME; + case 3: // DELETE_DATA + return DELETE_DATA; + 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 __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); + } + + public drop_table_args() { + } + + public drop_table_args( + String dbname, + String name, + boolean deleteData) + { + this(); + this.dbname = dbname; + this.name = name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_table_args(drop_table_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetName()) { + this.name = other.name; + } + this.deleteData = other.deleteData; + } + + public drop_table_args deepCopy() { + return new drop_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been asigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case NAME: + return getName(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case NAME: + return isSetName(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_args) + return this.equals((drop_table_args)that); + return false; + } + + public boolean equals(drop_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_table_args typedOther = (drop_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_table_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_table_result"); + + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2); + + private NoSuchObjectException o1; + private MetaException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + O1((short)1, "o1"), + O3((short)2, "o3"); + + 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: // O1 + return O1; + case 2: // O3 + return O3; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); + } + + public drop_table_result() { + } + + public drop_table_result( + NoSuchObjectException o1, + MetaException o3) + { + this(); + this.o1 = o1; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_table_result(drop_table_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public drop_table_result deepCopy() { + return new drop_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_result) + return this.equals((drop_table_result)that); + return false; + } + + public boolean equals(drop_table_result that) { + if (that == null) + 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; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_table_result typedOther = (drop_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_tables_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)2); + + private String db_name; + private String pattern; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + PATTERN((short)2, "pattern"); + + 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: // DB_NAME + return DB_NAME; + case 2: // PATTERN + return PATTERN; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); + } + + public get_tables_args() { + } + + public get_tables_args( + String db_name, + String pattern) + { + this(); + this.db_name = db_name; + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_args(get_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + public get_tables_args deepCopy() { + return new get_tables_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.pattern = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getPattern() { + return this.pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public void unsetPattern() { + this.pattern = null; + } + + /** Returns true if field pattern is set (has been asigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; + } + + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case PATTERN: + return getPattern(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case PATTERN: + return isSetPattern(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_args) + return this.equals((get_tables_args)that); + return false; + } + + public boolean equals(get_tables_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_tables_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_args typedOther = (get_tables_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // PATTERN + if (field.type == TType.STRING) { + this.pattern = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(this.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_tables_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private List success; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); + } + + public get_tables_result() { + } + + public get_tables_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_result(get_tables_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_tables_result deepCopy() { + return new get_tables_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(String 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 asigned 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 asigned 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 asigned 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 get_tables_result) + return this.equals((get_tables_result)that); + return false; + } + + public boolean equals(get_tables_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() { + return 0; + } + + public int compareTo(get_tables_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_result typedOther = (get_tables_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list128 = iprot.readListBegin(); + this.success = new ArrayList(_list128.size); + for (int _i129 = 0; _i129 < _list128.size; ++_i129) + { + String _elem130; + _elem130 = iprot.readString(); + this.success.add(_elem130); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter131 : this.success) + { + oprot.writeString(_iter131); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_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 TException { + // check for required fields + } + + } + + public static class get_all_tables_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + + private String db_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"); + + 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: // DB_NAME + return DB_NAME; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); + } + + public get_all_tables_args() { + } + + public get_all_tables_args( + String db_name) + { + this(); + this.db_name = db_name; + } + + /** + * Performs a deep copy on other. + */ + public get_all_tables_args(get_all_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + } + + public get_all_tables_args deepCopy() { + return new get_all_tables_args(this); + } + + @Override + public void clear() { + this.db_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_tables_args) + return this.equals((get_all_tables_args)that); + return false; + } + + public boolean equals(get_all_tables_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_all_tables_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_tables_args typedOther = (get_all_tables_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_tables_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_all_tables_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private List success; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); + } + + public get_all_tables_result() { + } + + public get_all_tables_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_tables_result(get_all_tables_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public get_all_tables_result deepCopy() { + return new get_all_tables_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(String 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 asigned 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 asigned 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 asigned 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 get_all_tables_result) + return this.equals((get_all_tables_result)that); + return false; + } + + public boolean equals(get_all_tables_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() { + return 0; + } + + public int compareTo(get_all_tables_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_tables_result typedOther = (get_all_tables_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list132 = iprot.readListBegin(); + this.success = new ArrayList(_list132.size); + for (int _i133 = 0; _i133 < _list132.size; ++_i133) + { + String _elem134; + _elem134 = iprot.readString(); + this.success.add(_elem134); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter135 : this.success) + { + oprot.writeString(_iter135); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_tables_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 TException { + // check for required fields + } + + } + + public static class get_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_args"); + + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + + private String dbname; + private String tbl_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_name"); + + 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: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); + } + + public get_table_args() { + } + + public get_table_args( + String dbname, + String tbl_name) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + } + + /** + * Performs a deep copy on other. + */ + public get_table_args(get_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + } + + public get_table_args deepCopy() { + return new get_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_args) + return this.equals((get_table_args)that); + return false; + } + + public boolean equals(get_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_args typedOther = (get_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_table_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private Table success; + private MetaException o1; + private NoSuchObjectException o2; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + 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; + case 2: // O2 + return O2; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); + } + + public get_table_result() { + } + + public get_table_result( + Table success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_table_result(get_table_result other) { + if (other.isSetSuccess()) { + this.success = new Table(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_table_result deepCopy() { + return new get_table_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Table getSuccess() { + return this.success; + } + + public void setSuccess(Table success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned 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 asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Table)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_result) + return this.equals((get_table_result)that); + return false; + } + + public boolean equals(get_table_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_result typedOther = (get_table_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Table(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class alter_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_table_args"); + + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField NEW_TBL_FIELD_DESC = new TField("new_tbl", TType.STRUCT, (short)3); + + private String dbname; + private String tbl_name; + private Table new_tbl; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_name"), + NEW_TBL((short)3, "new_tbl"); + + 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: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_TBL + return NEW_TBL; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); + } + + public alter_table_args() { + } + + public alter_table_args( + String dbname, + String tbl_name, + Table new_tbl) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_args(alter_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_tbl()) { + this.new_tbl = new Table(other.new_tbl); + } + } + + public alter_table_args deepCopy() { + return new alter_table_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + this.new_tbl = null; + } + + public String getDbname() { + return this.dbname; + } + + public void setDbname(String dbname) { + this.dbname = dbname; + } + + public void unsetDbname() { + this.dbname = null; + } + + /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; + } + + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public Table getNew_tbl() { + return this.new_tbl; + } + + public void setNew_tbl(Table new_tbl) { + this.new_tbl = new_tbl; + } + + public void unsetNew_tbl() { + this.new_tbl = null; + } + + /** Returns true if field new_tbl is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_tbl() { + return this.new_tbl != null; + } + + public void setNew_tblIsSet(boolean value) { + if (!value) { + this.new_tbl = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_TBL: + if (value == null) { + unsetNew_tbl(); + } else { + setNew_tbl((Table)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_TBL: + return getNew_tbl(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_TBL: + return isSetNew_tbl(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_args) + return this.equals((alter_table_args)that); + return false; + } + + public boolean equals(alter_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_tbl = true && this.isSetNew_tbl(); + boolean that_present_new_tbl = true && that.isSetNew_tbl(); + if (this_present_new_tbl || that_present_new_tbl) { + if (!(this_present_new_tbl && that_present_new_tbl)) + return false; + if (!this.new_tbl.equals(that.new_tbl)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_table_args typedOther = (alter_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_tbl()) { + lastComparison = TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NEW_TBL + if (field.type == TType.STRUCT) { + this.new_tbl = new Table(); + this.new_tbl.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.new_tbl != null) { + oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); + this.new_tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_tbl:"); + if (this.new_tbl == null) { + sb.append("null"); + } else { + sb.append(this.new_tbl); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class alter_table_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_table_result"); + + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private InvalidOperationException o1; + private MetaException o2; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"); + + 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: // O1 + return O1; + case 2: // O2 + return O2; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); + } + + public alter_table_result() { + } + + public alter_table_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_result(alter_table_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public alter_table_result deepCopy() { + return new alter_table_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_result) + return this.equals((alter_table_result)that); + return false; + } + + public boolean equals(alter_table_result that) { + if (that == null) + 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_table_result typedOther = (alter_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class add_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_partition_args"); + + private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)1); + + private Partition new_part; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NEW_PART((short)1, "new_part"); + + 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: // NEW_PART + return NEW_PART; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); + } + + public add_partition_args() { + } + + public add_partition_args( + Partition new_part) + { + this(); + this.new_part = new_part; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_args(add_partition_args other) { + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + } + + public add_partition_args deepCopy() { + return new add_partition_args(this); + } + + @Override + public void clear() { + this.new_part = null; + } + + public Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + /** Returns true if field new_part is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; + } + + public void setNew_partIsSet(boolean value) { + if (!value) { + this.new_part = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NEW_PART: + return getNew_part(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_PART: + return isSetNew_part(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_args) + return this.equals((add_partition_args)that); + return false; + } + + public boolean equals(add_partition_args that) { + if (that == null) + return false; + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(add_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_partition_args typedOther = (add_partition_args)other; + + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NEW_PART + if (field.type == TType.STRUCT) { + this.new_part = new Partition(); + this.new_part.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_partition_args("); + boolean first = true; + + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class add_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_partition_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private Partition success; + private InvalidObjectException o1; + private AlreadyExistsException o2; + private MetaException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); + } + + public add_partition_result() { + } + + public add_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_result(add_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public add_partition_result deepCopy() { + return new add_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_result) + return this.equals((add_partition_result)that); + return false; + } + + public boolean equals(add_partition_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(add_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_partition_result typedOther = (add_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_partition_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class append_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + + private String db_name; + private String tbl_name; + private List part_vals; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"); + + 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: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); + } + + public append_partition_args() { + } + + public append_partition_args( + String db_name, + String tbl_name, + List part_vals) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_args(append_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + } + + public append_partition_args deepCopy() { + return new append_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_args) + return this.equals((append_partition_args)that); + return false; + } + + public boolean equals(append_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(append_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_args typedOther = (append_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list136 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list136.size); + for (int _i137 = 0; _i137 < _list136.size; ++_i137) + { + String _elem138; + _elem138 = iprot.readString(); + this.part_vals.add(_elem138); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter139 : this.part_vals) + { + oprot.writeString(_iter139); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class append_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private Partition success; + private InvalidObjectException o1; + private AlreadyExistsException o2; + private MetaException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); + } + + public append_partition_result() { + } + + public append_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_result(append_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public append_partition_result deepCopy() { + return new append_partition_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_result) + return this.equals((append_partition_result)that); + return false; + } + + public boolean equals(append_partition_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(append_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_result typedOther = (append_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class append_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + + private String db_name; + private String tbl_name; + private String part_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"); + + 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: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); + } + + public append_partition_by_name_args() { + } + + public append_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_args(append_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + public append_partition_by_name_args deepCopy() { + return new append_partition_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_args) + return this.equals((append_partition_by_name_args)that); + return false; + } + + public boolean equals(append_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(append_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_by_name_args typedOther = (append_partition_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class append_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private Partition success; + private InvalidObjectException o1; + private AlreadyExistsException o2; + private MetaException o3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); + } + + public append_partition_by_name_result() { + } + + public append_partition_by_name_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_result(append_partition_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + public append_partition_by_name_result deepCopy() { + return new append_partition_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public InvalidObjectException getO1() { + return this.o1; + } + + public void setO1(InvalidObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_result) + return this.equals((append_partition_by_name_result)that); + return false; + } + + public boolean equals(append_partition_by_name_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(append_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_by_name_result typedOther = (append_partition_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_by_name_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_partition_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); + + private String db_name; + private String tbl_name; + private List part_vals; + private boolean deleteData; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + DELETE_DATA((short)4, "deleteData"); + + 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: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // DELETE_DATA + return DELETE_DATA; + 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 __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); + } + + public drop_partition_args() { + } + + public drop_partition_args( + String db_name, + String tbl_name, + List part_vals, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_args(drop_partition_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + this.deleteData = other.deleteData; + } + + public drop_partition_args deepCopy() { + return new drop_partition_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); + } + + public List getPart_vals() { + return this.part_vals; + } + + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_args) + return this.equals((drop_partition_args)that); + return false; + } + + public boolean equals(drop_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_args typedOther = (drop_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list140 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list140.size); + for (int _i141 = 0; _i141 < _list140.size; ++_i141) + { + String _elem142; + _elem142 = iprot.readString(); + this.part_vals.add(_elem142); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter143 : this.part_vals) + { + oprot.writeString(_iter143); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_partition_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private boolean success; + private NoSuchObjectException o1; + private MetaException o2; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + 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; + case 2: // O2 + return O2; + 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 BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); + } + + public drop_partition_result() { + } + + public drop_partition_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_result(drop_partition_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_partition_result deepCopy() { + return new drop_partition_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_result) + return this.equals((drop_partition_result)that); + return false; + } + + public boolean equals(drop_partition_result that) { + if (that == null) + return false; + + 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 != 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_result typedOther = (drop_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_result("); + boolean first = true; + + sb.append("success:"); + 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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class drop_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_partition_by_name_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); + + private String db_name; + private String tbl_name; + private String part_name; + private boolean deleteData; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"), + DELETE_DATA((short)4, "deleteData"); + + 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: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // DELETE_DATA + return DELETE_DATA; + 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 __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); + } + + public drop_partition_by_name_args() { + } + + public drop_partition_by_name_args( + String db_name, + String tbl_name, + String part_name, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_by_name_args(drop_partition_by_name_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + this.deleteData = other.deleteData; + } + + public drop_partition_by_name_args deepCopy() { + return new drop_partition_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getPart_name() { + return this.part_name; + } + + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } - iprot.readMessageEnd(); - get_indexes_result result = new get_indexes_result(); - try { - result.success = iface_.get_indexes(args.db_name, args.tbl_name, args.max_indexes); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_indexes", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_indexes"); - oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_by_name_args) + return this.equals((drop_partition_by_name_args)that); + return false; + } + + public boolean equals(drop_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(drop_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_by_name_args typedOther = (drop_partition_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; } - oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); } + return 0; + } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } - private class get_index_names implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) { - get_index_names_args args = new get_index_names_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; } - iprot.readMessageEnd(); - get_index_names_result result = new get_index_names_result(); - try { - result.success = iface_.get_index_names(args.db_name, args.tbl_name, args.max_indexes); - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_index_names", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_names"); - oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + switch (field.id) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); } - oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + iprot.readFieldEnd(); } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); } + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + } - public static class create_database_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_database_args"); + public static class drop_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_partition_by_name_result"); - private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private Database database; + private boolean success; + private NoSuchObjectException o1; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DATABASE((short)1, "database"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -4919,8 +25183,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DATABASE - return DATABASE; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -4961,74 +25229,155 @@ } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.class))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); } - public create_database_args() { + public drop_partition_by_name_result() { } - public create_database_args( - Database database) + public drop_partition_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) { this(); - this.database = database; + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public create_database_args(create_database_args other) { - if (other.isSetDatabase()) { - this.database = new Database(other.database); + public drop_partition_by_name_result(drop_partition_by_name_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public create_database_args deepCopy() { - return new create_database_args(this); + public drop_partition_by_name_result deepCopy() { + return new drop_partition_by_name_result(this); } @Override public void clear() { - this.database = null; + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; } - public Database getDatabase() { - return this.database; + public boolean isSuccess() { + return this.success; } - public void setDatabase(Database database) { - this.database = database; + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); } - public void unsetDatabase() { - this.database = null; + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - /** Returns true if field database is set (has been asigned a value) and false otherwise */ - public boolean isSetDatabase() { - return this.database != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setDatabaseIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { if (!value) { - this.database = null; + this.o1 = null; } } + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case DATABASE: + case SUCCESS: if (value == null) { - unsetDatabase(); + unsetSuccess(); } else { - setDatabase((Database)value); + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -5037,8 +25386,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DATABASE: - return getDatabase(); + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -5051,8 +25406,12 @@ } switch (field) { - case DATABASE: - return isSetDatabase(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -5061,21 +25420,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_database_args) - return this.equals((create_database_args)that); + if (that instanceof drop_partition_by_name_result) + return this.equals((drop_partition_by_name_result)that); return false; } - public boolean equals(create_database_args that) { + public boolean equals(drop_partition_by_name_result that) { if (that == null) return false; - boolean this_present_database = true && this.isSetDatabase(); - boolean that_present_database = true && that.isSetDatabase(); - if (this_present_database || that_present_database) { - if (!(this_present_database && that_present_database)) + 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.database.equals(that.database)) + if (this.success != 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -5087,20 +25464,40 @@ return 0; } - public int compareTo(create_database_args other) { + public int compareTo(drop_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - create_database_args typedOther = (create_database_args)other; + drop_partition_by_name_result typedOther = (drop_partition_by_name_result)other; - lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(typedOther.isSetDatabase()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDatabase()) { - lastComparison = TBaseHelper.compareTo(this.database, typedOther.database); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -5122,10 +25519,26 @@ break; } switch (field.id) { - case 1: // DATABASE + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 if (field.type == TType.STRUCT) { - this.database = new Database(); - this.database.read(iprot); + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -5140,12 +25553,19 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.database != null) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - this.database.write(oprot); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5154,14 +25574,26 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_database_args("); + StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); boolean first = true; - sb.append("database:"); - if (this.database == null) { + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.database); + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -5174,22 +25606,22 @@ } - public static class create_database_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_database_result"); + public static class get_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_args"); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); - private AlreadyExistsException o1; - private InvalidObjectException o2; - private MetaException o3; + private String db_name; + private String tbl_name; + private List part_vals; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"); private static final Map byName = new HashMap(); @@ -5204,12 +25636,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; default: return null; } @@ -5254,148 +25686,168 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); } - public create_database_result() { + public get_partition_args() { } - public create_database_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) + public get_partition_args( + String db_name, + String tbl_name, + List part_vals) { this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; } /** * Performs a deep copy on other. */ - public create_database_result(create_database_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); + public get_partition_args(get_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; } } - public create_database_result deepCopy() { - return new create_database_result(this); + public get_partition_args deepCopy() { + return new get_partition_args(this); } @Override public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; } - public AlreadyExistsException getO1() { - return this.o1; + public String getDb_name() { + return this.db_name; } - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO1IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } - public InvalidObjectException getO2() { - return this.o2; + public String getTbl_name() { + return this.tbl_name; } - public void setO2(InvalidObjectException o2) { - this.o2 = o2; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO2() { - this.o2 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO2IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.tbl_name = null; } } - public MetaException getO3() { - return this.o3; + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); } - public void setO3(MetaException o3) { - this.o3 = o3; + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); } - public void unsetO3() { - this.o3 = null; + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + public List getPart_vals() { + return this.part_vals; } - public void setO3IsSet(boolean value) { + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { if (!value) { - this.o3 = null; + this.part_vals = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((AlreadyExistsException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((InvalidObjectException)value); + setTbl_name((String)value); } break; - case O3: + case PART_VALS: if (value == null) { - unsetO3(); + unsetPart_vals(); } else { - setO3((MetaException)value); + setPart_vals((List)value); } break; @@ -5404,14 +25856,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); - case O3: - return getO3(); + case PART_VALS: + return getPart_vals(); } throw new IllegalStateException(); @@ -5424,12 +25876,12 @@ } switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); } throw new IllegalStateException(); } @@ -5438,39 +25890,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_database_result) - return this.equals((create_database_result)that); + if (that instanceof get_partition_args) + return this.equals((get_partition_args)that); return false; } - public boolean equals(create_database_result that) { + public boolean equals(get_partition_args that) { if (that == null) 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) return false; - if (!this.o3.equals(that.o3)) + if (!this.part_vals.equals(that.part_vals)) return false; } @@ -5482,40 +25934,40 @@ return 0; } - public int compareTo(create_database_result other) { + public int compareTo(get_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - create_database_result typedOther = (create_database_result)other; + get_partition_args typedOther = (get_partition_args)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } @@ -5537,26 +25989,33 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list144 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list144.size); + for (int _i145 = 0; _i145 < _list144.size; ++_i145) + { + String _elem146; + _elem146 = iprot.readString(); + this.part_vals.add(_elem146); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -5571,19 +26030,29 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter147 : this.part_vals) + { + oprot.writeString(_iter147); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5592,30 +26061,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_database_result("); + StringBuilder sb = new StringBuilder("get_partition_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("part_vals:"); + if (this.part_vals == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.part_vals); } first = false; sb.append(")"); @@ -5628,16 +26097,22 @@ } - public static class get_database_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_database_args"); + public static class get_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_result"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String name; + private Partition success; + private MetaException o1; + private NoSuchObjectException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - NAME((short)1, "name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -5652,8 +26127,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -5698,70 +26177,148 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); } - public get_database_args() { + public get_partition_result() { } - public get_database_args( - String name) + public get_partition_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); - this.name = name; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_database_args(get_database_args other) { - if (other.isSetName()) { - this.name = other.name; + public get_partition_result(get_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); } } - public get_database_args deepCopy() { - return new get_database_args(this); + public get_partition_result deepCopy() { + return new get_partition_result(this); } @Override public void clear() { - this.name = null; + this.success = null; + this.o1 = null; + this.o2 = null; } - public String getName() { - return this.name; + public Partition getSuccess() { + return this.success; } - public void setName(String name) { - this.name = name; + public void setSuccess(Partition success) { + this.success = success; } - public void unsetName() { - this.name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setNameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.name = null; + this.success = null; } } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: + 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 asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: if (value == null) { - unsetName(); + unsetO1(); } else { - setName((String)value); + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); } break; @@ -5770,8 +26327,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -5784,8 +26347,12 @@ } switch (field) { - case NAME: - return isSetName(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -5794,21 +26361,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_database_args) - return this.equals((get_database_args)that); + if (that instanceof get_partition_result) + return this.equals((get_partition_result)that); return false; } - public boolean equals(get_database_args that) { + public boolean equals(get_partition_result that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + 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.name.equals(that.name)) + 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -5820,20 +26405,40 @@ return 0; } - public int compareTo(get_database_args other) { + public int compareTo(get_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_database_args typedOther = (get_database_args)other; + get_partition_result typedOther = (get_partition_result)other; - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -5855,9 +26460,26 @@ break; } switch (field.id) { - case 1: // NAME - if (field.type == TType.STRING) { - this.name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -5872,12 +26494,19 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5886,14 +26515,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_database_args("); + StringBuilder sb = new StringBuilder("get_partition_result("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.name); + 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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -5906,22 +26551,28 @@ } - public static class get_database_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_database_result"); + public static class get_partition_with_auth_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_with_auth_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)4); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)5); - private Database success; - private NoSuchObjectException o1; - private MetaException o2; + private String db_name; + private String tbl_name; + private List part_vals; + private String user_name; + private List group_names; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + USER_NAME((short)4, "user_name"), + GROUP_NAMES((short)5, "group_names"); private static final Map byName = new HashMap(); @@ -5936,12 +26587,16 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // USER_NAME + return USER_NAME; + case 5: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -5986,148 +26641,266 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_with_auth_args.class, metaDataMap); + } + + public get_partition_with_auth_args() { + } + + public get_partition_with_auth_args( + String db_name, + String tbl_name, + List part_vals, + String user_name, + List group_names) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_with_auth_args(get_partition_with_auth_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; + } + } + + public get_partition_with_auth_args deepCopy() { + return new get_partition_with_auth_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.user_name = null; + this.group_names = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public get_database_result() { + public void unsetTbl_name() { + this.tbl_name = null; } - public get_database_result( - Database success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - /** - * Performs a deep copy on other. - */ - public get_database_result(get_database_result other) { - if (other.isSetSuccess()) { - this.success = new Database(other.success); - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; } } - public get_database_result deepCopy() { - return new get_database_result(this); + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); } - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); } - public Database getSuccess() { - return this.success; + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); } - public void setSuccess(Database success) { - this.success = success; + public List getPart_vals() { + return this.part_vals; } - public void unsetSuccess() { - this.success = null; + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + public void unsetPart_vals() { + this.part_vals = null; } - public void setSuccessIsSet(boolean value) { + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { if (!value) { - this.success = null; + this.part_vals = null; } } - public NoSuchObjectException getO1() { - return this.o1; + public String getUser_name() { + return this.user_name; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetO1() { - this.o1 = null; + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setO1IsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.user_name = null; } } - public MetaException getO2() { - return this.o2; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public void setO2(MetaException o2) { - this.o2 = o2; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void unsetO2() { - this.o2 = null; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + public List getGroup_names() { + return this.group_names; } - public void setO2IsSet(boolean value) { + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { if (!value) { - this.o2 = null; + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Database)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((NoSuchObjectException)value); + setTbl_name((String)value); } break; - case O2: + case PART_VALS: if (value == null) { - unsetO2(); + unsetPart_vals(); } else { - setO2((MetaException)value); + setPart_vals((List)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -6136,14 +26909,20 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); - case O2: - return getO2(); + case PART_VALS: + return getPart_vals(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -6156,12 +26935,16 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -6170,39 +26953,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_database_result) - return this.equals((get_database_result)that); + if (that instanceof get_partition_with_auth_args) + return this.equals((get_partition_with_auth_args)that); return false; } - public boolean equals(get_database_result that) { + public boolean equals(get_partition_with_auth_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) return false; - if (!this.o2.equals(that.o2)) + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) return false; } @@ -6214,40 +27015,60 @@ return 0; } - public int compareTo(get_database_result other) { + public int compareTo(get_partition_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_database_result typedOther = (get_database_result)other; + get_partition_with_auth_args typedOther = (get_partition_with_auth_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -6269,26 +27090,57 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Database(); - this.success.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list148 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list148.size); + for (int _i149 = 0; _i149 < _list148.size; ++_i149) + { + String _elem150; + _elem150 = iprot.readString(); + this.part_vals.add(_elem150); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case 4: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 5: // GROUP_NAMES + if (field.type == TType.LIST) { + { + TList _list151 = iprot.readListBegin(); + this.group_names = new ArrayList(_list151.size); + for (int _i152 = 0; _i152 < _list151.size; ++_i152) + { + String _elem153; + _elem153 = iprot.readString(); + this.group_names.add(_elem153); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -6303,19 +27155,46 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter154 : this.part_vals) + { + oprot.writeString(_iter154); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter155 : this.group_names) + { + oprot.writeString(_iter155); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -6324,30 +27203,46 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_database_result("); + StringBuilder sb = new StringBuilder("get_partition_with_auth_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("part_vals:"); + if (this.part_vals == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); } first = false; sb.append(")"); @@ -6360,19 +27255,22 @@ } - public static class drop_database_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_database_args"); + public static class get_partition_with_auth_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_with_auth_result"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); - private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)2); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String name; - private boolean deleteData; + private Partition success; + private MetaException o1; + private NoSuchObjectException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - NAME((short)1, "name"), - DELETE_DATA((short)2, "deleteData"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -6387,10 +27285,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // DELETE_DATA - return DELETE_DATA; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -6431,116 +27331,152 @@ } // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_with_auth_result.class, metaDataMap); } - public drop_database_args() { + public get_partition_with_auth_result() { } - public drop_database_args( - String name, - boolean deleteData) + public get_partition_with_auth_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); - this.name = name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public drop_database_args(drop_database_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetName()) { - this.name = other.name; + public get_partition_with_auth_result(get_partition_with_auth_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); } - this.deleteData = other.deleteData; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } } - public drop_database_args deepCopy() { - return new drop_database_args(this); + public get_partition_with_auth_result deepCopy() { + return new get_partition_with_auth_result(this); } @Override public void clear() { - this.name = null; - setDeleteDataIsSet(false); - this.deleteData = false; + this.success = null; + this.o1 = null; + this.o2 = null; } - public String getName() { - return this.name; + public Partition getSuccess() { + return this.success; } - public void setName(String name) { - this.name = name; + public void setSuccess(Partition success) { + this.success = success; } - public void unsetName() { - this.name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setNameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.name = null; + this.success = null; } } - public boolean isDeleteData() { - return this.deleteData; + public MetaException getO1() { + return this.o1; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + public void unsetO1() { + this.o1 = null; } - /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ - public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: + case SUCCESS: if (value == null) { - unsetName(); + unsetSuccess(); } else { - setName((String)value); + setSuccess((Partition)value); } break; - case DELETE_DATA: + case O1: if (value == null) { - unsetDeleteData(); + unsetO1(); } else { - setDeleteData((Boolean)value); + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); } break; @@ -6549,11 +27485,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case SUCCESS: + return getSuccess(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -6566,10 +27505,12 @@ } switch (field) { - case NAME: - return isSetName(); - case DELETE_DATA: - return isSetDeleteData(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -6578,30 +27519,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_database_args) - return this.equals((drop_database_args)that); + if (that instanceof get_partition_with_auth_result) + return this.equals((get_partition_with_auth_result)that); return false; } - public boolean equals(drop_database_args that) { + public boolean equals(get_partition_with_auth_result that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + 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.name.equals(that.name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + 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.deleteData != that.deleteData) + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -6613,30 +27563,40 @@ return 0; } - public int compareTo(drop_database_args other) { + public int compareTo(get_partition_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_database_args typedOther = (drop_database_args)other; + get_partition_with_auth_result typedOther = (get_partition_with_auth_result)other; - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -6658,17 +27618,26 @@ break; } switch (field.id) { - case 1: // NAME - if (field.type == TType.STRING) { - this.name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // DELETE_DATA - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -6683,36 +27652,52 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_database_args("); + StringBuilder sb = new StringBuilder("get_partition_with_auth_result("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } first = false; sb.append(")"); return sb.toString(); @@ -6724,22 +27709,22 @@ } - public static class drop_database_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_database_result"); + public static class get_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_args"); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); - private NoSuchObjectException o1; - private InvalidOperationException o2; - private MetaException o3; + private String db_name; + private String tbl_name; + private String part_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_name"); private static final Map byName = new HashMap(); @@ -6754,12 +27739,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; default: return null; } @@ -6804,148 +27789,148 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); } - public drop_database_result() { + public get_partition_by_name_args() { } - public drop_database_result( - NoSuchObjectException o1, - InvalidOperationException o2, - MetaException o3) + public get_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) { this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public drop_database_result(drop_database_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + public get_partition_by_name_args(get_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new InvalidOperationException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } - public drop_database_result deepCopy() { - return new drop_database_result(this); + public get_partition_by_name_args deepCopy() { + return new get_partition_by_name_args(this); } @Override public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; + this.db_name = null; + this.tbl_name = null; + this.part_name = null; } - public NoSuchObjectException getO1() { - return this.o1; + public String getDb_name() { + return this.db_name; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO1IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } - public InvalidOperationException getO2() { - return this.o2; + public String getTbl_name() { + return this.tbl_name; } - public void setO2(InvalidOperationException o2) { - this.o2 = o2; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO2() { - this.o2 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO2IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.tbl_name = null; } } - public MetaException getO3() { - return this.o3; + public String getPart_name() { + return this.part_name; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetO3() { - this.o3 = null; + public void unsetPart_name() { + this.part_name = null; } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setO3IsSet(boolean value) { + public void setPart_nameIsSet(boolean value) { if (!value) { - this.o3 = null; + this.part_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((NoSuchObjectException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((InvalidOperationException)value); + setTbl_name((String)value); } break; - case O3: + case PART_NAME: if (value == null) { - unsetO3(); + unsetPart_name(); } else { - setO3((MetaException)value); + setPart_name((String)value); } break; @@ -6954,14 +27939,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); - case O3: - return getO3(); + case PART_NAME: + return getPart_name(); } throw new IllegalStateException(); @@ -6972,14 +27957,14 @@ if (field == null) { throw new IllegalArgumentException(); } - - switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); } throw new IllegalStateException(); } @@ -6988,39 +27973,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_database_result) - return this.equals((drop_database_result)that); + if (that instanceof get_partition_by_name_args) + return this.equals((get_partition_by_name_args)that); return false; } - public boolean equals(drop_database_result that) { + public boolean equals(get_partition_by_name_args that) { if (that == null) 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) return false; - if (!this.o3.equals(that.o3)) + if (!this.part_name.equals(that.part_name)) return false; } @@ -7032,40 +28017,40 @@ return 0; } - public int compareTo(drop_database_result other) { + public int compareTo(get_partition_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_database_result typedOther = (drop_database_result)other; + get_partition_by_name_args typedOther = (get_partition_by_name_args)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } @@ -7087,26 +28072,23 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -7121,19 +28103,22 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -7142,30 +28127,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_database_result("); + StringBuilder sb = new StringBuilder("get_partition_by_name_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -7178,16 +28163,22 @@ } - public static class get_databases_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_databases_args"); + public static class get_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_result"); - private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String pattern; + private Partition success; + private MetaException o1; + private NoSuchObjectException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - PATTERN((short)1, "pattern"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -7202,8 +28193,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PATTERN - return PATTERN; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -7248,70 +28243,148 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); } - public get_databases_args() { + public get_partition_by_name_result() { } - public get_databases_args( - String pattern) + public get_partition_by_name_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); - this.pattern = pattern; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_databases_args(get_databases_args other) { - if (other.isSetPattern()) { - this.pattern = other.pattern; + public get_partition_by_name_result(get_partition_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); } } - public get_databases_args deepCopy() { - return new get_databases_args(this); + public get_partition_by_name_result deepCopy() { + return new get_partition_by_name_result(this); } @Override public void clear() { - this.pattern = null; + this.success = null; + this.o1 = null; + this.o2 = null; } - public String getPattern() { - return this.pattern; + public Partition getSuccess() { + return this.success; } - public void setPattern(String pattern) { - this.pattern = pattern; + public void setSuccess(Partition success) { + this.success = success; } - public void unsetPattern() { - this.pattern = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field pattern is set (has been asigned a value) and false otherwise */ - public boolean isSetPattern() { - return this.pattern != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setPatternIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.pattern = null; + 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 asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PATTERN: + case SUCCESS: if (value == null) { - unsetPattern(); + unsetSuccess(); } else { - setPattern((String)value); + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); } break; @@ -7320,8 +28393,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case PATTERN: - return getPattern(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -7334,8 +28413,12 @@ } switch (field) { - case PATTERN: - return isSetPattern(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -7344,21 +28427,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_databases_args) - return this.equals((get_databases_args)that); + if (that instanceof get_partition_by_name_result) + return this.equals((get_partition_by_name_result)that); return false; } - public boolean equals(get_databases_args that) { - if (that == null) - return false; + public boolean equals(get_partition_by_name_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; + } - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) return false; - if (!this.pattern.equals(that.pattern)) + if (!this.o2.equals(that.o2)) return false; } @@ -7370,20 +28471,40 @@ return 0; } - public int compareTo(get_databases_args other) { + public int compareTo(get_partition_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_databases_args typedOther = (get_databases_args)other; + get_partition_by_name_result typedOther = (get_partition_by_name_result)other; - lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetPattern()) { - lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -7405,9 +28526,26 @@ break; } switch (field.id) { - case 1: // PATTERN - if (field.type == TType.STRING) { - this.pattern = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -7422,12 +28560,19 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -7436,14 +28581,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_databases_args("); + StringBuilder sb = new StringBuilder("get_partition_by_name_result("); boolean first = true; - sb.append("pattern:"); - if (this.pattern == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.pattern); + 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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -7456,19 +28617,22 @@ } - public static class get_databases_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_databases_result"); + public static class get_partitions_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); - private List success; - private MetaException o1; + private String db_name; + private String tbl_name; + private short max_parts; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); private static final Map byName = new HashMap(); @@ -7483,10 +28647,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -7527,133 +28693,157 @@ } // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); } - public get_databases_result() { + public get_partitions_args() { + this.max_parts = (short)-1; + } - public get_databases_result( - List success, - MetaException o1) + public get_partitions_args( + String db_name, + String tbl_name, + short max_parts) { this(); - this.success = success; - this.o1 = o1; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ - public get_databases_result(get_databases_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; + public get_partitions_args(get_partitions_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } + this.max_parts = other.max_parts; } - public get_databases_result deepCopy() { - return new get_databases_result(this); + public get_partitions_args deepCopy() { + return new get_partitions_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public String getDb_name() { + return this.db_name; } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; } - this.success.add(elem); } - public List getSuccess() { - return this.success; + public String getTbl_name() { + return this.tbl_name; } - public void setSuccess(List success) { - this.success = success; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetSuccess() { - this.success = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setSuccessIsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.tbl_name = null; } } - public MetaException getO1() { - return this.o1; + public short getMax_parts() { + return this.max_parts; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); } - public void unsetO1() { - this.o1 = null; + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((List)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((MetaException)value); + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -7662,11 +28852,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return new Short(getMax_parts()); } throw new IllegalStateException(); @@ -7679,10 +28872,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -7691,30 +28886,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_databases_result) - return this.equals((get_databases_result)that); + if (that instanceof get_partitions_args) + return this.equals((get_partitions_args)that); return false; } - public boolean equals(get_databases_result that) { + public boolean equals(get_partitions_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) return false; } @@ -7726,30 +28930,40 @@ return 0; } - public int compareTo(get_databases_result other) { + public int compareTo(get_partitions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_databases_result typedOther = (get_databases_result)other; + get_partitions_args typedOther = (get_partitions_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } @@ -7771,27 +28985,24 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list63 = iprot.readListBegin(); - this.success = new ArrayList(_list63.size); - for (int _i64 = 0; _i64 < _list63.size; ++_i64) - { - String _elem65; - _elem65 = iprot.readString(); - this.success.add(_elem65); - } - iprot.readListEnd(); - } + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -7806,48 +29017,50 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter66 : this.success) - { - oprot.writeString(_iter66); - } - oprot.writeListEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_databases_result("); + StringBuilder sb = new StringBuilder("get_partitions_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.tbl_name); } first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -7858,14 +29071,22 @@ } - public static class get_all_databases_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_args"); + public static class get_partitions_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private List success; + private NoSuchObjectException o1; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { -; + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -7880,6 +29101,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -7918,37 +29145,191 @@ return _fieldName; } } + + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_all_databases_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); } - public get_all_databases_args() { + public get_partitions_result() { + } + + public get_partitions_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_all_databases_args(get_all_databases_args other) { + public get_partitions_result(get_partitions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } } - public get_all_databases_args deepCopy() { - return new get_all_databases_args(this); + public get_partitions_result deepCopy() { + return new get_partitions_result(this); } @Override public void clear() { + this.success = null; + this.o1 = null; + this.o2 = 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(Partition 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 asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; } - public void setFieldValue(_Fields field, Object value) { - switch (field) { + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = 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((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + } throw new IllegalStateException(); } @@ -7960,6 +29341,12 @@ } switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -7968,15 +29355,42 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_all_databases_args) - return this.equals((get_all_databases_args)that); + if (that instanceof get_partitions_result) + return this.equals((get_partitions_result)that); return false; } - public boolean equals(get_all_databases_args that) { + public boolean equals(get_partitions_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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + return true; } @@ -7985,14 +29399,44 @@ return 0; } - public int compareTo(get_all_databases_args other) { + public int compareTo(get_partitions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_all_databases_args typedOther = (get_all_databases_args)other; + get_partitions_result typedOther = (get_partitions_result)other; + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -8010,6 +29454,40 @@ break; } switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list156 = iprot.readListBegin(); + this.success = new ArrayList(_list156.size); + for (int _i157 = 0; _i157 < _list156.size; ++_i157) + { + Partition _elem158; + _elem158 = new Partition(); + _elem158.read(iprot); + this.success.add(_elem158); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; default: TProtocolUtil.skip(iprot, field.type); } @@ -8020,18 +29498,60 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter159 : this.success) + { + _iter159.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_databases_args("); + StringBuilder sb = new StringBuilder("get_partitions_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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; sb.append(")"); return sb.toString(); } @@ -8042,19 +29562,28 @@ } - public static class get_all_databases_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_result"); + public static class get_partitions_with_auth_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_with_auth_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)4); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)5); - private List success; - private MetaException o1; + private String db_name; + private String tbl_name; + private short max_parts; + private String user_name; + private List group_names; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"), + USER_NAME((short)4, "user_name"), + GROUP_NAMES((short)5, "group_names"); private static final Map byName = new HashMap(); @@ -8069,10 +29598,16 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; + case 4: // USER_NAME + return USER_NAME; + case 5: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -8113,133 +29648,255 @@ } // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_args.class, metaDataMap); } - public get_all_databases_result() { + public get_partitions_with_auth_args() { + this.max_parts = (short)-1; + } - public get_all_databases_result( - List success, - MetaException o1) + public get_partitions_with_auth_args( + String db_name, + String tbl_name, + short max_parts, + String user_name, + List group_names) { this(); - this.success = success; - this.o1 = o1; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + setMax_partsIsSet(true); + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public get_all_databases_result(get_all_databases_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); + public get_partitions_with_auth_args(get_partitions_with_auth_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_parts = other.max_parts; + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); } - this.success = __this__success; + this.group_names = __this__group_names; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + } + + public get_partitions_with_auth_args deepCopy() { + return new get_partitions_with_auth_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + + this.user_name = null; + this.group_names = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; } } - public get_all_databases_result deepCopy() { - return new get_all_databases_result(this); + public short getMax_parts() { + return this.max_parts; } - @Override - public void clear() { - this.success = null; - this.o1 = null; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } - public List getSuccess() { - return this.success; + public String getUser_name() { + return this.user_name; } - public void setSuccess(List success) { - this.success = success; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetSuccess() { - this.success = null; + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setSuccessIsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.user_name = null; } } - public MetaException getO1() { - return this.o1; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public void setO1(MetaException o1) { - this.o1 = o1; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void unsetO1() { - this.o1 = null; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + public List getGroup_names() { + return this.group_names; } - public void setO1IsSet(boolean value) { + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { if (!value) { - this.o1 = null; + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((List)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((MetaException)value); + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -8248,11 +29905,20 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return new Short(getMax_parts()); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -8265,10 +29931,16 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -8277,30 +29949,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_all_databases_result) - return this.equals((get_all_databases_result)that); + if (that instanceof get_partitions_with_auth_args) + return this.equals((get_partitions_with_auth_args)that); return false; } - public boolean equals(get_all_databases_result that) { + public boolean equals(get_partitions_with_auth_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) return false; } @@ -8312,30 +30011,60 @@ return 0; } - public int compareTo(get_all_databases_result other) { + public int compareTo(get_partitions_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_all_databases_result typedOther = (get_all_databases_result)other; + get_partitions_with_auth_args typedOther = (get_partitions_with_auth_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -8357,27 +30086,48 @@ break; } switch (field.id) { - case 0: // SUCCESS + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // GROUP_NAMES if (field.type == TType.LIST) { { - TList _list67 = iprot.readListBegin(); - this.success = new ArrayList(_list67.size); - for (int _i68 = 0; _i68 < _list67.size; ++_i68) + TList _list160 = iprot.readListBegin(); + this.group_names = new ArrayList(_list160.size); + for (int _i161 = 0; _i161 < _list160.size; ++_i161) { - String _elem69; - _elem69 = iprot.readString(); - this.success.add(_elem69); + String _elem162; + _elem162 = iprot.readString(); + this.group_names.add(_elem162); } iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -8392,23 +30142,38 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter70 : this.success) + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter163 : this.group_names) { - oprot.writeString(_iter70); + oprot.writeString(_iter163); } oprot.writeListEnd(); } oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -8416,22 +30181,42 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_databases_result("); + StringBuilder sb = new StringBuilder("get_partitions_with_auth_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); } first = false; sb.append(")"); @@ -8444,16 +30229,22 @@ } - public static class get_type_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_type_args"); + public static class get_partitions_with_auth_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_with_auth_result"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String name; + private List success; + private NoSuchObjectException o1; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - NAME((short)1, "name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -8468,8 +30259,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -8514,70 +30309,168 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_result.class, metaDataMap); } - public get_type_args() { + public get_partitions_with_auth_result() { } - public get_type_args( - String name) + public get_partitions_with_auth_result( + List success, + NoSuchObjectException o1, + MetaException o2) { this(); - this.name = name; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_type_args(get_type_args other) { - if (other.isSetName()) { - this.name = other.name; + public get_partitions_with_auth_result(get_partitions_with_auth_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public get_type_args deepCopy() { - return new get_type_args(this); + public get_partitions_with_auth_result deepCopy() { + return new get_partitions_with_auth_result(this); } @Override public void clear() { - this.name = null; + this.success = null; + this.o1 = null; + this.o2 = null; } - public String getName() { - return this.name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setName(String name) { - this.name = name; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetName() { - this.name = null; + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; + public List getSuccess() { + return this.success; } - public void setNameIsSet(boolean value) { + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { if (!value) { - this.name = null; + this.success = null; } } + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: + case SUCCESS: if (value == null) { - unsetName(); + unsetSuccess(); } else { - setName((String)value); + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -8586,8 +30479,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -8600,8 +30499,12 @@ } switch (field) { - case NAME: - return isSetName(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -8610,21 +30513,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_type_args) - return this.equals((get_type_args)that); + if (that instanceof get_partitions_with_auth_result) + return this.equals((get_partitions_with_auth_result)that); return false; } - public boolean equals(get_type_args that) { + public boolean equals(get_partitions_with_auth_result that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + 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.name.equals(that.name)) + 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -8636,20 +30557,40 @@ return 0; } - public int compareTo(get_type_args other) { + public int compareTo(get_partitions_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } - - int lastComparison = 0; - get_type_args typedOther = (get_type_args)other; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + + int lastComparison = 0; + get_partitions_with_auth_result typedOther = (get_partitions_with_auth_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -8671,9 +30612,36 @@ break; } switch (field.id) { - case 1: // NAME - if (field.type == TType.STRING) { - this.name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list164 = iprot.readListBegin(); + this.success = new ArrayList(_list164.size); + for (int _i165 = 0; _i165 < _list164.size; ++_i165) + { + Partition _elem166; + _elem166 = new Partition(); + _elem166.read(iprot); + this.success.add(_elem166); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -8688,12 +30656,26 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter167 : this.success) + { + _iter167.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -8702,14 +30684,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_args("); + StringBuilder sb = new StringBuilder("get_partitions_with_auth_result("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.name); + 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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -8722,22 +30720,22 @@ } - public static class get_type_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_type_result"); + public static class get_partition_names_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); - private Type success; - private MetaException o1; - private NoSuchObjectException o2; + private String db_name; + private String tbl_name; + private short max_parts; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); private static final Map byName = new HashMap(); @@ -8752,12 +30750,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -8798,152 +30796,157 @@ } // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); } - public get_type_result() { + public get_partition_names_args() { + this.max_parts = (short)-1; + } - public get_type_result( - Type success, - MetaException o1, - NoSuchObjectException o2) + public get_partition_names_args( + String db_name, + String tbl_name, + short max_parts) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ - public get_type_result(get_type_result other) { - if (other.isSetSuccess()) { - this.success = new Type(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + public get_partition_names_args(get_partition_names_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } + this.max_parts = other.max_parts; } - public get_type_result deepCopy() { - return new get_type_result(this); + public get_partition_names_args deepCopy() { + return new get_partition_names_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + } - public Type getSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(Type success) { - this.success = success; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - this.success = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setSuccessIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.db_name = null; } } - public MetaException getO1() { - return this.o1; + public String getTbl_name() { + return this.tbl_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO1() { - this.o1 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO1IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.tbl_name = null; } } - public NoSuchObjectException getO2() { - return this.o2; + public short getMax_parts() { + return this.max_parts; } - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); } - public void unsetO2() { - this.o2 = null; + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Type)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((MetaException)value); + setTbl_name((String)value); } break; - case O2: + case MAX_PARTS: if (value == null) { - unsetO2(); + unsetMax_parts(); } else { - setO2((NoSuchObjectException)value); + setMax_parts((Short)value); } break; @@ -8952,14 +30955,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); - case O2: - return getO2(); + case MAX_PARTS: + return new Short(getMax_parts()); } throw new IllegalStateException(); @@ -8972,12 +30975,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -8986,39 +30989,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_type_result) - return this.equals((get_type_result)that); + if (that instanceof get_partition_names_args) + return this.equals((get_partition_names_args)that); return false; } - public boolean equals(get_type_result that) { + public boolean equals(get_partition_names_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) return false; - if (!this.o2.equals(that.o2)) + if (this.max_parts != that.max_parts) return false; } @@ -9030,40 +31033,40 @@ return 0; } - public int compareTo(get_type_result other) { + public int compareTo(get_partition_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_type_result typedOther = (get_type_result)other; + get_partition_names_args typedOther = (get_partition_names_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } @@ -9085,26 +31088,24 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Type(); - this.success.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); + case 3: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9119,52 +31120,49 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_result("); + StringBuilder sb = new StringBuilder("get_partition_names_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } + sb.append("max_parts:"); + sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); @@ -9176,16 +31174,19 @@ } - public static class create_type_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_type_args"); + public static class get_partition_names_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_result"); - private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRUCT, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); - private Type type; + private List success; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - TYPE((short)1, "type"); + SUCCESS((short)0, "success"), + O2((short)1, "o2"); private static final Map byName = new HashMap(); @@ -9200,8 +31201,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TYPE - return TYPE; + case 0: // SUCCESS + return SUCCESS; + case 1: // O2 + return O2; default: return null; } @@ -9246,70 +31249,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.class))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); } - public create_type_args() { + public get_partition_names_result() { } - public create_type_args( - Type type) + public get_partition_names_result( + List success, + MetaException o2) { this(); - this.type = type; + this.success = success; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public create_type_args(create_type_args other) { - if (other.isSetType()) { - this.type = new Type(other.type); + public get_partition_names_result(get_partition_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public create_type_args deepCopy() { - return new create_type_args(this); + public get_partition_names_result deepCopy() { + return new get_partition_names_result(this); } @Override public void clear() { - this.type = null; + this.success = null; + this.o2 = null; } - public Type getType() { - return this.type; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setType(Type type) { - this.type = type; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetType() { - this.type = null; + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - /** Returns true if field type is set (has been asigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; + public List getSuccess() { + return this.success; } - public void setTypeIsSet(boolean value) { + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { if (!value) { - this.type = null; + this.success = null; } } + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case TYPE: + case SUCCESS: if (value == null) { - unsetType(); + unsetSuccess(); } else { - setType((Type)value); + setSuccess((List)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -9318,8 +31380,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case TYPE: - return getType(); + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -9332,8 +31397,10 @@ } switch (field) { - case TYPE: - return isSetType(); + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -9342,21 +31409,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_type_args) - return this.equals((create_type_args)that); + if (that instanceof get_partition_names_result) + return this.equals((get_partition_names_result)that); return false; } - public boolean equals(create_type_args that) { + public boolean equals(get_partition_names_result that) { if (that == null) return false; - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) + 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.type.equals(that.type)) + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -9368,20 +31444,30 @@ return 0; } - public int compareTo(create_type_args other) { + public int compareTo(get_partition_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - create_type_args typedOther = (create_type_args)other; + get_partition_names_result typedOther = (get_partition_names_result)other; - lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetType()) { - lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -9403,10 +31489,27 @@ break; } switch (field.id) { - case 1: // TYPE + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list168 = iprot.readListBegin(); + this.success = new ArrayList(_list168.size); + for (int _i169 = 0; _i169 < _list168.size; ++_i169) + { + String _elem170; + _elem170 = iprot.readString(); + this.success.add(_elem170); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O2 if (field.type == TType.STRUCT) { - this.type = new Type(); - this.type.read(iprot); + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9421,12 +31524,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - this.type.write(oprot); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter171 : this.success) + { + oprot.writeString(_iter171); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -9435,14 +31548,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_type_args("); + StringBuilder sb = new StringBuilder("get_partition_names_result("); boolean first = true; - sb.append("type:"); - if (this.type == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.type); + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -9455,25 +31576,25 @@ } - public static class create_type_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_type_result"); + public static class get_partitions_ps_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); - private boolean success; - private AlreadyExistsException o1; - private InvalidObjectException o2; - private MetaException o3; + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); @@ -9488,14 +31609,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -9536,194 +31657,216 @@ } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; + private static final int __MAX_PARTS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); } - public create_type_result() { + public get_partitions_ps_args() { + this.max_parts = (short)-1; + } - public create_type_result( - boolean success, - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) + public get_partitions_ps_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts) { this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ - public create_type_result(create_type_result other) { + public get_partitions_ps_args(get_partitions_ps_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; } + this.max_parts = other.max_parts; } - public create_type_result deepCopy() { - return new create_type_result(this); + public get_partitions_ps_args deepCopy() { + return new get_partitions_ps_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - this.o3 = null; + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + } - public boolean isSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } } - public AlreadyExistsException getO1() { - return this.o1; + public String getTbl_name() { + return this.tbl_name; } - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO1() { - this.o1 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO1IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.tbl_name = null; } } - public InvalidObjectException getO2() { - return this.o2; + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); } - public void setO2(InvalidObjectException o2) { - this.o2 = o2; + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); } - public void unsetO2() { - this.o2 = null; + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + public List getPart_vals() { + return this.part_vals; } - public void setO2IsSet(boolean value) { + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { if (!value) { - this.o2 = null; + this.part_vals = null; } } - public MetaException getO3() { - return this.o3; + public short getMax_parts() { + return this.max_parts; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); } - public void unsetO3() { - this.o3 = null; + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Boolean)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((AlreadyExistsException)value); + setTbl_name((String)value); } break; - case O2: + case PART_VALS: if (value == null) { - unsetO2(); + unsetPart_vals(); } else { - setO2((InvalidObjectException)value); + setPart_vals((List)value); } break; - case O3: + case MAX_PARTS: if (value == null) { - unsetO3(); + unsetMax_parts(); } else { - setO3((MetaException)value); + setMax_parts((Short)value); } break; @@ -9732,17 +31875,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return new Boolean(isSuccess()); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); - case O2: - return getO2(); + case PART_VALS: + return getPart_vals(); - case O3: - return getO3(); + case MAX_PARTS: + return new Short(getMax_parts()); } throw new IllegalStateException(); @@ -9755,14 +31898,14 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -9771,48 +31914,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_type_result) - return this.equals((create_type_result)that); + if (that instanceof get_partitions_ps_args) + return this.equals((get_partitions_ps_args)that); return false; } - public boolean equals(create_type_result that) { + public boolean equals(get_partitions_ps_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (this.success != that.success) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) return false; - if (!this.o2.equals(that.o2)) + if (!this.part_vals.equals(that.part_vals)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) return false; - if (!this.o3.equals(that.o3)) + if (this.max_parts != that.max_parts) return false; } @@ -9824,50 +31967,50 @@ return 0; } - public int compareTo(create_type_result other) { + public int compareTo(get_partitions_ps_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - create_type_result typedOther = (create_type_result)other; + get_partitions_ps_args typedOther = (get_partitions_ps_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } @@ -9889,34 +32032,41 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list172 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list172.size); + for (int _i173 = 0; _i173 < _list172.size; ++_i173) + { + String _elem174; + _elem174 = iprot.readString(); + this.part_vals.add(_elem174); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case 4: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9931,61 +32081,70 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter175 : this.part_vals) + { + oprot.writeString(_iter175); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("create_type_result("); + StringBuilder sb = new StringBuilder("get_partitions_ps_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("part_vals:"); + if (this.part_vals == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.part_vals); } first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -9996,16 +32155,19 @@ } - public static class drop_type_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_type_args"); + public static class get_partitions_ps_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_result"); - private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRING, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String type; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - TYPE((short)1, "type"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -10020,8 +32182,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TYPE - return TYPE; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -10066,70 +32230,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); } - public drop_type_args() { + public get_partitions_ps_result() { } - public drop_type_args( - String type) + public get_partitions_ps_result( + List success, + MetaException o1) { this(); - this.type = type; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public drop_type_args(drop_type_args other) { - if (other.isSetType()) { - this.type = other.type; + public get_partitions_ps_result(get_partitions_ps_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public drop_type_args deepCopy() { - return new drop_type_args(this); + public get_partitions_ps_result deepCopy() { + return new get_partitions_ps_result(this); } @Override public void clear() { - this.type = null; + this.success = null; + this.o1 = null; } - public String getType() { - return this.type; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setType(String type) { - this.type = type; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetType() { - this.type = null; + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - /** Returns true if field type is set (has been asigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; + public List getSuccess() { + return this.success; } - public void setTypeIsSet(boolean value) { + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { if (!value) { - this.type = null; + 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 asigned 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 TYPE: + case SUCCESS: if (value == null) { - unsetType(); + unsetSuccess(); } else { - setType((String)value); + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); } break; @@ -10138,8 +32361,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case TYPE: - return getType(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); } throw new IllegalStateException(); @@ -10152,8 +32378,10 @@ } switch (field) { - case TYPE: - return isSetType(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -10162,21 +32390,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_type_args) - return this.equals((drop_type_args)that); + if (that instanceof get_partitions_ps_result) + return this.equals((get_partitions_ps_result)that); return false; } - public boolean equals(drop_type_args that) { + public boolean equals(get_partitions_ps_result that) { if (that == null) return false; - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) + 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.type.equals(that.type)) + 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; } @@ -10188,24 +32425,34 @@ return 0; } - public int compareTo(drop_type_args other) { + public int compareTo(get_partitions_ps_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_type_args typedOther = (drop_type_args)other; + get_partitions_ps_result typedOther = (get_partitions_ps_result)other; - lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetType()) { - lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -10223,9 +32470,28 @@ break; } switch (field.id) { - case 1: // TYPE - if (field.type == TType.STRING) { - this.type = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list176 = iprot.readListBegin(); + this.success = new ArrayList(_list176.size); + for (int _i177 = 0; _i177 < _list176.size; ++_i177) + { + Partition _elem178; + _elem178 = new Partition(); + _elem178.read(iprot); + this.success.add(_elem178); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -10240,12 +32506,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(this.type); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter179 : this.success) + { + _iter179.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -10254,14 +32530,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_type_args("); + StringBuilder sb = new StringBuilder("get_partitions_ps_result("); boolean first = true; - sb.append("type:"); - if (this.type == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.type); + 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(")"); @@ -10274,22 +32558,31 @@ } - public static class drop_type_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_type_result"); + public static class get_partitions_ps_with_auth_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_with_auth_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)5); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)6); - private boolean success; - private MetaException o1; - private NoSuchObjectException o2; + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + private String user_name; + private List group_names; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"), + USER_NAME((short)5, "user_name"), + GROUP_NAMES((short)6, "group_names"); private static final Map byName = new HashMap(); @@ -10304,12 +32597,18 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; + case 5: // USER_NAME + return USER_NAME; + case 6: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -10325,180 +32624,339 @@ 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); + /** + * 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 __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_args.class, metaDataMap); + } + + public get_partitions_ps_with_auth_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_ps_with_auth_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts, + String user_name, + List group_names) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + setMax_partsIsSet(true); + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_ps_with_auth_args(get_partitions_ps_with_auth_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + this.max_parts = other.max_parts; + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; + } + } + + public get_partitions_ps_with_auth_args deepCopy() { + return new get_partitions_ps_with_auth_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + + this.user_name = null; + this.group_names = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; } + } - private final short _thriftId; - private final String _fieldName; + public String getTbl_name() { + return this.tbl_name; + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } - public short getThriftFieldId() { - return _thriftId; + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; } + } - public String getFieldName() { - return _fieldName; + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } + + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } + + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); } + this.part_vals.add(elem); } - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); + public List getPart_vals() { + return this.part_vals; + } - public static final Map<_Fields, FieldMetaData> metaDataMap; - static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap); + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; } - public drop_type_result() { + public void unsetPart_vals() { + this.part_vals = null; } - public drop_type_result( - boolean success, - MetaException o1, - NoSuchObjectException o2) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; } - /** - * Performs a deep copy on other. - */ - public drop_type_result(drop_type_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; } } - public drop_type_result deepCopy() { - return new drop_type_result(this); + public short getMax_parts() { + return this.max_parts; } - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); } - public boolean isSuccess() { - return this.success; + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + public String getUser_name() { + return this.user_name; } - public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + public void setUser_name(String user_name) { + this.user_name = user_name; } - public MetaException getO1() { - return this.o1; + public void unsetUser_name() { + this.user_name = null; } - public void setO1(MetaException o1) { - this.o1 = o1; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void unsetO1() { - this.o1 = null; + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); + } + + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); } + this.group_names.add(elem); } - public NoSuchObjectException getO2() { - return this.o2; + public List getGroup_names() { + return this.group_names; } - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetO2() { - this.o2 = null; + public void unsetGroup_names() { + this.group_names = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; } - public void setO2IsSet(boolean value) { + public void setGroup_namesIsSet(boolean value) { if (!value) { - this.o2 = null; + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Boolean)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((MetaException)value); + setTbl_name((String)value); } break; - case O2: + case PART_VALS: if (value == null) { - unsetO2(); + unsetPart_vals(); } else { - setO2((NoSuchObjectException)value); + setPart_vals((List)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -10507,14 +32965,23 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return new Boolean(isSuccess()); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); - case O2: - return getO2(); + case PART_VALS: + return getPart_vals(); + + case MAX_PARTS: + return new Short(getMax_parts()); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -10527,12 +32994,18 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -10541,39 +33014,66 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_type_result) - return this.equals((drop_type_result)that); + if (that instanceof get_partitions_ps_with_auth_args) + return this.equals((get_partitions_ps_with_auth_args)that); return false; } - public boolean equals(drop_type_result that) { + public boolean equals(get_partitions_ps_with_auth_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (this.success != that.success) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) return false; - if (!this.o1.equals(that.o1)) + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) return false; - if (!this.o2.equals(that.o2)) + if (!this.group_names.equals(that.group_names)) return false; } @@ -10585,44 +33085,74 @@ return 0; } - public int compareTo(drop_type_result other) { + public int compareTo(get_partitions_ps_with_auth_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_type_result typedOther = (drop_type_result)other; + get_partitions_ps_with_auth_args typedOther = (get_partitions_ps_with_auth_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -10640,26 +33170,65 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list180 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list180.size); + for (int _i181 = 0; _i181 < _list180.size; ++_i181) + { + String _elem182; + _elem182 = iprot.readString(); + this.part_vals.add(_elem182); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // GROUP_NAMES + if (field.type == TType.LIST) { + { + TList _list183 = iprot.readListBegin(); + this.group_names = new ArrayList(_list183.size); + for (int _i184 = 0; _i184 < _list183.size; ++_i184) + { + String _elem185; + _elem185 = iprot.readString(); + this.group_names.add(_elem185); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -10674,19 +33243,49 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter186 : this.part_vals) + { + oprot.writeString(_iter186); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter187 : this.group_names) + { + oprot.writeString(_iter187); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -10695,26 +33294,50 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_type_result("); + StringBuilder sb = new StringBuilder("get_partitions_ps_with_auth_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("part_vals:"); + if (this.part_vals == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); } first = false; sb.append(")"); @@ -10727,16 +33350,22 @@ } - public static class get_type_all_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_type_all_args"); + public static class get_partitions_ps_with_auth_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_with_auth_result"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String name; + private List success; + private NoSuchObjectException o1; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - NAME((short)1, "name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -10751,8 +33380,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -10775,92 +33408,190 @@ return byName.get(name); } - private final short _thriftId; - private final String _fieldName; + 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_result.class, metaDataMap); + } + + public get_partitions_ps_with_auth_result() { + } + + public get_partitions_ps_with_auth_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_ps_with_auth_result(get_partitions_ps_with_auth_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_partitions_ps_with_auth_result deepCopy() { + return new get_partitions_ps_with_auth_result(this); + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } - public short getThriftFieldId() { - return _thriftId; - } + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } - public String getFieldName() { - return _fieldName; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); } + this.success.add(elem); } - // isset id assignments + public List getSuccess() { + return this.success; + } - public static final Map<_Fields, FieldMetaData> metaDataMap; - static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap); + public void setSuccess(List success) { + this.success = success; } - public get_type_all_args() { + public void unsetSuccess() { + this.success = null; } - public get_type_all_args( - String name) - { - this(); - this.name = name; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - /** - * Performs a deep copy on other. - */ - public get_type_all_args(get_type_all_args other) { - if (other.isSetName()) { - this.name = other.name; + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; } } - public get_type_all_args deepCopy() { - return new get_type_all_args(this); + public NoSuchObjectException getO1() { + return this.o1; } - @Override - public void clear() { - this.name = null; + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; } - public String getName() { - return this.name; + public void unsetO1() { + this.o1 = null; } - public void setName(String name) { - this.name = name; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void unsetName() { - this.name = null; + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; + public MetaException getO2() { + return this.o2; } - public void setNameIsSet(boolean value) { + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { if (!value) { - this.name = null; + this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: + case SUCCESS: if (value == null) { - unsetName(); + unsetSuccess(); } else { - setName((String)value); + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -10869,8 +33600,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -10883,8 +33620,12 @@ } switch (field) { - case NAME: - return isSetName(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -10893,21 +33634,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_type_all_args) - return this.equals((get_type_all_args)that); + if (that instanceof get_partitions_ps_with_auth_result) + return this.equals((get_partitions_ps_with_auth_result)that); return false; } - public boolean equals(get_type_all_args that) { + public boolean equals(get_partitions_ps_with_auth_result that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + 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.name.equals(that.name)) + 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -10919,20 +33678,40 @@ return 0; } - public int compareTo(get_type_all_args other) { + public int compareTo(get_partitions_ps_with_auth_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_type_all_args typedOther = (get_type_all_args)other; + get_partitions_ps_with_auth_result typedOther = (get_partitions_ps_with_auth_result)other; - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -10954,9 +33733,36 @@ break; } switch (field.id) { - case 1: // NAME - if (field.type == TType.STRING) { - this.name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list188 = iprot.readListBegin(); + this.success = new ArrayList(_list188.size); + for (int _i189 = 0; _i189 < _list188.size; ++_i189) + { + Partition _elem190; + _elem190 = new Partition(); + _elem190.read(iprot); + this.success.add(_elem190); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -10971,12 +33777,26 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter191 : this.success) + { + _iter191.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -10985,14 +33805,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_all_args("); + StringBuilder sb = new StringBuilder("get_partitions_ps_with_auth_result("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.name); + 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; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -11005,19 +33841,25 @@ } - public static class get_type_all_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_type_all_result"); + public static class get_partition_names_ps_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_ps_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); - private Map success; - private MetaException o2; + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O2((short)1, "o2"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); @@ -11032,10 +33874,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -11076,138 +33922,216 @@ } // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new StructMetaData(TType.STRUCT, Type.class)))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); } - public get_type_all_result() { + public get_partition_names_ps_args() { + this.max_parts = (short)-1; + } - public get_type_all_result( - Map success, - MetaException o2) + public get_partition_names_ps_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts) { this(); - this.success = success; - this.o2 = o2; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ - public get_type_all_result(get_type_all_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(); - for (Map.Entry other_element : other.success.entrySet()) { - - String other_element_key = other_element.getKey(); - Type other_element_value = other_element.getValue(); - - String __this__success_copy_key = other_element_key; - - Type __this__success_copy_value = new Type(other_element_value); - - __this__success.put(__this__success_copy_key, __this__success_copy_value); - } - this.success = __this__success; + public get_partition_names_ps_args(get_partition_names_ps_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; } + this.max_parts = other.max_parts; } - public get_type_all_result deepCopy() { - return new get_type_all_result(this); + public get_partition_names_ps_args deepCopy() { + return new get_partition_names_ps_args(this); } @Override public void clear() { - this.success = null; - this.o2 = null; + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public String getDb_name() { + return this.db_name; } - public void putToSuccess(String key, Type val) { - if (this.success == null) { - this.success = new HashMap(); + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; } - this.success.put(key, val); } - public Map getSuccess() { - return this.success; + public String getTbl_name() { + return this.tbl_name; } - public void setSuccess(Map success) { - this.success = success; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetSuccess() { - this.success = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setSuccessIsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.tbl_name = null; } } - public MetaException getO2() { - return this.o2; + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); } - public void setO2(MetaException o2) { - this.o2 = o2; + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); } - public void unsetO2() { - this.o2 = null; + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + public List getPart_vals() { + return this.part_vals; } - public void setO2IsSet(boolean value) { + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + + public void unsetPart_vals() { + this.part_vals = null; + } + + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_vals() { + return this.part_vals != null; + } + + public void setPart_valsIsSet(boolean value) { if (!value) { - this.o2 = null; + this.part_vals = null; } } + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } + + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + } + + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Map)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((MetaException)value); + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -11216,11 +34140,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case MAX_PARTS: + return new Short(getMax_parts()); } throw new IllegalStateException(); @@ -11233,10 +34163,14 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -11245,30 +34179,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_type_all_result) - return this.equals((get_type_all_result)that); + if (that instanceof get_partition_names_ps_args) + return this.equals((get_partition_names_ps_args)that); return false; } - public boolean equals(get_type_all_result that) { + public boolean equals(get_partition_names_ps_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) + return false; + if (this.max_parts != that.max_parts) return false; } @@ -11280,30 +34232,50 @@ return 0; } - public int compareTo(get_type_all_result other) { + public int compareTo(get_partition_names_ps_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } - - int lastComparison = 0; - get_type_all_result typedOther = (get_type_all_result)other; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + + int lastComparison = 0; + get_partition_names_ps_args typedOther = (get_partition_names_ps_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } @@ -11325,30 +34297,41 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.MAP) { + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { { - TMap _map71 = iprot.readMapBegin(); - this.success = new HashMap(2*_map71.size); - for (int _i72 = 0; _i72 < _map71.size; ++_i72) + TList _list192 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list192.size); + for (int _i193 = 0; _i193 < _list192.size; ++_i193) { - String _key73; - Type _val74; - _key73 = iprot.readString(); - _val74 = new Type(); - _val74.read(iprot); - this.success.put(_key73, _val74); + String _elem194; + _elem194 = iprot.readString(); + this.part_vals.add(_elem194); } - iprot.readMapEnd(); + iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 4: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -11363,49 +34346,70 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); - for (Map.Entry _iter75 : this.success.entrySet()) + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter195 : this.part_vals) { - oprot.writeString(_iter75.getKey()); - _iter75.getValue().write(oprot); + oprot.writeString(_iter195); } - oprot.writeMapEnd(); + oprot.writeListEnd(); } oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_all_result("); + StringBuilder sb = new StringBuilder("get_partition_names_ps_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -11416,19 +34420,19 @@ } - public static class get_fields_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_fields_args"); + public static class get_partition_names_ps_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_ps_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String table_name; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TABLE_NAME((short)2, "table_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -11443,10 +34447,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -11491,109 +34495,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); } - public get_fields_args() { + public get_partition_names_ps_result() { } - public get_fields_args( - String db_name, - String table_name) + public get_partition_names_ps_result( + List success, + MetaException o1) { this(); - this.db_name = db_name; - this.table_name = table_name; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_fields_args(get_fields_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public get_partition_names_ps_result(get_partition_names_ps_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; } - if (other.isSetTable_name()) { - this.table_name = other.table_name; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public get_fields_args deepCopy() { - return new get_fields_args(this); + public get_partition_names_ps_result deepCopy() { + return new get_partition_names_ps_result(this); } @Override public void clear() { - this.db_name = null; - this.table_name = null; + this.success = null; + this.o1 = null; } - public String getDb_name() { - return this.db_name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setDb_name(String db_name) { - this.db_name = db_name; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetDb_name() { - this.db_name = null; + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public List getSuccess() { + return this.success; } - public void setDb_nameIsSet(boolean value) { + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { if (!value) { - this.db_name = null; + this.success = null; } } - public String getTable_name() { - return this.table_name; + public MetaException getO1() { + return this.o1; } - public void setTable_name(String table_name) { - this.table_name = table_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetTable_name() { - this.table_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTable_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.table_name = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: + case SUCCESS: if (value == null) { - unsetDb_name(); + unsetSuccess(); } else { - setDb_name((String)value); + setSuccess((List)value); } break; - case TABLE_NAME: + case O1: if (value == null) { - unsetTable_name(); + unsetO1(); } else { - setTable_name((String)value); + setO1((MetaException)value); } break; @@ -11602,11 +34626,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case SUCCESS: + return getSuccess(); - case TABLE_NAME: - return getTable_name(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -11619,10 +34643,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -11631,30 +34655,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_fields_args) - return this.equals((get_fields_args)that); + if (that instanceof get_partition_names_ps_result) + return this.equals((get_partition_names_ps_result)that); return false; } - public boolean equals(get_fields_args that) { + public boolean equals(get_partition_names_ps_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) + 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.db_name.equals(that.db_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) + 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.table_name.equals(that.table_name)) + if (!this.o1.equals(that.o1)) return false; } @@ -11666,30 +34690,30 @@ return 0; } - public int compareTo(get_fields_args other) { + public int compareTo(get_partition_names_ps_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_fields_args typedOther = (get_fields_args)other; + get_partition_names_ps_result typedOther = (get_partition_names_ps_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable_name()) { - lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -11711,16 +34735,27 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list196 = iprot.readListBegin(); + this.success = new ArrayList(_list196.size); + for (int _i197 = 0; _i197 < _list196.size; ++_i197) + { + String _elem198; + _elem198 = iprot.readString(); + this.success.add(_elem198); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TABLE_NAME - if (field.type == TType.STRING) { - this.table_name = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -11735,17 +34770,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter199 : this.success) + { + oprot.writeString(_iter199); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -11754,22 +34794,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_fields_args("); + StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.table_name); + sb.append(this.o1); } first = false; sb.append(")"); @@ -11782,25 +34822,25 @@ } - public static class get_fields_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_fields_result"); + public static class get_partitions_by_filter_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_by_filter_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRING, (short)3); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); - private List success; - private MetaException o1; - private UnknownTableException o2; - private UnknownDBException o3; + private String db_name; + private String tbl_name; + private String filter; + private short max_parts; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + FILTER((short)3, "filter"), + MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); @@ -11815,14 +34855,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // FILTER + return FILTER; + case 4: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -11863,211 +34903,196 @@ } // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); } - public get_fields_result() { + public get_partitions_by_filter_args() { + this.max_parts = (short)-1; + } - public get_fields_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) + public get_partitions_by_filter_args( + String db_name, + String tbl_name, + String filter, + short max_parts) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ - public get_fields_result(get_fields_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + public get_partitions_by_filter_args(get_partitions_by_filter_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); + if (other.isSetFilter()) { + this.filter = other.filter; } + this.max_parts = other.max_parts; } - public get_fields_result deepCopy() { - return new get_fields_result(this); + public get_partitions_by_filter_args deepCopy() { + return new get_partitions_by_filter_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = 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(); - } + this.db_name = null; + this.tbl_name = null; + this.filter = null; + this.max_parts = (short)-1; - public void addToSuccess(FieldSchema elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); } - public List getSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(List success) { - this.success = success; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - this.success = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setSuccessIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.db_name = null; } } - public MetaException getO1() { - return this.o1; + public String getTbl_name() { + return this.tbl_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO1() { - this.o1 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO1IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.tbl_name = null; } } - public UnknownTableException getO2() { - return this.o2; + public String getFilter() { + return this.filter; } - public void setO2(UnknownTableException o2) { - this.o2 = o2; + public void setFilter(String filter) { + this.filter = filter; } - public void unsetO2() { - this.o2 = null; + public void unsetFilter() { + this.filter = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field filter is set (has been asigned a value) and false otherwise */ + public boolean isSetFilter() { + return this.filter != null; } - public void setO2IsSet(boolean value) { + public void setFilterIsSet(boolean value) { if (!value) { - this.o2 = null; + this.filter = null; } } - public UnknownDBException getO3() { - return this.o3; + public short getMax_parts() { + return this.max_parts; } - public void setO3(UnknownDBException o3) { - this.o3 = o3; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); } - public void unsetO3() { - this.o3 = null; + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_parts() { + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((List)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((MetaException)value); + setTbl_name((String)value); } break; - case O2: + case FILTER: if (value == null) { - unsetO2(); + unsetFilter(); } else { - setO2((UnknownTableException)value); + setFilter((String)value); } break; - case O3: + case MAX_PARTS: if (value == null) { - unsetO3(); + unsetMax_parts(); } else { - setO3((UnknownDBException)value); + setMax_parts((Short)value); } break; @@ -12076,17 +35101,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); - case O2: - return getO2(); + case FILTER: + return getFilter(); - case O3: - return getO3(); + case MAX_PARTS: + return new Short(getMax_parts()); } throw new IllegalStateException(); @@ -12099,14 +35124,14 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case FILTER: + return isSetFilter(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -12115,48 +35140,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_fields_result) - return this.equals((get_fields_result)that); + if (that instanceof get_partitions_by_filter_args) + return this.equals((get_partitions_by_filter_args)that); return false; } - public boolean equals(get_fields_result that) { + public boolean equals(get_partitions_by_filter_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_filter = true && this.isSetFilter(); + boolean that_present_filter = true && that.isSetFilter(); + if (this_present_filter || that_present_filter) { + if (!(this_present_filter && that_present_filter)) return false; - if (!this.o2.equals(that.o2)) + if (!this.filter.equals(that.filter)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) return false; - if (!this.o3.equals(that.o3)) + if (this.max_parts != that.max_parts) return false; } @@ -12168,50 +35193,50 @@ return 0; } - public int compareTo(get_fields_result other) { + public int compareTo(get_partitions_by_filter_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_fields_result typedOther = (get_fields_result)other; + get_partitions_by_filter_args typedOther = (get_partitions_by_filter_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetFilter()) { + lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); if (lastComparison != 0) { return lastComparison; } @@ -12233,44 +35258,31 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list76 = iprot.readListBegin(); - this.success = new ArrayList(_list76.size); - for (int _i77 = 0; _i77 < _list76.size; ++_i77) - { - FieldSchema _elem78; - _elem78 = new FieldSchema(); - _elem78.read(iprot); - this.success.add(_elem78); - } - iprot.readListEnd(); - } + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new UnknownTableException(); - this.o2.read(iprot); + case 3: // FILTER + if (field.type == TType.STRING) { + this.filter = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); + case 4: // MAX_PARTS + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -12285,71 +35297,62 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter79 : this.success) - { - _iter79.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.filter != null) { + oprot.writeFieldBegin(FILTER_FIELD_DESC); + oprot.writeString(this.filter); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_fields_result("); + StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("filter:"); + if (this.filter == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.filter); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } + sb.append("max_parts:"); + sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); @@ -12361,19 +35364,22 @@ } - public static class get_schema_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_schema_args"); + public static class get_partitions_by_filter_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_by_filter_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String db_name; - private String table_name; + private List success; + private MetaException o1; + private NoSuchObjectException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TABLE_NAME((short)2, "table_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -12388,10 +35394,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -12436,109 +35444,168 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); } - public get_schema_args() { + public get_partitions_by_filter_result() { } - public get_schema_args( - String db_name, - String table_name) + public get_partitions_by_filter_result( + List success, + MetaException o1, + NoSuchObjectException o2) { this(); - this.db_name = db_name; - this.table_name = table_name; + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_by_filter_result(get_partitions_by_filter_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_partitions_by_filter_result deepCopy() { + return new get_partitions_by_filter_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = 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(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; } - /** - * Performs a deep copy on other. - */ - public get_schema_args(get_schema_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTable_name()) { - this.table_name = other.table_name; - } + public void setSuccess(List success) { + this.success = success; } - public get_schema_args deepCopy() { - return new get_schema_args(this); + public void unsetSuccess() { + this.success = null; } - @Override - public void clear() { - this.db_name = null; - this.table_name = null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public String getDb_name() { - return this.db_name; + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } } - public void setDb_name(String db_name) { - this.db_name = db_name; + public MetaException getO1() { + return this.o1; } - public void unsetDb_name() { - this.db_name = null; + public void setO1(MetaException o1) { + this.o1 = o1; } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public void unsetO1() { + this.o1 = null; } - public void setDb_nameIsSet(boolean value) { + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { if (!value) { - this.db_name = null; + this.o1 = null; } } - public String getTable_name() { - return this.table_name; + public NoSuchObjectException getO2() { + return this.o2; } - public void setTable_name(String table_name) { - this.table_name = table_name; + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; } - public void unsetTable_name() { - this.table_name = null; + public void unsetO2() { + this.o2 = null; } - /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTable_name() { - return this.table_name != null; + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; } - public void setTable_nameIsSet(boolean value) { + public void setO2IsSet(boolean value) { if (!value) { - this.table_name = null; + this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: + case SUCCESS: if (value == null) { - unsetDb_name(); + unsetSuccess(); } else { - setDb_name((String)value); + setSuccess((List)value); } break; - case TABLE_NAME: + case O1: if (value == null) { - unsetTable_name(); + unsetO1(); } else { - setTable_name((String)value); + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); } break; @@ -12547,11 +35614,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case SUCCESS: + return getSuccess(); - case TABLE_NAME: - return getTable_name(); + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -12564,10 +35634,12 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -12576,30 +35648,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_schema_args) - return this.equals((get_schema_args)that); + if (that instanceof get_partitions_by_filter_result) + return this.equals((get_partitions_by_filter_result)that); return false; } - public boolean equals(get_schema_args that) { + public boolean equals(get_partitions_by_filter_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) + 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.db_name.equals(that.db_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) + 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.table_name.equals(that.table_name)) + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -12611,30 +35692,40 @@ return 0; } - public int compareTo(get_schema_args other) { + public int compareTo(get_partitions_by_filter_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_schema_args typedOther = (get_schema_args)other; + get_partitions_by_filter_result typedOther = (get_partitions_by_filter_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable_name()) { - lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -12656,16 +35747,36 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list200 = iprot.readListBegin(); + this.success = new ArrayList(_list200.size); + for (int _i201 = 0; _i201 < _list200.size; ++_i201) + { + Partition _elem202; + _elem202 = new Partition(); + _elem202.read(iprot); + this.success.add(_elem202); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TABLE_NAME - if (field.type == TType.STRING) { - this.table_name = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -12680,17 +35791,26 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter203 : this.success) + { + _iter203.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -12699,22 +35819,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_schema_args("); + StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.table_name); + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -12727,25 +35855,22 @@ } - public static class get_schema_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_schema_result"); + public static class alter_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_partition_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)3); - private List success; - private MetaException o1; - private UnknownTableException o2; - private UnknownDBException o3; + private String db_name; + private String tbl_name; + private Partition new_part; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + NEW_PART((short)3, "new_part"); private static final Map byName = new HashMap(); @@ -12760,14 +35885,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_PART + return NEW_PART; default: return null; } @@ -12812,207 +35935,148 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); } - public get_schema_result() { + public alter_partition_args() { } - public get_schema_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) + public alter_partition_args( + String db_name, + String tbl_name, + Partition new_part) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; } /** * Performs a deep copy on other. */ - public get_schema_result(get_schema_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + public alter_partition_args(alter_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); } } - public get_schema_result deepCopy() { - return new get_schema_result(this); + public alter_partition_args deepCopy() { + return new alter_partition_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = 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(FieldSchema 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 asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + this.db_name = null; + this.tbl_name = null; + this.new_part = null; } - public MetaException getO1() { - return this.o1; + public String getDb_name() { + return this.db_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO1IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } - public UnknownTableException getO2() { - return this.o2; + public String getTbl_name() { + return this.tbl_name; } - public void setO2(UnknownTableException o2) { - this.o2 = o2; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO2() { - this.o2 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO2IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.tbl_name = null; } } - public UnknownDBException getO3() { - return this.o3; + public Partition getNew_part() { + return this.new_part; } - public void setO3(UnknownDBException o3) { - this.o3 = o3; + public void setNew_part(Partition new_part) { + this.new_part = new_part; } - public void unsetO3() { - this.o3 = null; + public void unsetNew_part() { + this.new_part = null; } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field new_part is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; } - public void setO3IsSet(boolean value) { + public void setNew_partIsSet(boolean value) { if (!value) { - this.o3 = null; + this.new_part = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((MetaException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((UnknownTableException)value); + setTbl_name((String)value); } break; - case O3: + case NEW_PART: if (value == null) { - unsetO3(); + unsetNew_part(); } else { - setO3((UnknownDBException)value); + setNew_part((Partition)value); } break; @@ -13021,17 +36085,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); - case O3: - return getO3(); + case NEW_PART: + return getNew_part(); } throw new IllegalStateException(); @@ -13044,14 +36105,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_PART: + return isSetNew_part(); } throw new IllegalStateException(); } @@ -13060,48 +36119,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_schema_result) - return this.equals((get_schema_result)that); + if (that instanceof alter_partition_args) + return this.equals((alter_partition_args)that); return false; } - public boolean equals(get_schema_result that) { + public boolean equals(alter_partition_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) return false; - if (!this.o3.equals(that.o3)) + if (!this.new_part.equals(that.new_part)) return false; } @@ -13113,50 +36163,40 @@ return 0; } - public int compareTo(get_schema_result other) { + public int compareTo(alter_partition_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_schema_result typedOther = (get_schema_result)other; + alter_partition_args typedOther = (alter_partition_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetNew_part()) { + lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } @@ -13178,44 +36218,24 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list80 = iprot.readListBegin(); - this.success = new ArrayList(_list80.size); - for (int _i81 = 0; _i81 < _list80.size; ++_i81) - { - FieldSchema _elem82; - _elem82 = new FieldSchema(); - _elem82.read(iprot); - this.success.add(_elem82); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new UnknownTableException(); - this.o2.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 + case 3: // NEW_PART if (field.type == TType.STRUCT) { - this.o3 = new UnknownDBException(); - this.o3.read(iprot); + this.new_part = new Partition(); + this.new_part.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -13230,30 +36250,22 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter83 : this.success) - { - _iter83.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -13262,38 +36274,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_schema_result("); + StringBuilder sb = new StringBuilder("alter_partition_args("); 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("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("new_part:"); + if (this.new_part == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.new_part); } first = false; sb.append(")"); @@ -13306,16 +36310,19 @@ } - public static class create_table_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_table_args"); + public static class alter_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_partition_result"); - private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private Table tbl; + private InvalidOperationException o1; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - TBL((short)1, "tbl"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -13330,8 +36337,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TBL - return TBL; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -13376,70 +36385,109 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); } - public create_table_args() { + public alter_partition_result() { } - public create_table_args( - Table tbl) + public alter_partition_result( + InvalidOperationException o1, + MetaException o2) { this(); - this.tbl = tbl; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public create_table_args(create_table_args other) { - if (other.isSetTbl()) { - this.tbl = new Table(other.tbl); + public alter_partition_result(alter_partition_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public create_table_args deepCopy() { - return new create_table_args(this); + public alter_partition_result deepCopy() { + return new alter_partition_result(this); } @Override public void clear() { - this.tbl = null; + this.o1 = null; + this.o2 = null; } - public Table getTbl() { - return this.tbl; + public InvalidOperationException getO1() { + return this.o1; } - public void setTbl(Table tbl) { - this.tbl = tbl; + public void setO1(InvalidOperationException o1) { + this.o1 = o1; } - public void unsetTbl() { - this.tbl = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field tbl is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl() { - return this.tbl != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTblIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.tbl = null; + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TBL: + case O1: if (value == null) { - unsetTbl(); + unsetO1(); } else { - setTbl((Table)value); + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -13448,8 +36496,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case TBL: - return getTbl(); + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -13462,8 +36513,10 @@ } switch (field) { - case TBL: - return isSetTbl(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -13472,21 +36525,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_table_args) - return this.equals((create_table_args)that); + if (that instanceof alter_partition_result) + return this.equals((alter_partition_result)that); return false; } - public boolean equals(create_table_args that) { + public boolean equals(alter_partition_result that) { if (that == null) return false; - boolean this_present_tbl = true && this.isSetTbl(); - boolean that_present_tbl = true && that.isSetTbl(); - if (this_present_tbl || that_present_tbl) { - if (!(this_present_tbl && that_present_tbl)) + 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.tbl.equals(that.tbl)) + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -13498,20 +36560,30 @@ return 0; } - public int compareTo(create_table_args other) { + public int compareTo(alter_partition_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - create_table_args typedOther = (create_table_args)other; + alter_partition_result typedOther = (alter_partition_result)other; - lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl()) { - lastComparison = TBaseHelper.compareTo(this.tbl, typedOther.tbl); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -13533,10 +36605,18 @@ break; } switch (field.id) { - case 1: // TBL + case 1: // O1 if (field.type == TType.STRUCT) { - this.tbl = new Table(); - this.tbl.read(iprot); + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -13551,12 +36631,15 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -13565,14 +36648,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_table_args("); + StringBuilder sb = new StringBuilder("alter_partition_result("); boolean first = true; - sb.append("tbl:"); - if (this.tbl == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl); + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -13585,25 +36676,19 @@ } - public static class create_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_table_result"); + public static class get_config_value_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_config_value_args"); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); - private static final TField O4_FIELD_DESC = new TField("o4", TType.STRUCT, (short)4); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private static final TField DEFAULT_VALUE_FIELD_DESC = new TField("defaultValue", TType.STRING, (short)2); - private AlreadyExistsException o1; - private InvalidObjectException o2; - private MetaException o3; - private NoSuchObjectException o4; + private String name; + private String defaultValue; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); + NAME((short)1, "name"), + DEFAULT_VALUE((short)2, "defaultValue"); private static final Map byName = new HashMap(); @@ -13618,14 +36703,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; - case 4: // O4 - return O4; + case 1: // NAME + return NAME; + case 2: // DEFAULT_VALUE + return DEFAULT_VALUE; default: return null; } @@ -13670,187 +36751,109 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DEFAULT_VALUE, new FieldMetaData("defaultValue", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); } - public create_table_result() { + public get_config_value_args() { } - public create_table_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) + public get_config_value_args( + String name, + String defaultValue) { this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; - this.o4 = o4; + this.name = name; + this.defaultValue = defaultValue; } /** * Performs a deep copy on other. */ - public create_table_result(create_table_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + public get_config_value_args(get_config_value_args other) { + if (other.isSetName()) { + this.name = other.name; } - if (other.isSetO4()) { - this.o4 = new NoSuchObjectException(other.o4); + if (other.isSetDefaultValue()) { + this.defaultValue = other.defaultValue; } } - public create_table_result deepCopy() { - return new create_table_result(this); + public get_config_value_args deepCopy() { + return new get_config_value_args(this); } @Override public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; - } - - public AlreadyExistsException getO1() { - return this.o1; - } - - public void setO1(AlreadyExistsException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public InvalidObjectException getO2() { - return this.o2; - } - - public void setO2(InvalidObjectException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } + this.name = null; + this.defaultValue = null; } - public MetaException getO3() { - return this.o3; + public String getName() { + return this.name; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setName(String name) { + this.name = name; } - public void unsetO3() { - this.o3 = null; + public void unsetName() { + this.name = null; } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field name is set (has been asigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; } - public void setO3IsSet(boolean value) { + public void setNameIsSet(boolean value) { if (!value) { - this.o3 = null; + this.name = null; } } - public NoSuchObjectException getO4() { - return this.o4; + public String getDefaultValue() { + return this.defaultValue; } - public void setO4(NoSuchObjectException o4) { - this.o4 = o4; + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; } - public void unsetO4() { - this.o4 = null; + public void unsetDefaultValue() { + this.defaultValue = null; } - /** Returns true if field o4 is set (has been asigned a value) and false otherwise */ - public boolean isSetO4() { - return this.o4 != null; + /** Returns true if field defaultValue is set (has been asigned a value) and false otherwise */ + public boolean isSetDefaultValue() { + return this.defaultValue != null; } - public void setO4IsSet(boolean value) { + public void setDefaultValueIsSet(boolean value) { if (!value) { - this.o4 = null; + this.defaultValue = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: + case NAME: if (value == null) { - unsetO3(); + unsetName(); } else { - setO3((MetaException)value); + setName((String)value); } break; - case O4: + case DEFAULT_VALUE: if (value == null) { - unsetO4(); + unsetDefaultValue(); } else { - setO4((NoSuchObjectException)value); + setDefaultValue((String)value); } break; @@ -13859,17 +36862,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); - - case O2: - return getO2(); - - case O3: - return getO3(); + case NAME: + return getName(); - case O4: - return getO4(); + case DEFAULT_VALUE: + return getDefaultValue(); } throw new IllegalStateException(); @@ -13882,14 +36879,10 @@ } switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); + case NAME: + return isSetName(); + case DEFAULT_VALUE: + return isSetDefaultValue(); } throw new IllegalStateException(); } @@ -13898,48 +36891,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_table_result) - return this.equals((create_table_result)that); + if (that instanceof get_config_value_args) + return this.equals((get_config_value_args)that); return false; } - public boolean equals(create_table_result that) { + public boolean equals(get_config_value_args that) { if (that == null) 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; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) return false; - if (!this.o3.equals(that.o3)) + if (!this.name.equals(that.name)) return false; } - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) + boolean this_present_defaultValue = true && this.isSetDefaultValue(); + boolean that_present_defaultValue = true && that.isSetDefaultValue(); + if (this_present_defaultValue || that_present_defaultValue) { + if (!(this_present_defaultValue && that_present_defaultValue)) return false; - if (!this.o4.equals(that.o4)) + if (!this.defaultValue.equals(that.defaultValue)) return false; } @@ -13951,99 +36926,61 @@ return 0; } - public int compareTo(create_table_result other) { + public int compareTo(get_config_value_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - create_table_result typedOther = (create_table_result)other; + get_config_value_args typedOther = (get_config_value_args)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(typedOther.isSetDefaultValue()); if (lastComparison != 0) { return lastComparison; } - if (isSetO4()) { - lastComparison = TBaseHelper.compareTo(this.o4, typedOther.o4); + if (isSetDefaultValue()) { + lastComparison = TBaseHelper.compareTo(this.defaultValue, typedOther.defaultValue); if (lastComparison != 0) { return lastComparison; } } return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // NAME + if (field.type == TType.STRING) { + this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: // O4 - if (field.type == TType.STRUCT) { - this.o4 = new NoSuchObjectException(); - this.o4.read(iprot); + case 2: // DEFAULT_VALUE + if (field.type == TType.STRING) { + this.defaultValue = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -14058,23 +36995,17 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); oprot.writeFieldEnd(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); + } + if (this.defaultValue != null) { + oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); + oprot.writeString(this.defaultValue); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -14083,38 +37014,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_table_result("); + StringBuilder sb = new StringBuilder("get_config_value_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("name:"); + if (this.name == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.name); } first = false; if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { + sb.append("defaultValue:"); + if (this.defaultValue == null) { sb.append("null"); } else { - sb.append(this.o4); + sb.append(this.defaultValue); } first = false; sb.append(")"); @@ -14127,22 +37042,19 @@ } - public static class drop_table_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_table_args"); + public static class get_config_value_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_config_value_result"); - private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2); - private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String dbname; - private String name; - private boolean deleteData; + private String success; + private ConfigValSecurityException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DBNAME((short)1, "dbname"), - NAME((short)2, "name"), - DELETE_DATA((short)3, "deleteData"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -14157,12 +37069,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // NAME - return NAME; - case 3: // DELETE_DATA - return DELETE_DATA; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -14203,155 +37113,113 @@ } // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); } - public drop_table_args() { + public get_config_value_result() { } - public drop_table_args( - String dbname, - String name, - boolean deleteData) + public get_config_value_result( + String success, + ConfigValSecurityException o1) { this(); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public drop_table_args(drop_table_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDbname()) { - this.dbname = other.dbname; + public get_config_value_result(get_config_value_result other) { + if (other.isSetSuccess()) { + this.success = other.success; } - if (other.isSetName()) { - this.name = other.name; + if (other.isSetO1()) { + this.o1 = new ConfigValSecurityException(other.o1); } - this.deleteData = other.deleteData; } - public drop_table_args deepCopy() { - return new drop_table_args(this); + public get_config_value_result deepCopy() { + return new get_config_value_result(this); } @Override public void clear() { - this.dbname = null; - this.name = null; - setDeleteDataIsSet(false); - this.deleteData = false; + this.success = null; + this.o1 = null; } - public String getDbname() { - return this.dbname; + public String getSuccess() { + return this.success; } - public void setDbname(String dbname) { - this.dbname = dbname; + public void setSuccess(String success) { + this.success = success; } - public void unsetDbname() { - this.dbname = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setDbnameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.dbname = null; + this.success = null; } } - public String getName() { - return this.name; + public ConfigValSecurityException getO1() { + return this.o1; } - public void setName(String name) { - this.name = name; + public void setO1(ConfigValSecurityException o1) { + this.o1 = o1; } - public void unsetName() { - this.name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setNameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.name = null; + this.o1 = null; } } - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); - } - - /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ - public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case NAME: + case SUCCESS: if (value == null) { - unsetName(); + unsetSuccess(); } else { - setName((String)value); + setSuccess((String)value); } break; - case DELETE_DATA: + case O1: if (value == null) { - unsetDeleteData(); + unsetO1(); } else { - setDeleteData((Boolean)value); + setO1((ConfigValSecurityException)value); } break; @@ -14360,14 +37228,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DBNAME: - return getDbname(); - - case NAME: - return getName(); + case SUCCESS: + return getSuccess(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -14380,12 +37245,10 @@ } switch (field) { - case DBNAME: - return isSetDbname(); - case NAME: - return isSetName(); - case DELETE_DATA: - return isSetDeleteData(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -14394,39 +37257,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_table_args) - return this.equals((drop_table_args)that); + if (that instanceof get_config_value_result) + return this.equals((get_config_value_result)that); return false; } - public boolean equals(drop_table_args that) { + public boolean equals(get_config_value_result that) { if (that == null) return false; - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + 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.name.equals(that.name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + 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.deleteData != that.deleteData) + if (!this.o1.equals(that.o1)) return false; } @@ -14438,40 +37292,30 @@ return 0; } - public int compareTo(drop_table_args other) { + public int compareTo(get_config_value_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_table_args typedOther = (drop_table_args)other; + get_config_value_result typedOther = (get_config_value_result)other; - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -14493,24 +37337,17 @@ break; } switch (field.id) { - case 1: // DBNAME - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // NAME + case 0: // SUCCESS if (field.type == TType.STRING) { - this.name = iprot.readString(); + this.success = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // DELETE_DATA - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new ConfigValSecurityException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -14525,50 +37362,41 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(this.success); oprot.writeFieldEnd(); - } - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_table_args("); + StringBuilder sb = new StringBuilder("get_config_value_result("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.dbname); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -14579,19 +37407,16 @@ } - public static class drop_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_table_result"); + public static class partition_name_to_vals_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_vals_args"); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); - private NoSuchObjectException o1; - private MetaException o3; + private String part_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - O1((short)1, "o1"), - O3((short)2, "o3"); + PART_NAME((short)1, "part_name"); private static final Map byName = new HashMap(); @@ -14606,10 +37431,8 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O3 - return O3; + case 1: // PART_NAME + return PART_NAME; default: return null; } @@ -14654,109 +37477,70 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); } - public drop_table_result() { + public partition_name_to_vals_args() { } - public drop_table_result( - NoSuchObjectException o1, - MetaException o3) + public partition_name_to_vals_args( + String part_name) { this(); - this.o1 = o1; - this.o3 = o3; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public drop_table_result(drop_table_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + public partition_name_to_vals_args(partition_name_to_vals_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } - public drop_table_result deepCopy() { - return new drop_table_result(this); + public partition_name_to_vals_args deepCopy() { + return new partition_name_to_vals_args(this); } @Override public void clear() { - this.o1 = null; - this.o3 = null; - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } + this.part_name = null; } - public MetaException getO3() { - return this.o3; + public String getPart_name() { + return this.part_name; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetO3() { - this.o3 = null; + public void unsetPart_name() { + this.part_name = null; } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setO3IsSet(boolean value) { + public void setPart_nameIsSet(boolean value) { if (!value) { - this.o3 = null; + this.part_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O3: + case PART_NAME: if (value == null) { - unsetO3(); + unsetPart_name(); } else { - setO3((MetaException)value); + setPart_name((String)value); } break; @@ -14765,11 +37549,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); - - case O3: - return getO3(); + case PART_NAME: + return getPart_name(); } throw new IllegalStateException(); @@ -14782,10 +37563,8 @@ } switch (field) { - case O1: - return isSetO1(); - case O3: - return isSetO3(); + case PART_NAME: + return isSetPart_name(); } throw new IllegalStateException(); } @@ -14794,30 +37573,21 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_table_result) - return this.equals((drop_table_result)that); + if (that instanceof partition_name_to_vals_args) + return this.equals((partition_name_to_vals_args)that); return false; } - public boolean equals(drop_table_result that) { + public boolean equals(partition_name_to_vals_args that) { if (that == null) 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; - } - - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) return false; - if (!this.o3.equals(that.o3)) + if (!this.part_name.equals(that.part_name)) return false; } @@ -14829,30 +37599,20 @@ return 0; } - public int compareTo(drop_table_result other) { + public int compareTo(partition_name_to_vals_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_table_result typedOther = (drop_table_result)other; + partition_name_to_vals_args typedOther = (partition_name_to_vals_args)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } @@ -14874,18 +37634,9 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case 1: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -14900,15 +37651,12 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -14917,22 +37665,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_table_result("); + StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -14945,19 +37685,19 @@ } - public static class get_tables_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_tables_args"); + public static class partition_name_to_vals_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_vals_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)2); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String pattern; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - PATTERN((short)2, "pattern"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -14972,10 +37712,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // PATTERN - return PATTERN; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -15020,109 +37760,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); } - public get_tables_args() { + public partition_name_to_vals_result() { } - public get_tables_args( - String db_name, - String pattern) + public partition_name_to_vals_result( + List success, + MetaException o1) { this(); - this.db_name = db_name; - this.pattern = pattern; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_tables_args(get_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public partition_name_to_vals_result(partition_name_to_vals_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; } - if (other.isSetPattern()) { - this.pattern = other.pattern; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public get_tables_args deepCopy() { - return new get_tables_args(this); + public partition_name_to_vals_result deepCopy() { + return new partition_name_to_vals_result(this); } @Override public void clear() { - this.db_name = null; - this.pattern = null; + this.success = null; + this.o1 = null; } - public String getDb_name() { - return this.db_name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setDb_name(String db_name) { - this.db_name = db_name; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetDb_name() { - this.db_name = null; + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public List getSuccess() { + return this.success; } - public void setDb_nameIsSet(boolean value) { + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { if (!value) { - this.db_name = null; + this.success = null; } } - public String getPattern() { - return this.pattern; + public MetaException getO1() { + return this.o1; } - public void setPattern(String pattern) { - this.pattern = pattern; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetPattern() { - this.pattern = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field pattern is set (has been asigned a value) and false otherwise */ - public boolean isSetPattern() { - return this.pattern != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setPatternIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.pattern = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: + case SUCCESS: if (value == null) { - unsetDb_name(); + unsetSuccess(); } else { - setDb_name((String)value); + setSuccess((List)value); } break; - case PATTERN: + case O1: if (value == null) { - unsetPattern(); + unsetO1(); } else { - setPattern((String)value); + setO1((MetaException)value); } break; @@ -15131,11 +37891,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case SUCCESS: + return getSuccess(); - case PATTERN: - return getPattern(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -15148,10 +37908,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case PATTERN: - return isSetPattern(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -15160,30 +37920,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_tables_args) - return this.equals((get_tables_args)that); + if (that instanceof partition_name_to_vals_result) + return this.equals((partition_name_to_vals_result)that); return false; } - public boolean equals(get_tables_args that) { + public boolean equals(partition_name_to_vals_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) + 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.db_name.equals(that.db_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) + 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.pattern.equals(that.pattern)) + if (!this.o1.equals(that.o1)) return false; } @@ -15195,30 +37955,30 @@ return 0; } - public int compareTo(get_tables_args other) { + public int compareTo(partition_name_to_vals_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_tables_args typedOther = (get_tables_args)other; + partition_name_to_vals_result typedOther = (partition_name_to_vals_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetPattern()) { - lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -15240,16 +38000,27 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list204 = iprot.readListBegin(); + this.success = new ArrayList(_list204.size); + for (int _i205 = 0; _i205 < _list204.size; ++_i205) + { + String _elem206; + _elem206 = iprot.readString(); + this.success.add(_elem206); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // PATTERN - if (field.type == TType.STRING) { - this.pattern = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -15264,17 +38035,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter207 : this.success) + { + oprot.writeString(_iter207); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -15283,22 +38059,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_tables_args("); + StringBuilder sb = new StringBuilder("partition_name_to_vals_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("pattern:"); - if (this.pattern == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.pattern); + sb.append(this.o1); } first = false; sb.append(")"); @@ -15311,19 +38087,16 @@ } - public static class get_tables_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_tables_result"); + public static class partition_name_to_spec_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_spec_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); - private List success; - private MetaException o1; + private String part_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + PART_NAME((short)1, "part_name"); private static final Map byName = new HashMap(); @@ -15338,10 +38111,8 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // PART_NAME + return PART_NAME; default: return null; } @@ -15386,129 +38157,70 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); } - public get_tables_result() { + public partition_name_to_spec_args() { } - public get_tables_result( - List success, - MetaException o1) + public partition_name_to_spec_args( + String part_name) { this(); - this.success = success; - this.o1 = o1; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public get_tables_result(get_tables_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - public get_tables_result deepCopy() { - return new get_tables_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(String elem) { - if (this.success == null) { - this.success = new ArrayList(); + public partition_name_to_spec_args(partition_name_to_spec_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; } - 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 asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + public partition_name_to_spec_args deepCopy() { + return new partition_name_to_spec_args(this); } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + @Override + public void clear() { + this.part_name = null; } - public MetaException getO1() { - return this.o1; + public String getPart_name() { + return this.part_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetO1() { - this.o1 = null; + public void unsetPart_name() { + this.part_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setO1IsSet(boolean value) { + public void setPart_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.part_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: + case PART_NAME: if (value == null) { - unsetO1(); + unsetPart_name(); } else { - setO1((MetaException)value); + setPart_name((String)value); } break; @@ -15517,11 +38229,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); + case PART_NAME: + return getPart_name(); } throw new IllegalStateException(); @@ -15534,10 +38243,8 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case PART_NAME: + return isSetPart_name(); } throw new IllegalStateException(); } @@ -15546,30 +38253,21 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_tables_result) - return this.equals((get_tables_result)that); + if (that instanceof partition_name_to_spec_args) + return this.equals((partition_name_to_spec_args)that); return false; } - public boolean equals(get_tables_result that) { + public boolean equals(partition_name_to_spec_args 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)) + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.part_name.equals(that.part_name)) return false; } @@ -15581,30 +38279,20 @@ return 0; } - public int compareTo(get_tables_result other) { + public int compareTo(partition_name_to_spec_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_tables_result typedOther = (get_tables_result)other; + partition_name_to_spec_args typedOther = (partition_name_to_spec_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } @@ -15626,27 +38314,9 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list84 = iprot.readListBegin(); - this.success = new ArrayList(_list84.size); - for (int _i85 = 0; _i85 < _list84.size; ++_i85) - { - String _elem86; - _elem86 = iprot.readString(); - this.success.add(_elem86); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 1: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -15661,22 +38331,12 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter87 : this.success) - { - oprot.writeString(_iter87); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -15685,22 +38345,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_tables_result("); + StringBuilder sb = new StringBuilder("partition_name_to_spec_args("); 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("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -15713,16 +38365,19 @@ } - public static class get_all_tables_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_args"); + public static class partition_name_to_spec_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_spec_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; + private Map success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -15737,8 +38392,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -15783,70 +38440,134 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); } - public get_all_tables_args() { + public partition_name_to_spec_result() { } - public get_all_tables_args( - String db_name) + public partition_name_to_spec_result( + Map success, + MetaException o1) { this(); - this.db_name = db_name; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_all_tables_args(get_all_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public partition_name_to_spec_result(partition_name_to_spec_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(); + for (Map.Entry other_element : other.success.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__success_copy_key = other_element_key; + + String __this__success_copy_value = other_element_value; + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public get_all_tables_args deepCopy() { - return new get_all_tables_args(this); + public partition_name_to_spec_result deepCopy() { + return new partition_name_to_spec_result(this); } @Override public void clear() { - this.db_name = null; + this.success = null; + this.o1 = null; } - public String getDb_name() { - return this.db_name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void putToSuccess(String key, String val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); } - public void unsetDb_name() { - this.db_name = null; + public Map getSuccess() { + return this.success; } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public void setSuccess(Map success) { + this.success = success; } - public void setDb_nameIsSet(boolean value) { + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { if (!value) { - this.db_name = null; + 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 asigned 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 DB_NAME: + case SUCCESS: if (value == null) { - unsetDb_name(); + unsetSuccess(); } else { - setDb_name((String)value); + setSuccess((Map)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); } break; @@ -15855,8 +38576,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); } throw new IllegalStateException(); @@ -15869,8 +38593,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -15879,21 +38605,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_all_tables_args) - return this.equals((get_all_tables_args)that); + if (that instanceof partition_name_to_spec_result) + return this.equals((partition_name_to_spec_result)that); return false; } - public boolean equals(get_all_tables_args that) { + public boolean equals(partition_name_to_spec_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) + 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.db_name.equals(that.db_name)) + 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; } @@ -15905,20 +38640,30 @@ return 0; } - public int compareTo(get_all_tables_args other) { + public int compareTo(partition_name_to_spec_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_all_tables_args typedOther = (get_all_tables_args)other; + partition_name_to_spec_result typedOther = (partition_name_to_spec_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -15940,9 +38685,29 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.MAP) { + { + TMap _map208 = iprot.readMapBegin(); + this.success = new HashMap(2*_map208.size); + for (int _i209 = 0; _i209 < _map208.size; ++_i209) + { + String _key210; + String _val211; + _key210 = iprot.readString(); + _val211 = iprot.readString(); + this.success.put(_key210, _val211); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -15957,12 +38722,23 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); + for (Map.Entry _iter212 : this.success.entrySet()) + { + oprot.writeString(_iter212.getKey()); + oprot.writeString(_iter212.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -15971,14 +38747,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_args("); + StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.db_name); + 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(")"); @@ -15991,19 +38775,19 @@ } - public static class get_all_tables_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_result"); + public static class add_index_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_index_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField NEW_INDEX_FIELD_DESC = new TField("new_index", TType.STRUCT, (short)1); + private static final TField INDEX_TABLE_FIELD_DESC = new TField("index_table", TType.STRUCT, (short)2); - private List success; - private MetaException o1; + private Index new_index; + private Table index_table; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + NEW_INDEX((short)1, "new_index"), + INDEX_TABLE((short)2, "index_table"); private static final Map byName = new HashMap(); @@ -16018,10 +38802,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // NEW_INDEX + return NEW_INDEX; + case 2: // INDEX_TABLE + return INDEX_TABLE; default: return null; } @@ -16066,129 +38850,109 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.NEW_INDEX, new FieldMetaData("new_index", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Index.class))); + tmpMap.put(_Fields.INDEX_TABLE, new FieldMetaData("index_table", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); } - public get_all_tables_result() { + public add_index_args() { } - public get_all_tables_result( - List success, - MetaException o1) + public add_index_args( + Index new_index, + Table index_table) { this(); - this.success = success; - this.o1 = o1; + this.new_index = new_index; + this.index_table = index_table; } /** * Performs a deep copy on other. */ - public get_all_tables_result(get_all_tables_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; + public add_index_args(add_index_args other) { + if (other.isSetNew_index()) { + this.new_index = new Index(other.new_index); } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetIndex_table()) { + this.index_table = new Table(other.index_table); } } - public get_all_tables_result deepCopy() { - return new get_all_tables_result(this); + public add_index_args deepCopy() { + return new add_index_args(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(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + this.new_index = null; + this.index_table = null; } - public List getSuccess() { - return this.success; + public Index getNew_index() { + return this.new_index; } - public void setSuccess(List success) { - this.success = success; + public void setNew_index(Index new_index) { + this.new_index = new_index; } - public void unsetSuccess() { - this.success = null; + public void unsetNew_index() { + this.new_index = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field new_index is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_index() { + return this.new_index != null; } - public void setSuccessIsSet(boolean value) { + public void setNew_indexIsSet(boolean value) { if (!value) { - this.success = null; + this.new_index = null; } } - public MetaException getO1() { - return this.o1; + public Table getIndex_table() { + return this.index_table; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setIndex_table(Table index_table) { + this.index_table = index_table; } - public void unsetO1() { - this.o1 = null; + public void unsetIndex_table() { + this.index_table = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field index_table is set (has been asigned a value) and false otherwise */ + public boolean isSetIndex_table() { + return this.index_table != null; } - public void setO1IsSet(boolean value) { + public void setIndex_tableIsSet(boolean value) { if (!value) { - this.o1 = null; + this.index_table = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case NEW_INDEX: if (value == null) { - unsetSuccess(); + unsetNew_index(); } else { - setSuccess((List)value); + setNew_index((Index)value); } break; - case O1: + case INDEX_TABLE: if (value == null) { - unsetO1(); + unsetIndex_table(); } else { - setO1((MetaException)value); + setIndex_table((Table)value); } break; @@ -16197,11 +38961,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case NEW_INDEX: + return getNew_index(); - case O1: - return getO1(); + case INDEX_TABLE: + return getIndex_table(); } throw new IllegalStateException(); @@ -16214,10 +38978,10 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case NEW_INDEX: + return isSetNew_index(); + case INDEX_TABLE: + return isSetIndex_table(); } throw new IllegalStateException(); } @@ -16226,30 +38990,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_all_tables_result) - return this.equals((get_all_tables_result)that); + if (that instanceof add_index_args) + return this.equals((add_index_args)that); return false; } - public boolean equals(get_all_tables_result that) { + public boolean equals(add_index_args 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)) + boolean this_present_new_index = true && this.isSetNew_index(); + boolean that_present_new_index = true && that.isSetNew_index(); + if (this_present_new_index || that_present_new_index) { + if (!(this_present_new_index && that_present_new_index)) return false; - if (!this.success.equals(that.success)) + if (!this.new_index.equals(that.new_index)) 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)) + boolean this_present_index_table = true && this.isSetIndex_table(); + boolean that_present_index_table = true && that.isSetIndex_table(); + if (this_present_index_table || that_present_index_table) { + if (!(this_present_index_table && that_present_index_table)) return false; - if (!this.o1.equals(that.o1)) + if (!this.index_table.equals(that.index_table)) return false; } @@ -16261,30 +39025,30 @@ return 0; } - public int compareTo(get_all_tables_result other) { + public int compareTo(add_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_all_tables_result typedOther = (get_all_tables_result)other; + add_index_args typedOther = (add_index_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(typedOther.isSetNew_index()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetNew_index()) { + lastComparison = TBaseHelper.compareTo(this.new_index, typedOther.new_index); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(typedOther.isSetIndex_table()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetIndex_table()) { + lastComparison = TBaseHelper.compareTo(this.index_table, typedOther.index_table); if (lastComparison != 0) { return lastComparison; } @@ -16306,27 +39070,18 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list88 = iprot.readListBegin(); - this.success = new ArrayList(_list88.size); - for (int _i89 = 0; _i89 < _list88.size; ++_i89) - { - String _elem90; - _elem90 = iprot.readString(); - this.success.add(_elem90); - } - iprot.readListEnd(); - } + case 1: // NEW_INDEX + if (field.type == TType.STRUCT) { + this.new_index = new Index(); + this.new_index.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 + case 2: // INDEX_TABLE if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + this.index_table = new Table(); + this.index_table.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -16341,22 +39096,17 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter91 : this.success) - { - oprot.writeString(_iter91); - } - oprot.writeListEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.new_index != null) { + oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); + this.new_index.write(oprot); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.index_table != null) { + oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); + this.index_table.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -16365,22 +39115,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_result("); + StringBuilder sb = new StringBuilder("add_index_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("new_index:"); + if (this.new_index == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.new_index); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("index_table:"); + if (this.index_table == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.index_table); } first = false; sb.append(")"); @@ -16393,19 +39143,25 @@ } - public static class get_table_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_table_args"); + public static class add_index_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_index_result"); - private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); - private String dbname; - private String tbl_name; + private Index success; + private InvalidObjectException o1; + private AlreadyExistsException o2; + private MetaException o3; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DBNAME((short)1, "dbname"), - TBL_NAME((short)2, "tbl_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); private static final Map byName = new HashMap(); @@ -16420,10 +39176,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TBL_NAME - return TBL_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; default: return null; } @@ -16468,109 +39228,187 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Index.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); } - public get_table_args() { + public add_index_result() { } - public get_table_args( - String dbname, - String tbl_name) + public add_index_result( + Index success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) { this(); - this.dbname = dbname; - this.tbl_name = tbl_name; + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; } /** * Performs a deep copy on other. */ - public get_table_args(get_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; + public add_index_result(add_index_result other) { + if (other.isSetSuccess()) { + this.success = new Index(other.success); } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); } } - public get_table_args deepCopy() { - return new get_table_args(this); + public add_index_result deepCopy() { + return new add_index_result(this); } @Override public void clear() { - this.dbname = null; - this.tbl_name = null; + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; } - public String getDbname() { - return this.dbname; + public Index getSuccess() { + return this.success; } - public void setDbname(String dbname) { - this.dbname = dbname; + public void setSuccess(Index success) { + this.success = success; } - public void unsetDbname() { - this.dbname = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setDbnameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.dbname = null; + this.success = null; } } - public String getTbl_name() { - return this.tbl_name; + public InvalidObjectException getO1() { + return this.o1; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setO1(InvalidObjectException o1) { + this.o1 = o1; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTbl_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.o1 = null; } } + public AlreadyExistsException getO2() { + return this.o2; + } + + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case DBNAME: + case SUCCESS: if (value == null) { - unsetDbname(); + unsetSuccess(); } else { - setDbname((String)value); + setSuccess((Index)value); } break; - case TBL_NAME: + case O1: if (value == null) { - unsetTbl_name(); + unsetO1(); } else { - setTbl_name((String)value); + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); } break; @@ -16579,11 +39417,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DBNAME: - return getDbname(); + case SUCCESS: + return getSuccess(); - case TBL_NAME: - return getTbl_name(); + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); } throw new IllegalStateException(); @@ -16596,10 +39440,14 @@ } switch (field) { - case DBNAME: - return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); } throw new IllegalStateException(); } @@ -16608,30 +39456,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_table_args) - return this.equals((get_table_args)that); + if (that instanceof add_index_result) + return this.equals((add_index_result)that); return false; } - public boolean equals(get_table_args that) { + public boolean equals(add_index_result that) { if (that == null) return false; - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) + 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.dbname.equals(that.dbname)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (!this.o3.equals(that.o3)) return false; } @@ -16643,34 +39509,54 @@ return 0; } - public int compareTo(get_table_args other) { + public int compareTo(add_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_table_args typedOther = (get_table_args)other; + add_index_result typedOther = (add_index_result)other; - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDbname()) { - lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -16688,16 +39574,34 @@ break; } switch (field.id) { - case 1: // DBNAME - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Index(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -16712,17 +39616,23 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -16731,22 +39641,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_table_args("); + StringBuilder sb = new StringBuilder("add_index_result("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.dbname); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); } first = false; sb.append(")"); @@ -16759,22 +39685,25 @@ } - public static class get_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_table_result"); + public static class alter_index_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_index_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField BASE_TBL_NAME_FIELD_DESC = new TField("base_tbl_name", TType.STRING, (short)2); + private static final TField IDX_NAME_FIELD_DESC = new TField("idx_name", TType.STRING, (short)3); + private static final TField NEW_IDX_FIELD_DESC = new TField("new_idx", TType.STRUCT, (short)4); - private Table success; - private MetaException o1; - private NoSuchObjectException o2; + private String dbname; + private String base_tbl_name; + private String idx_name; + private Index new_idx; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + DBNAME((short)1, "dbname"), + BASE_TBL_NAME((short)2, "base_tbl_name"), + IDX_NAME((short)3, "idx_name"), + NEW_IDX((short)4, "new_idx"); private static final Map byName = new HashMap(); @@ -16789,12 +39718,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DBNAME + return DBNAME; + case 2: // BASE_TBL_NAME + return BASE_TBL_NAME; + case 3: // IDX_NAME + return IDX_NAME; + case 4: // NEW_IDX + return NEW_IDX; default: return null; } @@ -16839,148 +39770,187 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.BASE_TBL_NAME, new FieldMetaData("base_tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IDX_NAME, new FieldMetaData("idx_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.NEW_IDX, new FieldMetaData("new_idx", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Index.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); } - public get_table_result() { + public alter_index_args() { } - public get_table_result( - Table success, - MetaException o1, - NoSuchObjectException o2) + public alter_index_args( + String dbname, + String base_tbl_name, + String idx_name, + Index new_idx) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.dbname = dbname; + this.base_tbl_name = base_tbl_name; + this.idx_name = idx_name; + this.new_idx = new_idx; } /** * Performs a deep copy on other. */ - public get_table_result(get_table_result other) { - if (other.isSetSuccess()) { - this.success = new Table(other.success); + public alter_index_args(alter_index_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetBase_tbl_name()) { + this.base_tbl_name = other.base_tbl_name; } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + if (other.isSetIdx_name()) { + this.idx_name = other.idx_name; + } + if (other.isSetNew_idx()) { + this.new_idx = new Index(other.new_idx); } } - public get_table_result deepCopy() { - return new get_table_result(this); + public alter_index_args deepCopy() { + return new alter_index_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; + this.dbname = null; + this.base_tbl_name = null; + this.idx_name = null; + this.new_idx = null; } - public Table getSuccess() { - return this.success; + public String getDbname() { + return this.dbname; } - public void setSuccess(Table success) { - this.success = success; + public void setDbname(String dbname) { + this.dbname = dbname; } - public void unsetSuccess() { - this.success = null; + public void unsetDbname() { + this.dbname = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ + public boolean isSetDbname() { + return this.dbname != null; } - public void setSuccessIsSet(boolean value) { + public void setDbnameIsSet(boolean value) { if (!value) { - this.success = null; + this.dbname = null; } } - public MetaException getO1() { - return this.o1; + public String getBase_tbl_name() { + return this.base_tbl_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setBase_tbl_name(String base_tbl_name) { + this.base_tbl_name = base_tbl_name; } - public void unsetO1() { - this.o1 = null; + public void unsetBase_tbl_name() { + this.base_tbl_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field base_tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetBase_tbl_name() { + return this.base_tbl_name != null; } - public void setO1IsSet(boolean value) { + public void setBase_tbl_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.base_tbl_name = null; } } - public NoSuchObjectException getO2() { - return this.o2; + public String getIdx_name() { + return this.idx_name; } - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; + public void setIdx_name(String idx_name) { + this.idx_name = idx_name; } - public void unsetO2() { - this.o2 = null; + public void unsetIdx_name() { + this.idx_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field idx_name is set (has been asigned a value) and false otherwise */ + public boolean isSetIdx_name() { + return this.idx_name != null; } - public void setO2IsSet(boolean value) { + public void setIdx_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.idx_name = null; + } + } + + public Index getNew_idx() { + return this.new_idx; + } + + public void setNew_idx(Index new_idx) { + this.new_idx = new_idx; + } + + public void unsetNew_idx() { + this.new_idx = null; + } + + /** Returns true if field new_idx is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_idx() { + return this.new_idx != null; + } + + public void setNew_idxIsSet(boolean value) { + if (!value) { + this.new_idx = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DBNAME: if (value == null) { - unsetSuccess(); + unsetDbname(); } else { - setSuccess((Table)value); + setDbname((String)value); } break; - case O1: + case BASE_TBL_NAME: if (value == null) { - unsetO1(); + unsetBase_tbl_name(); } else { - setO1((MetaException)value); + setBase_tbl_name((String)value); } break; - case O2: + case IDX_NAME: if (value == null) { - unsetO2(); + unsetIdx_name(); } else { - setO2((NoSuchObjectException)value); + setIdx_name((String)value); + } + break; + + case NEW_IDX: + if (value == null) { + unsetNew_idx(); + } else { + setNew_idx((Index)value); } break; @@ -16989,14 +39959,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DBNAME: + return getDbname(); - case O1: - return getO1(); + case BASE_TBL_NAME: + return getBase_tbl_name(); - case O2: - return getO2(); + case IDX_NAME: + return getIdx_name(); + + case NEW_IDX: + return getNew_idx(); } throw new IllegalStateException(); @@ -17009,12 +39982,14 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DBNAME: + return isSetDbname(); + case BASE_TBL_NAME: + return isSetBase_tbl_name(); + case IDX_NAME: + return isSetIdx_name(); + case NEW_IDX: + return isSetNew_idx(); } throw new IllegalStateException(); } @@ -17023,39 +39998,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_table_result) - return this.equals((get_table_result)that); + if (that instanceof alter_index_args) + return this.equals((alter_index_args)that); return false; } - public boolean equals(get_table_result that) { + public boolean equals(alter_index_args 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)) + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) return false; - if (!this.success.equals(that.success)) + if (!this.dbname.equals(that.dbname)) 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)) + boolean this_present_base_tbl_name = true && this.isSetBase_tbl_name(); + boolean that_present_base_tbl_name = true && that.isSetBase_tbl_name(); + if (this_present_base_tbl_name || that_present_base_tbl_name) { + if (!(this_present_base_tbl_name && that_present_base_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.base_tbl_name.equals(that.base_tbl_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_idx_name = true && this.isSetIdx_name(); + boolean that_present_idx_name = true && that.isSetIdx_name(); + if (this_present_idx_name || that_present_idx_name) { + if (!(this_present_idx_name && that_present_idx_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.idx_name.equals(that.idx_name)) + return false; + } + + boolean this_present_new_idx = true && this.isSetNew_idx(); + boolean that_present_new_idx = true && that.isSetNew_idx(); + if (this_present_new_idx || that_present_new_idx) { + if (!(this_present_new_idx && that_present_new_idx)) + return false; + if (!this.new_idx.equals(that.new_idx)) return false; } @@ -17067,40 +40051,50 @@ return 0; } - public int compareTo(get_table_result other) { + public int compareTo(alter_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_table_result typedOther = (get_table_result)other; + alter_index_args typedOther = (alter_index_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetBase_tbl_name()).compareTo(typedOther.isSetBase_tbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetBase_tbl_name()) { + lastComparison = TBaseHelper.compareTo(this.base_tbl_name, typedOther.base_tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(typedOther.isSetIdx_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetIdx_name()) { + lastComparison = TBaseHelper.compareTo(this.idx_name, typedOther.idx_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(typedOther.isSetNew_idx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_idx()) { + lastComparison = TBaseHelper.compareTo(this.new_idx, typedOther.new_idx); if (lastComparison != 0) { return lastComparison; } @@ -17122,26 +40116,31 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Table(); - this.success.read(iprot); + case 1: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // BASE_TBL_NAME + if (field.type == TType.STRING) { + this.base_tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 + case 3: // IDX_NAME + if (field.type == TType.STRING) { + this.idx_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // NEW_IDX if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); + this.new_idx = new Index(); + this.new_idx.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -17156,19 +40155,27 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.base_tbl_name != null) { + oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); + oprot.writeString(this.base_tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.idx_name != null) { + oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); + oprot.writeString(this.idx_name); + oprot.writeFieldEnd(); + } + if (this.new_idx != null) { + oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); + this.new_idx.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -17177,30 +40184,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_table_result("); + StringBuilder sb = new StringBuilder("alter_index_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("dbname:"); + if (this.dbname == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.dbname); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("base_tbl_name:"); + if (this.base_tbl_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.base_tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("idx_name:"); + if (this.idx_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.idx_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_idx:"); + if (this.new_idx == null) { + sb.append("null"); + } else { + sb.append(this.new_idx); } first = false; sb.append(")"); @@ -17213,22 +40228,19 @@ } - public static class alter_table_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_table_args"); + public static class alter_index_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_index_result"); - private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField NEW_TBL_FIELD_DESC = new TField("new_tbl", TType.STRUCT, (short)3); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String dbname; - private String tbl_name; - private Table new_tbl; + private InvalidOperationException o1; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DBNAME((short)1, "dbname"), - TBL_NAME((short)2, "tbl_name"), - NEW_TBL((short)3, "new_tbl"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -17243,12 +40255,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_TBL - return NEW_TBL; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -17293,148 +40303,109 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_index_result.class, metaDataMap); } - public alter_table_args() { + public alter_index_result() { } - public alter_table_args( - String dbname, - String tbl_name, - Table new_tbl) + public alter_index_result( + InvalidOperationException o1, + MetaException o2) { this(); - this.dbname = dbname; - this.tbl_name = tbl_name; - this.new_tbl = new_tbl; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public alter_table_args(alter_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public alter_index_result(alter_index_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); } - if (other.isSetNew_tbl()) { - this.new_tbl = new Table(other.new_tbl); + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public alter_table_args deepCopy() { - return new alter_table_args(this); + public alter_index_result deepCopy() { + return new alter_index_result(this); } @Override public void clear() { - this.dbname = null; - this.tbl_name = null; - this.new_tbl = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } + this.o1 = null; + this.o2 = null; } - public String getTbl_name() { - return this.tbl_name; + public InvalidOperationException getO1() { + return this.o1; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setO1(InvalidOperationException o1) { + this.o1 = o1; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTbl_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.o1 = null; } } - public Table getNew_tbl() { - return this.new_tbl; + public MetaException getO2() { + return this.o2; } - public void setNew_tbl(Table new_tbl) { - this.new_tbl = new_tbl; + public void setO2(MetaException o2) { + this.o2 = o2; } - public void unsetNew_tbl() { - this.new_tbl = null; + public void unsetO2() { + this.o2 = null; } - /** Returns true if field new_tbl is set (has been asigned a value) and false otherwise */ - public boolean isSetNew_tbl() { - return this.new_tbl != null; + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; } - public void setNew_tblIsSet(boolean value) { + public void setO2IsSet(boolean value) { if (!value) { - this.new_tbl = null; + this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case TBL_NAME: + case O1: if (value == null) { - unsetTbl_name(); + unsetO1(); } else { - setTbl_name((String)value); + setO1((InvalidOperationException)value); } break; - case NEW_TBL: + case O2: if (value == null) { - unsetNew_tbl(); + unsetO2(); } else { - setNew_tbl((Table)value); + setO2((MetaException)value); } break; @@ -17443,14 +40414,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DBNAME: - return getDbname(); - - case TBL_NAME: - return getTbl_name(); + case O1: + return getO1(); - case NEW_TBL: - return getNew_tbl(); + case O2: + return getO2(); } throw new IllegalStateException(); @@ -17463,12 +40431,10 @@ } switch (field) { - case DBNAME: - return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_TBL: - return isSetNew_tbl(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -17477,39 +40443,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_table_args) - return this.equals((alter_table_args)that); + if (that instanceof alter_index_result) + return this.equals((alter_index_result)that); return false; } - public boolean equals(alter_table_args that) { + public boolean equals(alter_index_result that) { if (that == null) return false; - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (!this.o1.equals(that.o1)) return false; } - boolean this_present_new_tbl = true && this.isSetNew_tbl(); - boolean that_present_new_tbl = true && that.isSetNew_tbl(); - if (this_present_new_tbl || that_present_new_tbl) { - if (!(this_present_new_tbl && that_present_new_tbl)) + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) return false; - if (!this.new_tbl.equals(that.new_tbl)) + if (!this.o2.equals(that.o2)) return false; } @@ -17521,40 +40478,30 @@ return 0; } - public int compareTo(alter_table_args other) { + public int compareTo(alter_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_table_args typedOther = (alter_table_args)other; + alter_index_result typedOther = (alter_index_result)other; - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_tbl()) { - lastComparison = TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -17576,24 +40523,18 @@ break; } switch (field.id) { - case 1: // DBNAME - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // NEW_TBL + case 2: // O2 if (field.type == TType.STRUCT) { - this.new_tbl = new Table(); - this.new_tbl.read(iprot); + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -17608,22 +40549,15 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); - } - if (this.new_tbl != null) { - oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); - this.new_tbl.write(oprot); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -17632,30 +40566,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_table_args("); + StringBuilder sb = new StringBuilder("alter_index_result("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.o1); } first = false; if (!first) sb.append(", "); - sb.append("new_tbl:"); - if (this.new_tbl == null) { + sb.append("o2:"); + if (this.o2 == null) { sb.append("null"); } else { - sb.append(this.new_tbl); + sb.append(this.o2); } first = false; sb.append(")"); @@ -17668,19 +40594,25 @@ } - public static class alter_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_table_result"); + public static class drop_index_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_index_by_name_args"); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); + private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); - private InvalidOperationException o1; - private MetaException o2; + private String db_name; + private String tbl_name; + private String index_name; + private boolean deleteData; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + INDEX_NAME((short)3, "index_name"), + DELETE_DATA((short)4, "deleteData"); private static final Map byName = new HashMap(); @@ -17695,10 +40627,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // INDEX_NAME + return INDEX_NAME; + case 4: // DELETE_DATA + return DELETE_DATA; default: return null; } @@ -17739,113 +40675,194 @@ } // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); } - public alter_table_result() { + public drop_index_by_name_args() { } - public alter_table_result( - InvalidOperationException o1, - MetaException o2) + public drop_index_by_name_args( + String db_name, + String tbl_name, + String index_name, + boolean deleteData) { this(); - this.o1 = o1; - this.o2 = o2; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ - public alter_table_result(alter_table_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); + public drop_index_by_name_args(drop_index_by_name_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } + if (other.isSetIndex_name()) { + this.index_name = other.index_name; + } + this.deleteData = other.deleteData; + } + + public drop_index_by_name_args deepCopy() { + return new drop_index_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.index_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; } - public alter_table_result deepCopy() { - return new alter_table_result(this); + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - @Override - public void clear() { - this.o1 = null; - this.o2 = null; + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } } - public InvalidOperationException getO1() { - return this.o1; + public String getTbl_name() { + return this.tbl_name; } - public void setO1(InvalidOperationException o1) { - this.o1 = o1; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO1() { - this.o1 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO1IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.tbl_name = null; } } - public MetaException getO2() { - return this.o2; + public String getIndex_name() { + return this.index_name; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setIndex_name(String index_name) { + this.index_name = index_name; } - public void unsetO2() { - this.o2 = null; + public void unsetIndex_name() { + this.index_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field index_name is set (has been asigned a value) and false otherwise */ + public boolean isSetIndex_name() { + return this.index_name != null; } - public void setO2IsSet(boolean value) { + public void setIndex_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.index_name = null; } } + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((InvalidOperationException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((MetaException)value); + setTbl_name((String)value); + } + break; + + case INDEX_NAME: + if (value == null) { + unsetIndex_name(); + } else { + setIndex_name((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); } break; @@ -17854,11 +40871,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); + + case INDEX_NAME: + return getIndex_name(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); } throw new IllegalStateException(); @@ -17871,10 +40894,14 @@ } switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); + case DELETE_DATA: + return isSetDeleteData(); } throw new IllegalStateException(); } @@ -17883,30 +40910,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_table_result) - return this.equals((alter_table_result)that); + if (that instanceof drop_index_by_name_args) + return this.equals((drop_index_by_name_args)that); return false; } - public boolean equals(alter_table_result that) { + public boolean equals(drop_index_by_name_args that) { if (that == null) 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) + return false; + if (!this.index_name.equals(that.index_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) return false; } @@ -17918,30 +40963,50 @@ return 0; } - public int compareTo(alter_table_result other) { + public int compareTo(drop_index_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_table_result typedOther = (alter_table_result)other; + drop_index_by_name_args typedOther = (drop_index_by_name_args)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_name()) { + lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } @@ -17963,18 +41028,31 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // INDEX_NAME + if (field.type == TType.STRING) { + this.index_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -17989,41 +41067,63 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_table_result("); + StringBuilder sb = new StringBuilder("drop_index_by_name_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_name:"); + if (this.index_name == null) { + sb.append("null"); + } else { + sb.append(this.index_name); } first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; sb.append(")"); return sb.toString(); } @@ -18034,16 +41134,22 @@ } - public static class add_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("add_partition_args"); + public static class drop_index_by_name_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_index_by_name_result"); - private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private Partition new_part; + private boolean success; + private NoSuchObjectException o1; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - NEW_PART((short)1, "new_part"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -18058,8 +41164,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NEW_PART - return NEW_PART; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -18100,74 +41210,155 @@ } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); } - public add_partition_args() { + public drop_index_by_name_result() { } - public add_partition_args( - Partition new_part) + public drop_index_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) { this(); - this.new_part = new_part; + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public add_partition_args(add_partition_args other) { - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); + public drop_index_by_name_result(drop_index_by_name_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public add_partition_args deepCopy() { - return new add_partition_args(this); + public drop_index_by_name_result deepCopy() { + return new drop_index_by_name_result(this); } @Override public void clear() { - this.new_part = null; + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; } - public Partition getNew_part() { - return this.new_part; + public boolean isSuccess() { + return this.success; } - public void setNew_part(Partition new_part) { - this.new_part = new_part; + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); } - public void unsetNew_part() { - this.new_part = null; + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - /** Returns true if field new_part is set (has been asigned a value) and false otherwise */ - public boolean isSetNew_part() { - return this.new_part != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setNew_partIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { if (!value) { - this.new_part = null; + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NEW_PART: + case SUCCESS: if (value == null) { - unsetNew_part(); + unsetSuccess(); } else { - setNew_part((Partition)value); + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -18176,8 +41367,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NEW_PART: - return getNew_part(); + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); } throw new IllegalStateException(); @@ -18190,8 +41387,12 @@ } switch (field) { - case NEW_PART: - return isSetNew_part(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -18200,21 +41401,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_partition_args) - return this.equals((add_partition_args)that); + if (that instanceof drop_index_by_name_result) + return this.equals((drop_index_by_name_result)that); return false; } - public boolean equals(add_partition_args that) { + public boolean equals(drop_index_by_name_result that) { if (that == null) return false; - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) + 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.new_part.equals(that.new_part)) + if (this.success != 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; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -18226,20 +41445,40 @@ return 0; } - public int compareTo(add_partition_args other) { + public int compareTo(drop_index_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - add_partition_args typedOther = (add_partition_args)other; + drop_index_by_name_result typedOther = (drop_index_by_name_result)other; - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_part()) { - lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -18261,10 +41500,26 @@ break; } switch (field.id) { - case 1: // NEW_PART + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 if (field.type == TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -18279,12 +41534,19 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -18293,14 +41555,26 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_partition_args("); + StringBuilder sb = new StringBuilder("drop_index_by_name_result("); boolean first = true; - sb.append("new_part:"); - if (this.new_part == null) { + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.new_part); + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -18313,25 +41587,22 @@ } - public static class add_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("add_partition_result"); + public static class get_index_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_index_by_name_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); - private Partition success; - private InvalidObjectException o1; - private AlreadyExistsException o2; - private MetaException o3; + private String db_name; + private String tbl_name; + private String index_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + INDEX_NAME((short)3, "index_name"); private static final Map byName = new HashMap(); @@ -18340,20 +41611,18 @@ 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; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // INDEX_NAME + return INDEX_NAME; default: return null; } @@ -18398,187 +41667,148 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); } - public add_partition_result() { + public get_index_by_name_args() { } - public add_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_index_by_name_args( + String db_name, + String tbl_name, + String index_name) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; } /** * Performs a deep copy on other. */ - public add_partition_result(add_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); + public get_index_by_name_args(get_index_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetIndex_name()) { + this.index_name = other.index_name; } } - public add_partition_result deepCopy() { - return new add_partition_result(this); + public get_index_by_name_args deepCopy() { + return new get_index_by_name_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + this.db_name = null; + this.tbl_name = null; + this.index_name = null; } - public InvalidObjectException getO1() { - return this.o1; + public String getDb_name() { + return this.db_name; } - public void setO1(InvalidObjectException o1) { - this.o1 = o1; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO1IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } - public AlreadyExistsException getO2() { - return this.o2; + public String getTbl_name() { + return this.tbl_name; } - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO2() { - this.o2 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO2IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.tbl_name = null; } } - public MetaException getO3() { - return this.o3; + public String getIndex_name() { + return this.index_name; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setIndex_name(String index_name) { + this.index_name = index_name; } - public void unsetO3() { - this.o3 = null; + public void unsetIndex_name() { + this.index_name = null; } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field index_name is set (has been asigned a value) and false otherwise */ + public boolean isSetIndex_name() { + return this.index_name != null; } - public void setO3IsSet(boolean value) { + public void setIndex_nameIsSet(boolean value) { if (!value) { - this.o3 = null; + this.index_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((InvalidObjectException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((AlreadyExistsException)value); + setTbl_name((String)value); } break; - case O3: + case INDEX_NAME: if (value == null) { - unsetO3(); + unsetIndex_name(); } else { - setO3((MetaException)value); + setIndex_name((String)value); } break; @@ -18587,17 +41817,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); - case O3: - return getO3(); + case INDEX_NAME: + return getIndex_name(); } throw new IllegalStateException(); @@ -18610,14 +41837,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); } throw new IllegalStateException(); } @@ -18626,48 +41851,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_partition_result) - return this.equals((add_partition_result)that); + if (that instanceof get_index_by_name_args) + return this.equals((get_index_by_name_args)that); return false; } - public boolean equals(add_partition_result that) { + public boolean equals(get_index_by_name_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) return false; - if (!this.o3.equals(that.o3)) + if (!this.index_name.equals(that.index_name)) return false; } @@ -18679,50 +41895,40 @@ return 0; } - public int compareTo(add_partition_result other) { + public int compareTo(get_index_by_name_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - add_partition_result typedOther = (add_partition_result)other; + get_index_by_name_args typedOther = (get_index_by_name_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetIndex_name()) { + lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); if (lastComparison != 0) { return lastComparison; } @@ -18744,34 +41950,23 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); + } + break; + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case 3: // INDEX_NAME + if (field.type == TType.STRING) { + this.index_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -18786,23 +41981,22 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -18811,38 +42005,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_partition_result("); + StringBuilder sb = new StringBuilder("get_index_by_name_args("); 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("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("index_name:"); + if (this.index_name == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.index_name); } first = false; sb.append(")"); @@ -18855,22 +42041,22 @@ } - public static class append_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_args"); + public static class get_index_by_name_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_index_by_name_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String db_name; - private String tbl_name; - private List part_vals; + private Index success; + private MetaException o1; + private NoSuchObjectException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -18885,12 +42071,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -18935,168 +42121,148 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Index.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); } - public append_partition_args() { + public get_index_by_name_result() { } - public append_partition_args( - String db_name, - String tbl_name, - List part_vals) + public get_index_by_name_result( + Index success, + MetaException o1, + NoSuchObjectException o2) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public append_partition_args(append_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public get_index_by_name_result(get_index_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Index(other.success); } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); } } - public append_partition_args deepCopy() { - return new append_partition_args(this); + public get_index_by_name_result deepCopy() { + return new get_index_by_name_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; + this.success = null; + this.o1 = null; + this.o2 = null; } - public String getDb_name() { - return this.db_name; + public Index getSuccess() { + return this.success; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setSuccess(Index success) { + this.success = success; } - public void unsetDb_name() { - this.db_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setDb_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.db_name = null; + this.success = null; } } - public String getTbl_name() { - return this.tbl_name; + public MetaException getO1() { + return this.o1; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTbl_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.o1 = null; } } - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; + public NoSuchObjectException getO2() { + return this.o2; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetO2() { + this.o2 = null; } - /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; } - public void setPart_valsIsSet(boolean value) { + public void setO2IsSet(boolean value) { if (!value) { - this.part_vals = null; + this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: + case SUCCESS: if (value == null) { - unsetDb_name(); + unsetSuccess(); } else { - setDb_name((String)value); + setSuccess((Index)value); } break; - case TBL_NAME: + case O1: if (value == null) { - unsetTbl_name(); + unsetO1(); } else { - setTbl_name((String)value); + setO1((MetaException)value); } break; - case PART_VALS: + case O2: if (value == null) { - unsetPart_vals(); + unsetO2(); } else { - setPart_vals((List)value); + setO2((NoSuchObjectException)value); } break; @@ -19105,14 +42271,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case SUCCESS: + return getSuccess(); - case TBL_NAME: - return getTbl_name(); + case O1: + return getO1(); - case PART_VALS: - return getPart_vals(); + case O2: + return getO2(); } throw new IllegalStateException(); @@ -19125,12 +42291,12 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -19139,39 +42305,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof append_partition_args) - return this.equals((append_partition_args)that); + if (that instanceof get_index_by_name_result) + return this.equals((get_index_by_name_result)that); return false; } - public boolean equals(append_partition_args that) { + public boolean equals(get_index_by_name_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) + 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.db_name.equals(that.db_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (!this.o1.equals(that.o1)) return false; } - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) return false; - if (!this.part_vals.equals(that.part_vals)) + if (!this.o2.equals(that.o2)) return false; } @@ -19183,40 +42349,40 @@ return 0; } - public int compareTo(append_partition_args other) { + public int compareTo(get_index_by_name_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - append_partition_args typedOther = (append_partition_args)other; + get_index_by_name_result typedOther = (get_index_by_name_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_vals()) { - lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -19238,33 +42404,26 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Index(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // PART_VALS - if (field.type == TType.LIST) { - { - TList _list92 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list92.size); - for (int _i93 = 0; _i93 < _list92.size; ++_i93) - { - String _elem94; - _elem94 = iprot.readString(); - this.part_vals.add(_elem94); - } - iprot.readListEnd(); - } + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -19279,29 +42438,19 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter95 : this.part_vals) - { - oprot.writeString(_iter95); - } - oprot.writeListEnd(); - } + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -19310,30 +42459,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_args("); + StringBuilder sb = new StringBuilder("get_index_by_name_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.o1); } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("o2:"); + if (this.o2 == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.o2); } first = false; sb.append(")"); @@ -19346,25 +42495,22 @@ } - public static class append_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_result"); + public static class get_indexes_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_indexes_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); - private Partition success; - private InvalidObjectException o1; - private AlreadyExistsException o2; - private MetaException o3; + private String db_name; + private String tbl_name; + private short max_indexes; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_INDEXES((short)3, "max_indexes"); private static final Map byName = new HashMap(); @@ -19379,14 +42525,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_INDEXES + return MAX_INDEXES; default: return null; } @@ -19427,191 +42571,157 @@ } // isset id assignments + private static final int __MAX_INDEXES_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); } - public append_partition_result() { + public get_indexes_args() { + this.max_indexes = (short)-1; + } - public append_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_indexes_args( + String db_name, + String tbl_name, + short max_indexes) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); } /** * Performs a deep copy on other. */ - public append_partition_result(append_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); + public get_indexes_args(get_indexes_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } + this.max_indexes = other.max_indexes; } - public append_partition_result deepCopy() { - return new append_partition_result(this); + public get_indexes_args deepCopy() { + return new get_indexes_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } + this.db_name = null; + this.tbl_name = null; + this.max_indexes = (short)-1; - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } } - public InvalidObjectException getO1() { - return this.o1; + public String getDb_name() { + return this.db_name; } - public void setO1(InvalidObjectException o1) { - this.o1 = o1; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO1IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } - public AlreadyExistsException getO2() { - return this.o2; + public String getTbl_name() { + return this.tbl_name; } - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO2() { - this.o2 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO2IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.tbl_name = null; } } - public MetaException getO3() { - return this.o3; + public short getMax_indexes() { + return this.max_indexes; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); } - public void unsetO3() { - this.o3 = null; + public void unsetMax_indexes() { + __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field max_indexes is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_indexes() { + return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); } - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((InvalidObjectException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((AlreadyExistsException)value); + setTbl_name((String)value); } break; - case O3: + case MAX_INDEXES: if (value == null) { - unsetO3(); + unsetMax_indexes(); } else { - setO3((MetaException)value); + setMax_indexes((Short)value); } break; @@ -19620,17 +42730,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); - case O3: - return getO3(); + case MAX_INDEXES: + return new Short(getMax_indexes()); } throw new IllegalStateException(); @@ -19643,14 +42750,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); } throw new IllegalStateException(); } @@ -19659,48 +42764,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof append_partition_result) - return this.equals((append_partition_result)that); + if (that instanceof get_indexes_args) + return this.equals((get_indexes_args)that); return false; } - public boolean equals(append_partition_result that) { + public boolean equals(get_indexes_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_max_indexes = true; + boolean that_present_max_indexes = true; + if (this_present_max_indexes || that_present_max_indexes) { + if (!(this_present_max_indexes && that_present_max_indexes)) return false; - if (!this.o3.equals(that.o3)) + if (this.max_indexes != that.max_indexes) return false; } @@ -19712,50 +42808,40 @@ return 0; } - public int compareTo(append_partition_result other) { + public int compareTo(get_indexes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - append_partition_result typedOther = (append_partition_result)other; + get_indexes_args typedOther = (get_indexes_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetMax_indexes()) { + lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); if (lastComparison != 0) { return lastComparison; } @@ -19777,34 +42863,24 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case 3: // MAX_INDEXES + if (field.type == TType.I16) { + this.max_indexes = iprot.readI16(); + setMax_indexesIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -19819,64 +42895,49 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_result("); + StringBuilder sb = new StringBuilder("get_indexes_args("); 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("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } + sb.append("max_indexes:"); + sb.append(this.max_indexes); first = false; sb.append(")"); return sb.toString(); @@ -19888,22 +42949,22 @@ } - public static class append_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_args"); + public static class get_indexes_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_indexes_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String db_name; - private String tbl_name; - private String part_name; + private List success; + private NoSuchObjectException o1; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -19918,12 +42979,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; default: return null; } @@ -19968,148 +43029,168 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Index.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); } - public append_partition_by_name_args() { + public get_indexes_result() { } - public append_partition_by_name_args( - String db_name, - String tbl_name, - String part_name) + public get_indexes_result( + List success, + NoSuchObjectException o1, + MetaException o2) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public append_partition_by_name_args(append_partition_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public get_indexes_result(get_indexes_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Index other_element : other.success) { + __this__success.add(new Index(other_element)); + } + this.success = __this__success; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); } - if (other.isSetPart_name()) { - this.part_name = other.part_name; + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public append_partition_by_name_args deepCopy() { - return new append_partition_by_name_args(this); + public get_indexes_result deepCopy() { + return new get_indexes_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; + this.success = null; + this.o1 = null; + this.o2 = 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(Index elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - public String getDb_name() { - return this.db_name; + public List getSuccess() { + return this.success; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setSuccess(List success) { + this.success = success; } - public void unsetDb_name() { - this.db_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setDb_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.db_name = null; + this.success = null; } } - public String getTbl_name() { - return this.tbl_name; + public NoSuchObjectException getO1() { + return this.o1; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTbl_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.o1 = null; } } - public String getPart_name() { - return this.part_name; + public MetaException getO2() { + return this.o2; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setO2(MetaException o2) { + this.o2 = o2; } - public void unsetPart_name() { - this.part_name = null; + public void unsetO2() { + this.o2 = null; } - /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; } - public void setPart_nameIsSet(boolean value) { + public void setO2IsSet(boolean value) { if (!value) { - this.part_name = null; + this.o2 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: + case SUCCESS: if (value == null) { - unsetDb_name(); + unsetSuccess(); } else { - setDb_name((String)value); + setSuccess((List)value); } break; - case TBL_NAME: + case O1: if (value == null) { - unsetTbl_name(); + unsetO1(); } else { - setTbl_name((String)value); + setO1((NoSuchObjectException)value); } break; - case PART_NAME: + case O2: if (value == null) { - unsetPart_name(); + unsetO2(); } else { - setPart_name((String)value); + setO2((MetaException)value); } break; @@ -20118,14 +43199,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case SUCCESS: + return getSuccess(); - case TBL_NAME: - return getTbl_name(); + case O1: + return getO1(); - case PART_NAME: - return getPart_name(); + case O2: + return getO2(); } throw new IllegalStateException(); @@ -20138,12 +43219,12 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -20152,39 +43233,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof append_partition_by_name_args) - return this.equals((append_partition_by_name_args)that); + if (that instanceof get_indexes_result) + return this.equals((get_indexes_result)that); return false; } - public boolean equals(append_partition_by_name_args that) { + public boolean equals(get_indexes_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) + 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.db_name.equals(that.db_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (!this.o1.equals(that.o1)) return false; } - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) return false; - if (!this.part_name.equals(that.part_name)) + if (!this.o2.equals(that.o2)) return false; } @@ -20196,40 +43277,40 @@ return 0; } - public int compareTo(append_partition_by_name_args other) { + public int compareTo(get_indexes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - append_partition_by_name_args typedOther = (append_partition_by_name_args)other; + get_indexes_result typedOther = (get_indexes_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -20251,23 +43332,36 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list213 = iprot.readListBegin(); + this.success = new ArrayList(_list213.size); + for (int _i214 = 0; _i214 < _list213.size; ++_i214) + { + Index _elem215; + _elem215 = new Index(); + _elem215.read(iprot); + this.success.add(_elem215); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // PART_NAME - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + case 2: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -20282,22 +43376,26 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Index _iter216 : this.success) + { + _iter216.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -20306,30 +43404,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_by_name_args("); + StringBuilder sb = new StringBuilder("get_indexes_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.o1); } first = false; if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("o2:"); + if (this.o2 == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.o2); } first = false; sb.append(")"); @@ -20342,25 +43440,22 @@ } - public static class append_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_result"); + public static class get_index_names_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_index_names_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); - private Partition success; - private InvalidObjectException o1; - private AlreadyExistsException o2; - private MetaException o3; + private String db_name; + private String tbl_name; + private short max_indexes; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_INDEXES((short)3, "max_indexes"); private static final Map byName = new HashMap(); @@ -20375,14 +43470,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_INDEXES + return MAX_INDEXES; default: return null; } @@ -20423,191 +43516,157 @@ } // isset id assignments + private static final int __MAX_INDEXES_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); } - public append_partition_by_name_result() { + public get_index_names_args() { + this.max_indexes = (short)-1; + } - public append_partition_by_name_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_index_names_args( + String db_name, + String tbl_name, + short max_indexes) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); } /** * Performs a deep copy on other. */ - public append_partition_by_name_result(append_partition_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); + public get_index_names_args(get_index_names_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } + this.max_indexes = other.max_indexes; } - public append_partition_by_name_result deepCopy() { - return new append_partition_by_name_result(this); + public get_index_names_args deepCopy() { + return new get_index_names_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; - } - - public Partition getSuccess() { - return this.success; - } - - public void setSuccess(Partition success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } + this.db_name = null; + this.tbl_name = null; + this.max_indexes = (short)-1; - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public InvalidObjectException getO1() { - return this.o1; + public String getDb_name() { + return this.db_name; } - public void setO1(InvalidObjectException o1) { - this.o1 = o1; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO1IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } - public AlreadyExistsException getO2() { - return this.o2; + public String getTbl_name() { + return this.tbl_name; } - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO2() { - this.o2 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setO2IsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.tbl_name = null; } } - public MetaException getO3() { - return this.o3; + public short getMax_indexes() { + return this.max_indexes; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); } - public void unsetO3() { - this.o3 = null; + public void unsetMax_indexes() { + __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field max_indexes is set (has been asigned a value) and false otherwise */ + public boolean isSetMax_indexes() { + return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); } - public void setO3IsSet(boolean value) { - if (!value) { - this.o3 = null; - } + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Partition)value); - } - break; - - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((InvalidObjectException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((AlreadyExistsException)value); + setTbl_name((String)value); } break; - case O3: + case MAX_INDEXES: if (value == null) { - unsetO3(); + unsetMax_indexes(); } else { - setO3((MetaException)value); + setMax_indexes((Short)value); } break; @@ -20616,17 +43675,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); - case O3: - return getO3(); + case MAX_INDEXES: + return new Short(getMax_indexes()); } throw new IllegalStateException(); @@ -20639,14 +43695,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); } throw new IllegalStateException(); } @@ -20655,48 +43709,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof append_partition_by_name_result) - return this.equals((append_partition_by_name_result)that); + if (that instanceof get_index_names_args) + return this.equals((get_index_names_args)that); return false; } - public boolean equals(append_partition_by_name_result that) { + public boolean equals(get_index_names_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_max_indexes = true; + boolean that_present_max_indexes = true; + if (this_present_max_indexes || that_present_max_indexes) { + if (!(this_present_max_indexes && that_present_max_indexes)) return false; - if (!this.o3.equals(that.o3)) + if (this.max_indexes != that.max_indexes) return false; } @@ -20708,50 +43753,40 @@ return 0; } - public int compareTo(append_partition_by_name_result other) { + public int compareTo(get_index_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - append_partition_by_name_result typedOther = (append_partition_by_name_result)other; + get_index_names_args typedOther = (get_index_names_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetMax_indexes()) { + lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); if (lastComparison != 0) { return lastComparison; } @@ -20773,34 +43808,24 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); + case 2: // TBL_NAME + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case 3: // MAX_INDEXES + if (field.type == TType.I16) { + this.max_indexes = iprot.readI16(); + setMax_indexesIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -20815,64 +43840,49 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_by_name_result("); + StringBuilder sb = new StringBuilder("get_index_names_args("); 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("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } + sb.append("max_indexes:"); + sb.append(this.max_indexes); first = false; sb.append(")"); return sb.toString(); @@ -20884,25 +43894,19 @@ } - public static class drop_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_partition_args"); + public static class get_index_names_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_index_names_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); - private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private List part_vals; - private boolean deleteData; + private List success; + private MetaException o2; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - DELETE_DATA((short)4, "deleteData"); + SUCCESS((short)0, "success"), + O2((short)1, "o2"); private static final Map byName = new HashMap(); @@ -20917,14 +43921,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // DELETE_DATA - return DELETE_DATA; + case 0: // SUCCESS + return SUCCESS; + case 1: // O2 + return O2; default: return null; } @@ -20965,214 +43965,133 @@ } // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); } - public drop_partition_args() { + public get_index_names_result() { } - public drop_partition_args( - String db_name, - String tbl_name, - List part_vals, - boolean deleteData) + public get_index_names_result( + List success, + MetaException o2) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.success = success; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public drop_partition_args(drop_partition_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); + public get_index_names_result(get_index_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); } - this.part_vals = __this__part_vals; + this.success = __this__success; } - this.deleteData = other.deleteData; + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } } - public drop_partition_args deepCopy() { - return new drop_partition_args(this); + public get_index_names_result deepCopy() { + return new get_index_names_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - setDeleteDataIsSet(false); - this.deleteData = false; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; + this.success = null; + this.o2 = null; } - public void unsetDb_name() { - this.db_name = null; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); } + this.success.add(elem); } - public String getTbl_name() { - return this.tbl_name; + public List getSuccess() { + return this.success; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setSuccess(List success) { + this.success = success; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setTbl_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); + this.success = null; } - this.part_vals.add(elem); } - public List getPart_vals() { - return this.part_vals; + public MetaException getO2() { + return this.o2; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setO2(MetaException o2) { + this.o2 = o2; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetO2() { + this.o2 = null; } - /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; } - public void setPart_valsIsSet(boolean value) { + public void setO2IsSet(boolean value) { if (!value) { - this.part_vals = null; + this.o2 = null; } } - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); - } - - /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ - public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: + case SUCCESS: if (value == null) { - unsetPart_vals(); + unsetSuccess(); } else { - setPart_vals((List)value); + setSuccess((List)value); } break; - case DELETE_DATA: + case O2: if (value == null) { - unsetDeleteData(); + unsetO2(); } else { - setDeleteData((Boolean)value); + setO2((MetaException)value); } break; @@ -21181,17 +44100,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); + case SUCCESS: + return getSuccess(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case O2: + return getO2(); } throw new IllegalStateException(); @@ -21204,14 +44117,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case DELETE_DATA: - return isSetDeleteData(); + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -21220,48 +44129,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_partition_args) - return this.equals((drop_partition_args)that); + if (that instanceof get_index_names_result) + return this.equals((get_index_names_result)that); return false; } - public boolean equals(drop_partition_args that) { + public boolean equals(get_index_names_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) + 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.part_vals.equals(that.part_vals)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) return false; - if (this.deleteData != that.deleteData) + if (!this.o2.equals(that.o2)) return false; } @@ -21273,50 +44164,30 @@ return 0; } - public int compareTo(drop_partition_args other) { + public int compareTo(get_index_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_partition_args typedOther = (drop_partition_args)other; + get_index_names_result typedOther = (get_index_names_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_vals()) { - lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -21338,30 +44209,16 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS + case 0: // SUCCESS if (field.type == TType.LIST) { { - TList _list96 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list96.size); - for (int _i97 = 0; _i97 < _list96.size; ++_i97) + TList _list217 = iprot.readListBegin(); + this.success = new ArrayList(_list217.size); + for (int _i218 = 0; _i218 < _list217.size; ++_i218) { - String _elem98; - _elem98 = iprot.readString(); - this.part_vals.add(_elem98); + String _elem219; + _elem219 = iprot.readString(); + this.success.add(_elem219); } iprot.readListEnd(); } @@ -21369,10 +44226,10 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 4: // DELETE_DATA - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); + case 1: // O2 + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -21387,70 +44244,48 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter99 : this.part_vals) + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter220 : this.success) { - oprot.writeString(_iter99); + oprot.writeString(_iter220); } oprot.writeListEnd(); } oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_args("); + StringBuilder sb = new StringBuilder("get_index_names_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("o2:"); + if (this.o2 == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.o2); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -21461,22 +44296,19 @@ } - public static class drop_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_partition_result"); + public static class get_user_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_user_privilege_set_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)1); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)2); - private boolean success; - private NoSuchObjectException o1; - private MetaException o2; + private String user_name; + private List group_names; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + USER_NAME((short)1, "user_name"), + GROUP_NAMES((short)2, "group_names"); private static final Map byName = new HashMap(); @@ -21491,12 +44323,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // USER_NAME + return USER_NAME; + case 2: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -21537,155 +44367,133 @@ } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_user_privilege_set_args.class, metaDataMap); } - public drop_partition_result() { + public get_user_privilege_set_args() { } - public drop_partition_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) + public get_user_privilege_set_args( + String user_name, + List group_names) { this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public drop_partition_result(drop_partition_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + public get_user_privilege_set_args(get_user_privilege_set_args other) { + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; } } - public drop_partition_result deepCopy() { - return new drop_partition_result(this); + public get_user_privilege_set_args deepCopy() { + return new get_user_privilege_set_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); + this.user_name = null; + this.group_names = null; } - public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + public String getUser_name() { + return this.user_name; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + public void unsetUser_name() { + this.user_name = null; } - public NoSuchObjectException getO1() { - return this.o1; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } } - public void unsetO1() { - this.o1 = null; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); } + this.group_names.add(elem); } - public MetaException getO2() { - return this.o2; + public List getGroup_names() { + return this.group_names; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetO2() { - this.o2 = null; + public void unsetGroup_names() { + this.group_names = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; } - public void setO2IsSet(boolean value) { + public void setGroup_namesIsSet(boolean value) { if (!value) { - this.o2 = null; + this.group_names = null; } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; + } - case O1: + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_NAME: if (value == null) { - unsetO1(); + unsetUser_name(); } else { - setO1((NoSuchObjectException)value); + setUser_name((String)value); } break; - case O2: + case GROUP_NAMES: if (value == null) { - unsetO2(); + unsetGroup_names(); } else { - setO2((MetaException)value); + setGroup_names((List)value); } break; @@ -21694,14 +44502,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return new Boolean(isSuccess()); - - case O1: - return getO1(); + case USER_NAME: + return getUser_name(); - case O2: - return getO2(); + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -21714,12 +44519,10 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -21728,39 +44531,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_partition_result) - return this.equals((drop_partition_result)that); + if (that instanceof get_user_privilege_set_args) + return this.equals((get_user_privilege_set_args)that); return false; } - public boolean equals(drop_partition_result that) { + public boolean equals(get_user_privilege_set_args that) { if (that == null) return false; - 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 != 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)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) return false; - if (!this.o2.equals(that.o2)) + if (!this.group_names.equals(that.group_names)) return false; } @@ -21772,40 +44566,30 @@ return 0; } - public int compareTo(drop_partition_result other) { + public int compareTo(get_user_privilege_set_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_partition_result typedOther = (drop_partition_result)other; + get_user_privilege_set_args typedOther = (get_user_privilege_set_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -21827,26 +44611,26 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case 1: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 2: // GROUP_NAMES + if (field.type == TType.LIST) { + { + TList _list221 = iprot.readListBegin(); + this.group_names = new ArrayList(_list221.size); + for (int _i222 = 0; _i222 < _list221.size; ++_i222) + { + String _elem223; + _elem223 = iprot.readString(); + this.group_names.add(_elem223); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -21861,19 +44645,24 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter224 : this.group_names) + { + oprot.writeString(_iter224); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -21882,26 +44671,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_result("); + StringBuilder sb = new StringBuilder("get_user_privilege_set_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("group_names:"); + if (this.group_names == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.group_names); } first = false; sb.append(")"); @@ -21914,25 +44699,19 @@ } - public static class drop_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_partition_by_name_args"); + public static class get_user_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_user_privilege_set_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); - private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private String part_name; - private boolean deleteData; + private PrincipalPrivilegeSet success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"), - DELETE_DATA((short)4, "deleteData"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -21947,14 +44726,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; - case 4: // DELETE_DATA - return DELETE_DATA; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -21995,194 +44770,113 @@ } // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_user_privilege_set_result.class, metaDataMap); } - public drop_partition_by_name_args() { + public get_user_privilege_set_result() { } - public drop_partition_by_name_args( - String db_name, - String tbl_name, - String part_name, - boolean deleteData) + public get_user_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public drop_partition_by_name_args(drop_partition_by_name_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public get_user_privilege_set_result(get_user_privilege_set_result other) { + if (other.isSetSuccess()) { + this.success = new PrincipalPrivilegeSet(other.success); } - if (other.isSetPart_name()) { - this.part_name = other.part_name; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - this.deleteData = other.deleteData; } - public drop_partition_by_name_args deepCopy() { - return new drop_partition_by_name_args(this); + public get_user_privilege_set_result deepCopy() { + return new get_user_privilege_set_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - setDeleteDataIsSet(false); - this.deleteData = false; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } + this.success = null; + this.o1 = null; } - public String getPart_name() { - return this.part_name; + public PrincipalPrivilegeSet getSuccess() { + return this.success; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setSuccess(PrincipalPrivilegeSet success) { + this.success = success; } - public void unsetPart_name() { - this.part_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setPart_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.part_name = null; + this.success = null; } } - public boolean isDeleteData() { - return this.deleteData; + public MetaException getO1() { + return this.o1; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + public void unsetO1() { + this.o1 = null; } - /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ - public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: + case SUCCESS: if (value == null) { - unsetPart_name(); + unsetSuccess(); } else { - setPart_name((String)value); + setSuccess((PrincipalPrivilegeSet)value); } break; - case DELETE_DATA: + case O1: if (value == null) { - unsetDeleteData(); + unsetO1(); } else { - setDeleteData((Boolean)value); + setO1((MetaException)value); } break; @@ -22191,17 +44885,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); + case SUCCESS: + return getSuccess(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -22214,14 +44902,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - case DELETE_DATA: - return isSetDeleteData(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -22230,48 +44914,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_partition_by_name_args) - return this.equals((drop_partition_by_name_args)that); + if (that instanceof get_user_privilege_set_result) + return this.equals((get_user_privilege_set_result)that); return false; } - public boolean equals(drop_partition_by_name_args that) { + public boolean equals(get_user_privilege_set_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) + 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.part_name.equals(that.part_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + 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.deleteData != that.deleteData) + if (!this.o1.equals(that.o1)) return false; } @@ -22283,50 +44949,30 @@ return 0; } - public int compareTo(drop_partition_by_name_args other) { + public int compareTo(get_user_privilege_set_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_partition_by_name_args typedOther = (drop_partition_by_name_args)other; + get_user_privilege_set_result typedOther = (get_user_privilege_set_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -22348,31 +44994,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_NAME - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: // DELETE_DATA - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -22387,63 +45020,41 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); + StringBuilder sb = new StringBuilder("get_user_privilege_set_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -22454,22 +45065,22 @@ } - public static class drop_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_partition_by_name_result"); + public static class get_db_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_db_privilege_set_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)2); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)3); - private boolean success; - private NoSuchObjectException o1; - private MetaException o2; + private String db_name; + private String user_name; + private List group_names; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + DB_NAME((short)1, "db_name"), + USER_NAME((short)2, "user_name"), + GROUP_NAMES((short)3, "group_names"); private static final Map byName = new HashMap(); @@ -22484,12 +45095,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // USER_NAME + return USER_NAME; + case 3: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -22530,155 +45141,172 @@ } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_db_privilege_set_args.class, metaDataMap); } - public drop_partition_by_name_result() { + public get_db_privilege_set_args() { } - public drop_partition_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) + public get_db_privilege_set_args( + String db_name, + String user_name, + List group_names) { this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; + this.db_name = db_name; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public drop_partition_by_name_result(drop_partition_by_name_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + public get_db_privilege_set_args(get_db_privilege_set_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; } } - public drop_partition_by_name_result deepCopy() { - return new drop_partition_by_name_result(this); + public get_db_privilege_set_args deepCopy() { + return new get_db_privilege_set_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; + this.db_name = null; + this.user_name = null; + this.group_names = null; } - public boolean isSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } } - public NoSuchObjectException getO1() { - return this.o1; + public String getUser_name() { + return this.user_name; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetO1() { - this.o1 = null; + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setO1IsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.user_name = null; } } - public MetaException getO2() { - return this.o2; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public void setO2(MetaException o2) { - this.o2 = o2; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void unsetO2() { - this.o2 = null; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + public List getGroup_names() { + return this.group_names; } - public void setO2IsSet(boolean value) { + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { if (!value) { - this.o2 = null; + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Boolean)value); + setDb_name((String)value); } break; - case O1: + case USER_NAME: if (value == null) { - unsetO1(); + unsetUser_name(); } else { - setO1((NoSuchObjectException)value); + setUser_name((String)value); } break; - case O2: + case GROUP_NAMES: if (value == null) { - unsetO2(); + unsetGroup_names(); } else { - setO2((MetaException)value); + setGroup_names((List)value); } break; @@ -22687,14 +45315,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return new Boolean(isSuccess()); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case USER_NAME: + return getUser_name(); - case O2: - return getO2(); + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -22707,12 +45335,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -22721,39 +45349,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_partition_by_name_result) - return this.equals((drop_partition_by_name_result)that); + if (that instanceof get_db_privilege_set_args) + return this.equals((get_db_privilege_set_args)that); return false; } - public boolean equals(drop_partition_by_name_result that) { + public boolean equals(get_db_privilege_set_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (this.success != that.success) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) return false; - if (!this.o2.equals(that.o2)) + if (!this.group_names.equals(that.group_names)) return false; } @@ -22765,40 +45393,40 @@ return 0; } - public int compareTo(drop_partition_by_name_result other) { + public int compareTo(get_db_privilege_set_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_partition_by_name_result typedOther = (drop_partition_by_name_result)other; + get_db_privilege_set_args typedOther = (get_db_privilege_set_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -22820,26 +45448,33 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case 2: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 3: // GROUP_NAMES + if (field.type == TType.LIST) { + { + TList _list225 = iprot.readListBegin(); + this.group_names = new ArrayList(_list225.size); + for (int _i226 = 0; _i226 < _list225.size; ++_i226) + { + String _elem227; + _elem227 = iprot.readString(); + this.group_names.add(_elem227); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -22854,19 +45489,29 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter228 : this.group_names) + { + oprot.writeString(_iter228); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22875,26 +45520,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); + StringBuilder sb = new StringBuilder("get_db_privilege_set_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("group_names:"); + if (this.group_names == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.group_names); } first = false; sb.append(")"); @@ -22907,22 +45556,19 @@ } - public static class get_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_args"); - - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + public static class get_db_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_db_privilege_set_result"); - private String db_name; - private String tbl_name; - private List part_vals; + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private PrincipalPrivilegeSet success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -22937,12 +45583,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -22987,168 +45631,109 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_db_privilege_set_result.class, metaDataMap); } - public get_partition_args() { + public get_db_privilege_set_result() { } - public get_partition_args( - String db_name, - String tbl_name, - List part_vals) + public get_db_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_partition_args(get_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public get_db_privilege_set_result(get_db_privilege_set_result other) { + if (other.isSetSuccess()) { + this.success = new PrincipalPrivilegeSet(other.success); } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public get_partition_args deepCopy() { - return new get_partition_args(this); + public get_db_privilege_set_result deepCopy() { + return new get_db_privilege_set_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } + this.success = null; + this.o1 = null; } - public String getTbl_name() { - return this.tbl_name; + public PrincipalPrivilegeSet getSuccess() { + return this.success; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setSuccess(PrincipalPrivilegeSet success) { + this.success = success; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setTbl_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); + this.success = null; } - this.part_vals.add(elem); } - public List getPart_vals() { - return this.part_vals; + public MetaException getO1() { + return this.o1; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setPart_valsIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.part_vals = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((PrincipalPrivilegeSet)value); } break; - case PART_VALS: + case O1: if (value == null) { - unsetPart_vals(); + unsetO1(); } else { - setPart_vals((List)value); + setO1((MetaException)value); } break; @@ -23157,14 +45742,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return getSuccess(); - case PART_VALS: - return getPart_vals(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -23177,12 +45759,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -23191,39 +45771,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_args) - return this.equals((get_partition_args)that); + if (that instanceof get_db_privilege_set_result) + return this.equals((get_db_privilege_set_result)that); return false; } - public boolean equals(get_partition_args that) { + public boolean equals(get_db_privilege_set_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) + 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.part_vals.equals(that.part_vals)) + if (!this.o1.equals(that.o1)) return false; } @@ -23235,40 +45806,30 @@ return 0; } - public int compareTo(get_partition_args other) { + public int compareTo(get_db_privilege_set_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partition_args typedOther = (get_partition_args)other; + get_db_privilege_set_result typedOther = (get_db_privilege_set_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_vals()) { - lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -23290,33 +45851,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // PART_VALS - if (field.type == TType.LIST) { - { - TList _list100 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list100.size); - for (int _i101 = 0; _i101 < _list100.size; ++_i101) - { - String _elem102; - _elem102 = iprot.readString(); - this.part_vals.add(_elem102); - } - iprot.readListEnd(); - } + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -23329,31 +45875,17 @@ iprot.readStructEnd(); validate(); } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter103 : this.part_vals) - { - oprot.writeString(_iter103); - } - oprot.writeListEnd(); - } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -23362,30 +45894,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_args("); + StringBuilder sb = new StringBuilder("get_db_privilege_set_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.o1); } first = false; sb.append(")"); @@ -23398,22 +45922,25 @@ } - public static class get_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_result"); + public static class get_table_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_privilege_set_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)3); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)4); - private Partition success; - private MetaException o1; - private NoSuchObjectException o2; + private String db_name; + private String table_name; + private String user_name; + private List group_names; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"), + USER_NAME((short)3, "user_name"), + GROUP_NAMES((short)4, "group_names"); private static final Map byName = new HashMap(); @@ -23428,12 +45955,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // USER_NAME + return USER_NAME; + case 4: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -23478,148 +46007,207 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_table_privilege_set_args.class, metaDataMap); } - public get_partition_result() { + public get_table_privilege_set_args() { } - public get_partition_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) + public get_table_privilege_set_args( + String db_name, + String table_name, + String user_name, + List group_names) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.db_name = db_name; + this.table_name = table_name; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public get_partition_result(get_partition_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); + public get_table_privilege_set_args(get_table_privilege_set_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetTable_name()) { + this.table_name = other.table_name; } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; } } - public get_partition_result deepCopy() { - return new get_partition_result(this); + public get_table_privilege_set_args deepCopy() { + return new get_table_privilege_set_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; + this.db_name = null; + this.table_name = null; + this.user_name = null; + this.group_names = null; } - public Partition getSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(Partition success) { - this.success = success; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - this.success = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setSuccessIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.db_name = null; } } - public MetaException getO1() { - return this.o1; + public String getTable_name() { + return this.table_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public void unsetO1() { - this.o1 = null; + public void unsetTable_name() { + this.table_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; } - public void setO1IsSet(boolean value) { + public void setTable_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.table_name = null; } } - public NoSuchObjectException getO2() { - return this.o2; + public String getUser_name() { + return this.user_name; } - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetO2() { - this.o2 = null; + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setO2IsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.user_name = null; + } + } + + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); + } + + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); + } + + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); + } + + public List getGroup_names() { + return this.group_names; + } + + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { + if (!value) { + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Partition)value); + setDb_name((String)value); } break; - case O1: + case TABLE_NAME: if (value == null) { - unsetO1(); + unsetTable_name(); } else { - setO1((MetaException)value); + setTable_name((String)value); } break; - case O2: + case USER_NAME: if (value == null) { - unsetO2(); + unsetUser_name(); } else { - setO2((NoSuchObjectException)value); + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -23628,14 +46216,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TABLE_NAME: + return getTable_name(); - case O2: - return getO2(); + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -23648,12 +46239,14 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -23662,39 +46255,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_result) - return this.equals((get_partition_result)that); + if (that instanceof get_table_privilege_set_args) + return this.equals((get_table_privilege_set_args)that); return false; } - public boolean equals(get_partition_result that) { + public boolean equals(get_table_privilege_set_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) return false; - if (!this.success.equals(that.success)) + if (!this.table_name.equals(that.table_name)) 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)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) return false; - if (!this.o2.equals(that.o2)) + if (!this.group_names.equals(that.group_names)) return false; } @@ -23706,40 +46308,50 @@ return 0; } - public int compareTo(get_partition_result other) { + public int compareTo(get_table_privilege_set_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partition_result typedOther = (get_partition_result)other; + get_table_privilege_set_args typedOther = (get_table_privilege_set_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -23761,26 +46373,40 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); + case 3: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // GROUP_NAMES + if (field.type == TType.LIST) { + { + TList _list229 = iprot.readListBegin(); + this.group_names = new ArrayList(_list229.size); + for (int _i230 = 0; _i230 < _list229.size; ++_i230) + { + String _elem231; + _elem231 = iprot.readString(); + this.group_names.add(_elem231); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -23795,19 +46421,34 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter232 : this.group_names) + { + oprot.writeString(_iter232); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -23816,30 +46457,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_result("); + StringBuilder sb = new StringBuilder("get_table_privilege_set_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("table_name:"); + if (this.table_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.table_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); } first = false; sb.append(")"); @@ -23852,22 +46501,19 @@ } - public static class get_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_args"); + public static class get_table_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_privilege_set_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private String part_name; + private PrincipalPrivilegeSet success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -23882,12 +46528,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -23932,148 +46576,109 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_table_privilege_set_result.class, metaDataMap); } - public get_partition_by_name_args() { + public get_table_privilege_set_result() { } - public get_partition_by_name_args( - String db_name, - String tbl_name, - String part_name) + public get_table_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_partition_by_name_args(get_partition_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public get_table_privilege_set_result(get_table_privilege_set_result other) { + if (other.isSetSuccess()) { + this.success = new PrincipalPrivilegeSet(other.success); } - if (other.isSetPart_name()) { - this.part_name = other.part_name; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public get_partition_by_name_args deepCopy() { - return new get_partition_by_name_args(this); + public get_table_privilege_set_result deepCopy() { + return new get_table_privilege_set_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_name = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } + this.success = null; + this.o1 = null; } - public String getTbl_name() { - return this.tbl_name; + public PrincipalPrivilegeSet getSuccess() { + return this.success; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setSuccess(PrincipalPrivilegeSet success) { + this.success = success; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setTbl_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.success = null; } } - public String getPart_name() { - return this.part_name; + public MetaException getO1() { + return this.o1; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetPart_name() { - this.part_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setPart_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.part_name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; + this.o1 = null; + } + } - case TBL_NAME: + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((PrincipalPrivilegeSet)value); } break; - case PART_NAME: + case O1: if (value == null) { - unsetPart_name(); + unsetO1(); } else { - setPart_name((String)value); + setO1((MetaException)value); } break; @@ -24082,14 +46687,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return getSuccess(); - case PART_NAME: - return getPart_name(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -24102,12 +46704,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -24116,39 +46716,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_by_name_args) - return this.equals((get_partition_by_name_args)that); + if (that instanceof get_table_privilege_set_result) + return this.equals((get_table_privilege_set_result)that); return false; } - public boolean equals(get_partition_by_name_args that) { + public boolean equals(get_table_privilege_set_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) + 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.part_name.equals(that.part_name)) + if (!this.o1.equals(that.o1)) return false; } @@ -24160,40 +46751,30 @@ return 0; } - public int compareTo(get_partition_by_name_args other) { + public int compareTo(get_table_privilege_set_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partition_by_name_args typedOther = (get_partition_by_name_args)other; + get_table_privilege_set_result typedOther = (get_table_privilege_set_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -24215,23 +46796,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // PART_NAME - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -24246,22 +46822,15 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); oprot.writeFieldEnd(); - } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -24270,30 +46839,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_by_name_args("); + StringBuilder sb = new StringBuilder("get_table_privilege_set_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.o1); } first = false; sb.append(")"); @@ -24306,22 +46867,28 @@ } - public static class get_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_result"); + public static class get_partition_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_privilege_set_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)4); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)5); - private Partition success; - private MetaException o1; - private NoSuchObjectException o2; + private String db_name; + private String table_name; + private String part_name; + private String user_name; + private List group_names; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"), + PART_NAME((short)3, "part_name"), + USER_NAME((short)4, "user_name"), + GROUP_NAMES((short)5, "group_names"); private static final Map byName = new HashMap(); @@ -24336,12 +46903,16 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // USER_NAME + return USER_NAME; + case 5: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -24386,148 +46957,246 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_privilege_set_args.class, metaDataMap); } - public get_partition_by_name_result() { + public get_partition_privilege_set_args() { } - public get_partition_by_name_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) + public get_partition_privilege_set_args( + String db_name, + String table_name, + String part_name, + String user_name, + List group_names) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public get_partition_by_name_result(get_partition_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Partition(other.success); + public get_partition_privilege_set_args(get_partition_privilege_set_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetTable_name()) { + this.table_name = other.table_name; } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; } } - public get_partition_by_name_result deepCopy() { - return new get_partition_by_name_result(this); + public get_partition_privilege_set_args deepCopy() { + return new get_partition_privilege_set_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + this.part_name = null; + this.user_name = null; + this.group_names = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; + } + + public void unsetTable_name() { + this.table_name = null; + } + + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; } - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } } - public Partition getSuccess() { - return this.success; + public String getPart_name() { + return this.part_name; } - public void setSuccess(Partition success) { - this.success = success; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetSuccess() { - this.success = null; + public void unsetPart_name() { + this.part_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setSuccessIsSet(boolean value) { + public void setPart_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.part_name = null; } } - public MetaException getO1() { - return this.o1; + public String getUser_name() { + return this.user_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetO1() { - this.o1 = null; + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setO1IsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.user_name = null; } } - public NoSuchObjectException getO2() { - return this.o2; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void unsetO2() { - this.o2 = null; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + public List getGroup_names() { + return this.group_names; } - public void setO2IsSet(boolean value) { + public void setGroup_names(List group_names) { + this.group_names = group_names; + } + + public void unsetGroup_names() { + this.group_names = null; + } + + /** Returns true if field group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; + } + + public void setGroup_namesIsSet(boolean value) { if (!value) { - this.o2 = null; + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Partition)value); + setDb_name((String)value); } break; - case O1: + case TABLE_NAME: if (value == null) { - unsetO1(); + unsetTable_name(); } else { - setO1((MetaException)value); + setTable_name((String)value); } break; - case O2: + case PART_NAME: if (value == null) { - unsetO2(); + unsetPart_name(); } else { - setO2((NoSuchObjectException)value); + setPart_name((String)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -24536,14 +47205,20 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TABLE_NAME: + return getTable_name(); - case O2: - return getO2(); + case PART_NAME: + return getPart_name(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -24556,12 +47231,16 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case PART_NAME: + return isSetPart_name(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -24570,39 +47249,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_by_name_result) - return this.equals((get_partition_by_name_result)that); + if (that instanceof get_partition_privilege_set_args) + return this.equals((get_partition_privilege_set_args)that); return false; } - public boolean equals(get_partition_by_name_result that) { + public boolean equals(get_partition_privilege_set_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.table_name.equals(that.table_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) return false; } @@ -24614,40 +47311,60 @@ return 0; } - public int compareTo(get_partition_by_name_result other) { + public int compareTo(get_partition_privilege_set_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partition_by_name_result typedOther = (get_partition_by_name_result)other; + get_partition_privilege_set_args typedOther = (get_partition_privilege_set_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -24669,26 +47386,47 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // GROUP_NAMES + if (field.type == TType.LIST) { + { + TList _list233 = iprot.readListBegin(); + this.group_names = new ArrayList(_list233.size); + for (int _i234 = 0; _i234 < _list233.size; ++_i234) + { + String _elem235; + _elem235 = iprot.readString(); + this.group_names.add(_elem235); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -24703,19 +47441,39 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter236 : this.group_names) + { + oprot.writeString(_iter236); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -24724,30 +47482,46 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_by_name_result("); + StringBuilder sb = new StringBuilder("get_partition_privilege_set_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("table_name:"); + if (this.table_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.table_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); } first = false; sb.append(")"); @@ -24760,22 +47534,19 @@ } - public static class get_partitions_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partitions_args"); + public static class get_partition_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_privilege_set_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private short max_parts; + private PrincipalPrivilegeSet success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_PARTS((short)3, "max_parts"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -24790,12 +47561,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_PARTS - return MAX_PARTS; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -24836,157 +47605,113 @@ } // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_privilege_set_result.class, metaDataMap); } - public get_partitions_args() { - this.max_parts = (short)-1; - + public get_partition_privilege_set_result() { } - public get_partitions_args( - String db_name, - String tbl_name, - short max_parts) + public get_partition_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - setMax_partsIsSet(true); + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_partitions_args(get_partitions_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public get_partition_privilege_set_result(get_partition_privilege_set_result other) { + if (other.isSetSuccess()) { + this.success = new PrincipalPrivilegeSet(other.success); } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - this.max_parts = other.max_parts; } - public get_partitions_args deepCopy() { - return new get_partitions_args(this); + public get_partition_privilege_set_result deepCopy() { + return new get_partition_privilege_set_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_parts = (short)-1; - + this.success = null; + this.o1 = null; } - public String getDb_name() { - return this.db_name; + public PrincipalPrivilegeSet getSuccess() { + return this.success; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setSuccess(PrincipalPrivilegeSet success) { + this.success = success; } - public void unsetDb_name() { - this.db_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setDb_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.db_name = null; + this.success = null; } } - public String getTbl_name() { - return this.tbl_name; + public MetaException getO1() { + return this.o1; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTbl_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.o1 = null; } } - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); - } - - /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ - public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((PrincipalPrivilegeSet)value); } break; - case MAX_PARTS: + case O1: if (value == null) { - unsetMax_parts(); + unsetO1(); } else { - setMax_parts((Short)value); + setO1((MetaException)value); } break; @@ -24995,14 +47720,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return getSuccess(); - case MAX_PARTS: - return new Short(getMax_parts()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -25015,12 +47737,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -25029,39 +47749,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partitions_args) - return this.equals((get_partitions_args)that); + if (that instanceof get_partition_privilege_set_result) + return this.equals((get_partition_privilege_set_result)that); return false; } - public boolean equals(get_partitions_args that) { + public boolean equals(get_partition_privilege_set_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) + 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.max_parts != that.max_parts) + if (!this.o1.equals(that.o1)) return false; } @@ -25073,40 +47784,30 @@ return 0; } - public int compareTo(get_partitions_args other) { + public int compareTo(get_partition_privilege_set_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partitions_args typedOther = (get_partitions_args)other; + get_partition_privilege_set_result typedOther = (get_partition_privilege_set_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -25128,24 +47829,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // MAX_PARTS - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -25160,50 +47855,41 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_args("); + StringBuilder sb = new StringBuilder("get_partition_privilege_set_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -25214,22 +47900,31 @@ } - public static class get_partitions_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partitions_result"); + public static class get_column_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_column_privilege_set_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField COLUMN_NAME_FIELD_DESC = new TField("column_name", TType.STRING, (short)4); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)5); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)6); - private List success; - private NoSuchObjectException o1; - private MetaException o2; + private String db_name; + private String table_name; + private String part_name; + private String column_name; + private String user_name; + private List group_names; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_name"), + PART_NAME((short)3, "part_name"), + COLUMN_NAME((short)4, "column_name"), + USER_NAME((short)5, "user_name"), + GROUP_NAMES((short)6, "group_names"); private static final Map byName = new HashMap(); @@ -25244,12 +47939,18 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // DB_NAME + return DB_NAME; + case 2: // TABLE_NAME + return TABLE_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // COLUMN_NAME + return COLUMN_NAME; + case 5: // USER_NAME + return USER_NAME; + case 6: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -25294,168 +47995,285 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.COLUMN_NAME, new FieldMetaData("column_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_column_privilege_set_args.class, metaDataMap); } - public get_partitions_result() { + public get_column_privilege_set_args() { } - public get_partitions_result( - List success, - NoSuchObjectException o1, - MetaException o2) + public get_column_privilege_set_args( + String db_name, + String table_name, + String part_name, + String column_name, + String user_name, + List group_names) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; + this.column_name = column_name; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public get_partitions_result(get_partitions_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; + public get_column_privilege_set_args(get_column_privilege_set_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + if (other.isSetTable_name()) { + this.table_name = other.table_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetColumn_name()) { + this.column_name = other.column_name; + } + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; } } - public get_partitions_result deepCopy() { - return new get_partitions_result(this); + public get_column_privilege_set_args deepCopy() { + return new get_column_privilege_set_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; + this.db_name = null; + this.table_name = null; + this.part_name = null; + this.column_name = null; + this.user_name = null; + this.group_names = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public String getDb_name() { + return this.db_name; } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; } - this.success.add(elem); } - public List getSuccess() { - return this.success; + public String getTable_name() { + return this.table_name; } - public void setSuccess(List success) { - this.success = success; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public void unsetSuccess() { - this.success = null; + public void unsetTable_name() { + this.table_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; } - public void setSuccessIsSet(boolean value) { + public void setTable_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.table_name = null; } } - public NoSuchObjectException getO1() { - return this.o1; + public String getPart_name() { + return this.part_name; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetO1() { - this.o1 = null; + public void unsetPart_name() { + this.part_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public String getColumn_name() { + return this.column_name; + } + + public void setColumn_name(String column_name) { + this.column_name = column_name; + } + + public void unsetColumn_name() { + this.column_name = null; + } + + /** Returns true if field column_name is set (has been asigned a value) and false otherwise */ + public boolean isSetColumn_name() { + return this.column_name != null; + } + + public void setColumn_nameIsSet(boolean value) { + if (!value) { + this.column_name = null; + } + } + + public String getUser_name() { + return this.user_name; + } + + public void setUser_name(String user_name) { + this.user_name = user_name; + } + + public void unsetUser_name() { + this.user_name = null; + } + + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; + } + + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } + } + + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); + } + + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); } + this.group_names.add(elem); } - public MetaException getO2() { - return this.o2; + public List getGroup_names() { + return this.group_names; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetO2() { - this.o2 = null; + public void unsetGroup_names() { + this.group_names = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; } - public void setO2IsSet(boolean value) { + public void setGroup_namesIsSet(boolean value) { if (!value) { - this.o2 = null; + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((List)value); + setDb_name((String)value); } break; - case O1: + case TABLE_NAME: if (value == null) { - unsetO1(); + unsetTable_name(); } else { - setO1((NoSuchObjectException)value); + setTable_name((String)value); } break; - case O2: + case PART_NAME: if (value == null) { - unsetO2(); + unsetPart_name(); } else { - setO2((MetaException)value); + setPart_name((String)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumn_name(); + } else { + setColumn_name((String)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -25464,14 +48282,23 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TABLE_NAME: + return getTable_name(); - case O2: - return getO2(); + case PART_NAME: + return getPart_name(); + + case COLUMN_NAME: + return getColumn_name(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -25484,12 +48311,18 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case PART_NAME: + return isSetPart_name(); + case COLUMN_NAME: + return isSetColumn_name(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -25498,39 +48331,66 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partitions_result) - return this.equals((get_partitions_result)that); + if (that instanceof get_column_privilege_set_args) + return this.equals((get_column_privilege_set_args)that); return false; } - public boolean equals(get_partitions_result that) { + public boolean equals(get_column_privilege_set_args 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) 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)) + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.table_name.equals(that.table_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_column_name = true && this.isSetColumn_name(); + boolean that_present_column_name = true && that.isSetColumn_name(); + if (this_present_column_name || that_present_column_name) { + if (!(this_present_column_name && that_present_column_name)) + return false; + if (!this.column_name.equals(that.column_name)) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) return false; } @@ -25542,40 +48402,70 @@ return 0; } - public int compareTo(get_partitions_result other) { + public int compareTo(get_column_privilege_set_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partitions_result typedOther = (get_partitions_result)other; + get_column_privilege_set_args typedOther = (get_column_privilege_set_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(typedOther.isSetColumn_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn_name()) { + lastComparison = TBaseHelper.compareTo(this.column_name, typedOther.column_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -25597,36 +48487,54 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list104 = iprot.readListBegin(); - this.success = new ArrayList(_list104.size); - for (int _i105 = 0; _i105 < _list104.size; ++_i105) - { - Partition _elem106; - _elem106 = new Partition(); - _elem106.read(iprot); - this.success.add(_elem106); - } - iprot.readListEnd(); - } + case 1: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case 2: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // COLUMN_NAME + if (field.type == TType.STRING) { + this.column_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // GROUP_NAMES + if (field.type == TType.LIST) { + { + TList _list237 = iprot.readListBegin(); + this.group_names = new ArrayList(_list237.size); + for (int _i238 = 0; _i238 < _list237.size; ++_i238) + { + String _elem239; + _elem239 = iprot.readString(); + this.group_names.add(_elem239); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -25636,32 +48544,50 @@ } iprot.readFieldEnd(); } - iprot.readStructEnd(); - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + if (this.column_name != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(this.column_name); + oprot.writeFieldEnd(); + } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter107 : this.success) + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter240 : this.group_names) { - _iter107.write(oprot); + oprot.writeString(_iter240); } oprot.writeListEnd(); } oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -25669,30 +48595,54 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_result("); + StringBuilder sb = new StringBuilder("get_column_privilege_set_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("table_name:"); + if (this.table_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.table_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("column_name:"); + if (this.column_name == null) { + sb.append("null"); + } else { + sb.append(this.column_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); } first = false; sb.append(")"); @@ -25705,22 +48655,19 @@ } - public static class get_partition_names_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_args"); + public static class get_column_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_column_privilege_set_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private short max_parts; + private PrincipalPrivilegeSet success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_PARTS((short)3, "max_parts"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -25735,12 +48682,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_PARTS - return MAX_PARTS; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -25781,157 +48726,113 @@ } // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_column_privilege_set_result.class, metaDataMap); } - public get_partition_names_args() { - this.max_parts = (short)-1; - + public get_column_privilege_set_result() { } - public get_partition_names_args( - String db_name, - String tbl_name, - short max_parts) + public get_column_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - setMax_partsIsSet(true); + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_partition_names_args(get_partition_names_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public get_column_privilege_set_result(get_column_privilege_set_result other) { + if (other.isSetSuccess()) { + this.success = new PrincipalPrivilegeSet(other.success); } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - this.max_parts = other.max_parts; } - public get_partition_names_args deepCopy() { - return new get_partition_names_args(this); + public get_column_privilege_set_result deepCopy() { + return new get_column_privilege_set_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_parts = (short)-1; - + this.success = null; + this.o1 = null; } - public String getDb_name() { - return this.db_name; + public PrincipalPrivilegeSet getSuccess() { + return this.success; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setSuccess(PrincipalPrivilegeSet success) { + this.success = success; } - public void unsetDb_name() { - this.db_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setDb_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.db_name = null; + this.success = null; } } - public String getTbl_name() { - return this.tbl_name; + public MetaException getO1() { + return this.o1; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTbl_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.o1 = null; } } - public short getMax_parts() { - return this.max_parts; - } - - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); - } - - /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ - public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); - } - - public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((PrincipalPrivilegeSet)value); } break; - case MAX_PARTS: + case O1: if (value == null) { - unsetMax_parts(); + unsetO1(); } else { - setMax_parts((Short)value); + setO1((MetaException)value); } break; @@ -25940,14 +48841,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return getSuccess(); - case MAX_PARTS: - return new Short(getMax_parts()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -25960,12 +48858,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -25974,39 +48870,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_names_args) - return this.equals((get_partition_names_args)that); + if (that instanceof get_column_privilege_set_result) + return this.equals((get_column_privilege_set_result)that); return false; } - public boolean equals(get_partition_names_args that) { + public boolean equals(get_column_privilege_set_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) + 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.max_parts != that.max_parts) + if (!this.o1.equals(that.o1)) return false; } @@ -26018,40 +48905,30 @@ return 0; } - public int compareTo(get_partition_names_args other) { + public int compareTo(get_column_privilege_set_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } - int lastComparison = 0; - get_partition_names_args typedOther = (get_partition_names_args)other; - - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + int lastComparison = 0; + get_column_privilege_set_result typedOther = (get_column_privilege_set_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -26073,24 +48950,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // MAX_PARTS - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -26105,50 +48976,41 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_args("); + StringBuilder sb = new StringBuilder("get_column_privilege_set_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -26159,19 +49021,22 @@ } - public static class get_partition_names_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_result"); + public static class create_role_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_role_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); + private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField OWNER_NAME_FIELD_DESC = new TField("owner_name", TType.STRING, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)3); - private List success; - private MetaException o2; + private String role_name; + private String owner_name; + private String db_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O2((short)1, "o2"); + ROLE_NAME((short)1, "role_name"), + OWNER_NAME((short)2, "owner_name"), + DB_NAME((short)3, "db_name"); private static final Map byName = new HashMap(); @@ -26186,10 +49051,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O2 - return O2; + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // OWNER_NAME + return OWNER_NAME; + case 3: // DB_NAME + return DB_NAME; default: return null; } @@ -26234,129 +49101,148 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.OWNER_NAME, new FieldMetaData("owner_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(create_role_args.class, metaDataMap); } - public get_partition_names_result() { + public create_role_args() { } - public get_partition_names_result( - List success, - MetaException o2) + public create_role_args( + String role_name, + String owner_name, + String db_name) { this(); - this.success = success; - this.o2 = o2; + this.role_name = role_name; + this.owner_name = owner_name; + this.db_name = db_name; } /** * Performs a deep copy on other. */ - public get_partition_names_result(get_partition_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; + public create_role_args(create_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetOwner_name()) { + this.owner_name = other.owner_name; + } + if (other.isSetDb_name()) { + this.db_name = other.db_name; } } - public get_partition_names_result deepCopy() { - return new get_partition_names_result(this); + public create_role_args deepCopy() { + return new create_role_args(this); } @Override public void clear() { - this.success = null; - this.o2 = null; + this.role_name = null; + this.owner_name = null; + this.db_name = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public String getRole_name() { + return this.role_name; } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); + public void unsetRole_name() { + this.role_name = null; + } + + /** Returns true if field role_name is set (has been asigned a value) and false otherwise */ + public boolean isSetRole_name() { + return this.role_name != null; + } + + public void setRole_nameIsSet(boolean value) { + if (!value) { + this.role_name = null; } - this.success.add(elem); } - public List getSuccess() { - return this.success; + public String getOwner_name() { + return this.owner_name; } - public void setSuccess(List success) { - this.success = success; + public void setOwner_name(String owner_name) { + this.owner_name = owner_name; } - public void unsetSuccess() { - this.success = null; + public void unsetOwner_name() { + this.owner_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field owner_name is set (has been asigned a value) and false otherwise */ + public boolean isSetOwner_name() { + return this.owner_name != null; } - public void setSuccessIsSet(boolean value) { + public void setOwner_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.owner_name = null; } } - public MetaException getO2() { - return this.o2; + public String getDb_name() { + return this.db_name; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO2() { - this.o2 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO2IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.db_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case ROLE_NAME: if (value == null) { - unsetSuccess(); + unsetRole_name(); } else { - setSuccess((List)value); + setRole_name((String)value); } break; - case O2: + case OWNER_NAME: if (value == null) { - unsetO2(); + unsetOwner_name(); } else { - setO2((MetaException)value); + setOwner_name((String)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } break; @@ -26365,11 +49251,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case ROLE_NAME: + return getRole_name(); - case O2: - return getO2(); + case OWNER_NAME: + return getOwner_name(); + + case DB_NAME: + return getDb_name(); } throw new IllegalStateException(); @@ -26382,10 +49271,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O2: - return isSetO2(); + case ROLE_NAME: + return isSetRole_name(); + case OWNER_NAME: + return isSetOwner_name(); + case DB_NAME: + return isSetDb_name(); } throw new IllegalStateException(); } @@ -26394,30 +49285,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_names_result) - return this.equals((get_partition_names_result)that); + if (that instanceof create_role_args) + return this.equals((create_role_args)that); return false; } - public boolean equals(get_partition_names_result that) { + public boolean equals(create_role_args 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)) + boolean this_present_role_name = true && this.isSetRole_name(); + boolean that_present_role_name = true && that.isSetRole_name(); + if (this_present_role_name || that_present_role_name) { + if (!(this_present_role_name && that_present_role_name)) return false; - if (!this.success.equals(that.success)) + if (!this.role_name.equals(that.role_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_owner_name = true && this.isSetOwner_name(); + boolean that_present_owner_name = true && that.isSetOwner_name(); + if (this_present_owner_name || that_present_owner_name) { + if (!(this_present_owner_name && that_present_owner_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.owner_name.equals(that.owner_name)) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) return false; } @@ -26429,30 +49329,40 @@ return 0; } - public int compareTo(get_partition_names_result other) { + public int compareTo(create_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partition_names_result typedOther = (get_partition_names_result)other; + create_role_args typedOther = (create_role_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetRole_name()) { + lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwner_name()).compareTo(typedOther.isSetOwner_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwner_name()) { + lastComparison = TBaseHelper.compareTo(this.owner_name, typedOther.owner_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } @@ -26474,27 +49384,23 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list108 = iprot.readListBegin(); - this.success = new ArrayList(_list108.size); - for (int _i109 = 0; _i109 < _list108.size; ++_i109) - { - String _elem110; - _elem110 = iprot.readString(); - this.success.add(_elem110); - } - iprot.readListEnd(); - } + case 1: // ROLE_NAME + if (field.type == TType.STRING) { + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 2: // OWNER_NAME + if (field.type == TType.STRING) { + this.owner_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -26509,22 +49415,22 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter111 : this.success) - { - oprot.writeString(_iter111); - } - oprot.writeListEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.owner_name != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(this.owner_name); + oprot.writeFieldEnd(); + } + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -26533,22 +49439,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_result("); + StringBuilder sb = new StringBuilder("create_role_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.role_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("owner_name:"); + if (this.owner_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.owner_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); } first = false; sb.append(")"); @@ -26561,25 +49475,19 @@ } - public static class get_partitions_ps_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_args"); + public static class create_role_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_role_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); - private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private List part_vals; - private short max_parts; + private boolean success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - MAX_PARTS((short)4, "max_parts"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -26594,14 +49502,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // MAX_PARTS - return MAX_PARTS; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -26642,216 +49546,116 @@ } // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(create_role_result.class, metaDataMap); } - public get_partitions_ps_args() { - this.max_parts = (short)-1; - + public create_role_result() { } - public get_partitions_ps_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts) + public create_role_result( + boolean success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - setMax_partsIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_partitions_ps_args(get_partitions_ps_args other) { + public create_role_result(create_role_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - this.max_parts = other.max_parts; } - public get_partitions_ps_args deepCopy() { - return new get_partitions_ps_args(this); + public create_role_result deepCopy() { + return new create_role_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.max_parts = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; - } - - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } - } - - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); - } - - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); - } - - public List getPart_vals() { - return this.part_vals; - } - - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + setSuccessIsSet(false); + this.success = false; + this.o1 = null; } - public void unsetPart_vals() { - this.part_vals = null; + public boolean isSuccess() { + return this.success; } - /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); } - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - public short getMax_parts() { - return this.max_parts; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + public MetaException getO1() { + return this.o1; } - /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ - public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + public void setO1(MetaException o1) { + this.o1 = o1; } - public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + public void unsetO1() { + this.o1 = null; } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: + /** Returns true if field o1 is set (has been asigned 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) { - unsetPart_vals(); + unsetSuccess(); } else { - setPart_vals((List)value); + setSuccess((Boolean)value); } break; - case MAX_PARTS: + case O1: if (value == null) { - unsetMax_parts(); + unsetO1(); } else { - setMax_parts((Short)value); + setO1((MetaException)value); } break; @@ -26860,17 +49664,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); + case SUCCESS: + return new Boolean(isSuccess()); - case MAX_PARTS: - return new Short(getMax_parts()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -26883,14 +49681,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -26899,48 +49693,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partitions_ps_args) - return this.equals((get_partitions_ps_args)that); + if (that instanceof create_role_result) + return this.equals((create_role_result)that); return false; } - public boolean equals(get_partitions_ps_args that) { + public boolean equals(create_role_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) + 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.part_vals.equals(that.part_vals)) + if (this.success != that.success) return false; } - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) + 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.max_parts != that.max_parts) + if (!this.o1.equals(that.o1)) return false; } @@ -26952,50 +49728,30 @@ return 0; } - public int compareTo(get_partitions_ps_args other) { + public int compareTo(create_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partitions_ps_args typedOther = (get_partitions_ps_args)other; + create_role_result typedOther = (create_role_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_vals()) { - lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -27017,41 +49773,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == TType.LIST) { - { - TList _list112 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list112.size); - for (int _i113 = 0; _i113 < _list112.size; ++_i113) - { - String _elem114; - _elem114 = iprot.readString(); - this.part_vals.add(_elem114); - } - iprot.readListEnd(); - } + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: // MAX_PARTS - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -27066,70 +49799,37 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter115 : this.part_vals) - { - oprot.writeString(_iter115); - } - oprot.writeListEnd(); - } + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_ps_args("); + StringBuilder sb = new StringBuilder("create_role_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -27140,19 +49840,19 @@ } - public static class get_partitions_ps_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_result"); + public static class drop_role_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_role_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)2); - private List success; - private MetaException o1; + private String role_name; + private String db_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + ROLE_NAME((short)1, "role_name"), + DB_NAME((short)2, "db_name"); private static final Map byName = new HashMap(); @@ -27167,10 +49867,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // DB_NAME + return DB_NAME; default: return null; } @@ -27215,129 +49915,109 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_role_args.class, metaDataMap); } - public get_partitions_ps_result() { + public drop_role_args() { } - public get_partitions_ps_result( - List success, - MetaException o1) + public drop_role_args( + String role_name, + String db_name) { this(); - this.success = success; - this.o1 = o1; + this.role_name = role_name; + this.db_name = db_name; } /** * Performs a deep copy on other. */ - public get_partitions_ps_result(get_partitions_ps_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; + public drop_role_args(drop_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } } - public get_partitions_ps_result deepCopy() { - return new get_partitions_ps_result(this); + public drop_role_args deepCopy() { + return new drop_role_args(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(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + this.role_name = null; + this.db_name = null; } - public List getSuccess() { - return this.success; + public String getRole_name() { + return this.role_name; } - public void setSuccess(List success) { - this.success = success; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void unsetSuccess() { - this.success = null; + public void unsetRole_name() { + this.role_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field role_name is set (has been asigned a value) and false otherwise */ + public boolean isSetRole_name() { + return this.role_name != null; } - public void setSuccessIsSet(boolean value) { + public void setRole_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.role_name = null; } } - public MetaException getO1() { - return this.o1; + public String getDb_name() { + return this.db_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO1IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case ROLE_NAME: if (value == null) { - unsetSuccess(); + unsetRole_name(); } else { - setSuccess((List)value); + setRole_name((String)value); } break; - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((MetaException)value); + setDb_name((String)value); } break; @@ -27346,11 +50026,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case ROLE_NAME: + return getRole_name(); - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); } throw new IllegalStateException(); @@ -27363,10 +50043,10 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case ROLE_NAME: + return isSetRole_name(); + case DB_NAME: + return isSetDb_name(); } throw new IllegalStateException(); } @@ -27375,30 +50055,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partitions_ps_result) - return this.equals((get_partitions_ps_result)that); + if (that instanceof drop_role_args) + return this.equals((drop_role_args)that); return false; } - public boolean equals(get_partitions_ps_result that) { + public boolean equals(drop_role_args 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)) + boolean this_present_role_name = true && this.isSetRole_name(); + boolean that_present_role_name = true && that.isSetRole_name(); + if (this_present_role_name || that_present_role_name) { + if (!(this_present_role_name && that_present_role_name)) return false; - if (!this.success.equals(that.success)) + if (!this.role_name.equals(that.role_name)) 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)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } @@ -27410,30 +50090,30 @@ return 0; } - public int compareTo(get_partitions_ps_result other) { + public int compareTo(drop_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partitions_ps_result typedOther = (get_partitions_ps_result)other; + drop_role_args typedOther = (drop_role_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetRole_name()) { + lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } @@ -27455,28 +50135,16 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list116 = iprot.readListBegin(); - this.success = new ArrayList(_list116.size); - for (int _i117 = 0; _i117 < _list116.size; ++_i117) - { - Partition _elem118; - _elem118 = new Partition(); - _elem118.read(iprot); - this.success.add(_elem118); - } - iprot.readListEnd(); - } + case 1: // ROLE_NAME + if (field.type == TType.STRING) { + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -27491,22 +50159,17 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter119 : this.success) - { - _iter119.write(oprot); - } - oprot.writeListEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -27515,22 +50178,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_ps_result("); + StringBuilder sb = new StringBuilder("drop_role_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.role_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; sb.append(")"); @@ -27543,25 +50206,19 @@ } - public static class get_partition_names_ps_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_ps_args"); + public static class drop_role_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_role_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); - private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private List part_vals; - private short max_parts; + private boolean success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - MAX_PARTS((short)4, "max_parts"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -27576,14 +50233,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // PART_VALS - return PART_VALS; - case 4: // MAX_PARTS - return MAX_PARTS; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -27624,216 +50277,116 @@ } // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_role_result.class, metaDataMap); } - public get_partition_names_ps_args() { - this.max_parts = (short)-1; - + public drop_role_result() { } - public get_partition_names_ps_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts) + public drop_role_result( + boolean success, + MetaException o1) { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_partition_names_ps_args(get_partition_names_ps_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); - } - this.part_vals = __this__part_vals; - } - this.max_parts = other.max_parts; - } - - public get_partition_names_ps_args deepCopy() { - return new get_partition_names_ps_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.part_vals = null; - this.max_parts = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; - } - - public void unsetTbl_name() { - this.tbl_name = null; - } - - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; } - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; + /** + * Performs a deep copy on other. + */ + public drop_role_result(drop_role_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); - } - - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); + public drop_role_result deepCopy() { + return new drop_role_result(this); } - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; } - public List getPart_vals() { - return this.part_vals; + public boolean isSuccess() { + return this.success; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_vals() { - return this.part_vals != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setPart_valsIsSet(boolean value) { - if (!value) { - this.part_vals = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } - public short getMax_parts() { - return this.max_parts; + public MetaException getO1() { + return this.o1; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + public void unsetO1() { + this.o1 = null; } - /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ - public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_VALS: + case SUCCESS: if (value == null) { - unsetPart_vals(); + unsetSuccess(); } else { - setPart_vals((List)value); + setSuccess((Boolean)value); } break; - case MAX_PARTS: + case O1: if (value == null) { - unsetMax_parts(); + unsetO1(); } else { - setMax_parts((Short)value); + setO1((MetaException)value); } break; @@ -27842,17 +50395,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case PART_VALS: - return getPart_vals(); + case SUCCESS: + return new Boolean(isSuccess()); - case MAX_PARTS: - return new Short(getMax_parts()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -27865,14 +50412,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -27881,48 +50424,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_names_ps_args) - return this.equals((get_partition_names_ps_args)that); + if (that instanceof drop_role_result) + return this.equals((drop_role_result)that); return false; } - public boolean equals(get_partition_names_ps_args that) { + public boolean equals(drop_role_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_part_vals = true && this.isSetPart_vals(); - boolean that_present_part_vals = true && that.isSetPart_vals(); - if (this_present_part_vals || that_present_part_vals) { - if (!(this_present_part_vals && that_present_part_vals)) + 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.part_vals.equals(that.part_vals)) + if (this.success != that.success) return false; } - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) + 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.max_parts != that.max_parts) + if (!this.o1.equals(that.o1)) return false; } @@ -27934,50 +50459,30 @@ return 0; } - public int compareTo(get_partition_names_ps_args other) { + public int compareTo(drop_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partition_names_ps_args typedOther = (get_partition_names_ps_args)other; + drop_role_result typedOther = (drop_role_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_vals()) { - lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -27999,41 +50504,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // PART_VALS - if (field.type == TType.LIST) { - { - TList _list120 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list120.size); - for (int _i121 = 0; _i121 < _list120.size; ++_i121) - { - String _elem122; - _elem122 = iprot.readString(); - this.part_vals.add(_elem122); - } - iprot.readListEnd(); - } + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: // MAX_PARTS - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -28048,70 +50530,37 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter123 : this.part_vals) - { - oprot.writeString(_iter123); - } - oprot.writeListEnd(); - } + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_ps_args("); + StringBuilder sb = new StringBuilder("drop_role_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -28122,19 +50571,28 @@ } - public static class get_partition_names_ps_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_ps_result"); + public static class add_role_member_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_role_member_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)4); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)5); - private List success; - private MetaException o1; + private String role_name; + private String user_name; + private boolean is_role; + private boolean is_group; + private String db_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + ROLE_NAME((short)1, "role_name"), + USER_NAME((short)2, "user_name"), + IS_ROLE((short)3, "is_role"), + IS_GROUP((short)4, "is_group"), + DB_NAME((short)5, "db_name"); private static final Map byName = new HashMap(); @@ -28149,10 +50607,16 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // USER_NAME + return USER_NAME; + case 3: // IS_ROLE + return IS_ROLE; + case 4: // IS_GROUP + return IS_GROUP; + case 5: // DB_NAME + return DB_NAME; default: return null; } @@ -28193,133 +50657,233 @@ } // isset id assignments + private static final int __IS_ROLE_ISSET_ID = 0; + private static final int __IS_GROUP_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_role_member_args.class, metaDataMap); } - public get_partition_names_ps_result() { + public add_role_member_args() { } - public get_partition_names_ps_result( - List success, - MetaException o1) + public add_role_member_args( + String role_name, + String user_name, + boolean is_role, + boolean is_group, + String db_name) { this(); - this.success = success; - this.o1 = o1; + this.role_name = role_name; + this.user_name = user_name; + this.is_role = is_role; + setIs_roleIsSet(true); + this.is_group = is_group; + setIs_groupIsSet(true); + this.db_name = db_name; } /** * Performs a deep copy on other. */ - public get_partition_names_ps_result(get_partition_names_ps_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; + public add_role_member_args(add_role_member_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + this.is_role = other.is_role; + this.is_group = other.is_group; + if (other.isSetDb_name()) { + this.db_name = other.db_name; } } - public get_partition_names_ps_result deepCopy() { - return new get_partition_names_ps_result(this); + public add_role_member_args deepCopy() { + return new add_role_member_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; + this.role_name = null; + this.user_name = null; + setIs_roleIsSet(false); + this.is_role = false; + setIs_groupIsSet(false); + this.is_group = false; + this.db_name = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public String getRole_name() { + return this.role_name; } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); + public void unsetRole_name() { + this.role_name = null; + } + + /** Returns true if field role_name is set (has been asigned a value) and false otherwise */ + public boolean isSetRole_name() { + return this.role_name != null; + } + + public void setRole_nameIsSet(boolean value) { + if (!value) { + this.role_name = null; } - this.success.add(elem); } - public List getSuccess() { - return this.success; + public String getUser_name() { + return this.user_name; } - public void setSuccess(List success) { - this.success = success; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetSuccess() { - this.success = null; + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setSuccessIsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.user_name = null; } } - public MetaException getO1() { - return this.o1; + public boolean isIs_role() { + return this.is_role; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); } - public void unsetO1() { - this.o1 = null; + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); } - public void setO1IsSet(boolean value) { + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); + } + + public boolean isIs_group() { + return this.is_group; + } + + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); + } + + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); + } + + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); + } + + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case ROLE_NAME: if (value == null) { - unsetSuccess(); + unsetRole_name(); } else { - setSuccess((List)value); + setRole_name((String)value); } break; - case O1: + case USER_NAME: if (value == null) { - unsetO1(); + unsetUser_name(); } else { - setO1((MetaException)value); + setUser_name((String)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIs_group(); + } else { + setIs_group((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } break; @@ -28328,11 +50892,20 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case ROLE_NAME: + return getRole_name(); - case O1: - return getO1(); + case USER_NAME: + return getUser_name(); + + case IS_ROLE: + return new Boolean(isIs_role()); + + case IS_GROUP: + return new Boolean(isIs_group()); + + case DB_NAME: + return getDb_name(); } throw new IllegalStateException(); @@ -28345,10 +50918,16 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case ROLE_NAME: + return isSetRole_name(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case DB_NAME: + return isSetDb_name(); } throw new IllegalStateException(); } @@ -28357,30 +50936,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_names_ps_result) - return this.equals((get_partition_names_ps_result)that); + if (that instanceof add_role_member_args) + return this.equals((add_role_member_args)that); return false; } - public boolean equals(get_partition_names_ps_result that) { + public boolean equals(add_role_member_args 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)) + boolean this_present_role_name = true && this.isSetRole_name(); + boolean that_present_role_name = true && that.isSetRole_name(); + if (this_present_role_name || that_present_role_name) { + if (!(this_present_role_name && that_present_role_name)) + return false; + if (!this.role_name.equals(that.role_name)) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.success.equals(that.success)) + if (this.is_role != that.is_role) 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)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) return false; } @@ -28392,30 +50998,60 @@ return 0; } - public int compareTo(get_partition_names_ps_result other) { + public int compareTo(add_role_member_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partition_names_ps_result typedOther = (get_partition_names_ps_result)other; + add_role_member_args typedOther = (add_role_member_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetRole_name()) { + lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } @@ -28437,27 +51073,39 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list124 = iprot.readListBegin(); - this.success = new ArrayList(_list124.size); - for (int _i125 = 0; _i125 < _list124.size; ++_i125) - { - String _elem126; - _elem126 = iprot.readString(); - this.success.add(_elem126); - } - iprot.readListEnd(); - } + case 1: // ROLE_NAME + if (field.type == TType.STRING) { + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -28472,22 +51120,28 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter127 : this.success) - { - oprot.writeString(_iter127); - } - oprot.writeListEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -28496,22 +51150,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); + StringBuilder sb = new StringBuilder("add_role_member_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.role_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); } first = false; sb.append(")"); @@ -28524,25 +51194,19 @@ } - public static class get_partitions_by_filter_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partitions_by_filter_args"); + public static class add_role_member_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_role_member_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRING, (short)3); - private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private String filter; - private short max_parts; + private boolean success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - FILTER((short)3, "filter"), - MAX_PARTS((short)4, "max_parts"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -28557,14 +51221,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // FILTER - return FILTER; - case 4: // MAX_PARTS - return MAX_PARTS; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -28605,196 +51265,116 @@ } // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_role_member_result.class, metaDataMap); } - public get_partitions_by_filter_args() { - this.max_parts = (short)-1; - + public add_role_member_result() { } - public get_partitions_by_filter_args( - String db_name, - String tbl_name, - String filter, - short max_parts) + public add_role_member_result( + boolean success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - setMax_partsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public get_partitions_by_filter_args(get_partitions_by_filter_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetFilter()) { - this.filter = other.filter; - } - this.max_parts = other.max_parts; - } - - public get_partitions_by_filter_args deepCopy() { - return new get_partitions_by_filter_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.filter = null; - this.max_parts = (short)-1; - - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } - } - - public String getTbl_name() { - return this.tbl_name; - } - - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; } - public void unsetTbl_name() { - this.tbl_name = null; + /** + * Performs a deep copy on other. + */ + public add_role_member_result(add_role_member_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + public add_role_member_result deepCopy() { + return new add_role_member_result(this); } - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; } - public String getFilter() { - return this.filter; + public boolean isSuccess() { + return this.success; } - public void setFilter(String filter) { - this.filter = filter; + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); } - public void unsetFilter() { - this.filter = null; + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - /** Returns true if field filter is set (has been asigned a value) and false otherwise */ - public boolean isSetFilter() { - return this.filter != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setFilterIsSet(boolean value) { - if (!value) { - this.filter = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } - public short getMax_parts() { - return this.max_parts; + public MetaException getO1() { + return this.o1; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + public void unsetO1() { + this.o1 = null; } - /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ - public boolean isSetMax_parts() { - return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case FILTER: + case SUCCESS: if (value == null) { - unsetFilter(); + unsetSuccess(); } else { - setFilter((String)value); + setSuccess((Boolean)value); } break; - case MAX_PARTS: + case O1: if (value == null) { - unsetMax_parts(); + unsetO1(); } else { - setMax_parts((Short)value); + setO1((MetaException)value); } break; @@ -28803,17 +51383,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case FILTER: - return getFilter(); + case SUCCESS: + return new Boolean(isSuccess()); - case MAX_PARTS: - return new Short(getMax_parts()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -28826,14 +51400,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case FILTER: - return isSetFilter(); - case MAX_PARTS: - return isSetMax_parts(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -28842,48 +51412,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partitions_by_filter_args) - return this.equals((get_partitions_by_filter_args)that); + if (that instanceof add_role_member_result) + return this.equals((add_role_member_result)that); return false; } - public boolean equals(get_partitions_by_filter_args that) { + public boolean equals(add_role_member_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_filter = true && this.isSetFilter(); - boolean that_present_filter = true && that.isSetFilter(); - if (this_present_filter || that_present_filter) { - if (!(this_present_filter && that_present_filter)) + 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.filter.equals(that.filter)) + if (this.success != that.success) return false; } - boolean this_present_max_parts = true; - boolean that_present_max_parts = true; - if (this_present_max_parts || that_present_max_parts) { - if (!(this_present_max_parts && that_present_max_parts)) + 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.max_parts != that.max_parts) + if (!this.o1.equals(that.o1)) return false; } @@ -28895,50 +51447,30 @@ return 0; } - public int compareTo(get_partitions_by_filter_args other) { + public int compareTo(add_role_member_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partitions_by_filter_args typedOther = (get_partitions_by_filter_args)other; + add_role_member_result typedOther = (add_role_member_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetFilter()) { - lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -28960,31 +51492,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // FILTER - if (field.type == TType.STRING) { - this.filter = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: // MAX_PARTS - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -28999,63 +51518,37 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } - if (this.filter != null) { - oprot.writeFieldBegin(FILTER_FIELD_DESC); - oprot.writeString(this.filter); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); + StringBuilder sb = new StringBuilder("add_role_member_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("filter:"); - if (this.filter == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.filter); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -29066,22 +51559,28 @@ } - public static class get_partitions_by_filter_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partitions_by_filter_result"); + public static class remove_role_member_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("remove_role_member_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)4); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)5); - private List success; - private MetaException o1; - private NoSuchObjectException o2; + private String role_name; + private String user_name; + private boolean is_role; + private boolean is_group; + private String db_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + ROLE_NAME((short)1, "role_name"), + USER_NAME((short)2, "user_name"), + IS_ROLE((short)3, "is_role"), + IS_GROUP((short)4, "is_group"), + DB_NAME((short)5, "db_name"); private static final Map byName = new HashMap(); @@ -29096,12 +51595,16 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // USER_NAME + return USER_NAME; + case 3: // IS_ROLE + return IS_ROLE; + case 4: // IS_GROUP + return IS_GROUP; + case 5: // DB_NAME + return DB_NAME; default: return null; } @@ -29142,172 +51645,233 @@ } // isset id assignments + private static final int __IS_ROLE_ISSET_ID = 0; + private static final int __IS_GROUP_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(remove_role_member_args.class, metaDataMap); } - public get_partitions_by_filter_result() { + public remove_role_member_args() { } - public get_partitions_by_filter_result( - List success, - MetaException o1, - NoSuchObjectException o2) + public remove_role_member_args( + String role_name, + String user_name, + boolean is_role, + boolean is_group, + String db_name) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.role_name = role_name; + this.user_name = user_name; + this.is_role = is_role; + setIs_roleIsSet(true); + this.is_group = is_group; + setIs_groupIsSet(true); + this.db_name = db_name; } /** * Performs a deep copy on other. */ - public get_partitions_by_filter_result(get_partitions_by_filter_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; + public remove_role_member_args(remove_role_member_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + this.is_role = other.is_role; + this.is_group = other.is_group; + if (other.isSetDb_name()) { + this.db_name = other.db_name; } } - public get_partitions_by_filter_result deepCopy() { - return new get_partitions_by_filter_result(this); + public remove_role_member_args deepCopy() { + return new remove_role_member_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; + this.role_name = null; + this.user_name = null; + setIs_roleIsSet(false); + this.is_role = false; + setIs_groupIsSet(false); + this.is_group = false; + this.db_name = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public String getRole_name() { + return this.role_name; } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); + public void unsetRole_name() { + this.role_name = null; + } + + /** Returns true if field role_name is set (has been asigned a value) and false otherwise */ + public boolean isSetRole_name() { + return this.role_name != null; + } + + public void setRole_nameIsSet(boolean value) { + if (!value) { + this.role_name = null; } - this.success.add(elem); } - public List getSuccess() { - return this.success; + public String getUser_name() { + return this.user_name; } - public void setSuccess(List success) { - this.success = success; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetSuccess() { - this.success = null; + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setSuccessIsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.user_name = null; } } - public MetaException getO1() { - return this.o1; + public boolean isIs_role() { + return this.is_role; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); } - public void unsetO1() { - this.o1 = null; + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); } - public NoSuchObjectException getO2() { - return this.o2; + public boolean isIs_group() { + return this.is_group; } - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); } - public void unsetO2() { - this.o2 = null; + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); } - public void setO2IsSet(boolean value) { + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.db_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case ROLE_NAME: if (value == null) { - unsetSuccess(); + unsetRole_name(); } else { - setSuccess((List)value); + setRole_name((String)value); } break; - case O1: + case USER_NAME: if (value == null) { - unsetO1(); + unsetUser_name(); } else { - setO1((MetaException)value); + setUser_name((String)value); } break; - case O2: + case IS_ROLE: if (value == null) { - unsetO2(); + unsetIs_role(); } else { - setO2((NoSuchObjectException)value); + setIs_role((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIs_group(); + } else { + setIs_group((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } break; @@ -29316,14 +51880,20 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case ROLE_NAME: + return getRole_name(); - case O1: - return getO1(); + case USER_NAME: + return getUser_name(); - case O2: - return getO2(); + case IS_ROLE: + return new Boolean(isIs_role()); + + case IS_GROUP: + return new Boolean(isIs_group()); + + case DB_NAME: + return getDb_name(); } throw new IllegalStateException(); @@ -29336,12 +51906,16 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case ROLE_NAME: + return isSetRole_name(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case DB_NAME: + return isSetDb_name(); } throw new IllegalStateException(); } @@ -29350,39 +51924,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partitions_by_filter_result) - return this.equals((get_partitions_by_filter_result)that); + if (that instanceof remove_role_member_args) + return this.equals((remove_role_member_args)that); return false; } - public boolean equals(get_partitions_by_filter_result that) { + public boolean equals(remove_role_member_args 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)) + boolean this_present_role_name = true && this.isSetRole_name(); + boolean that_present_role_name = true && that.isSetRole_name(); + if (this_present_role_name || that_present_role_name) { + if (!(this_present_role_name && that_present_role_name)) return false; - if (!this.success.equals(that.success)) + if (!this.role_name.equals(that.role_name)) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) + return false; + if (this.is_role != that.is_role) 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)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_group != that.is_group) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.db_name.equals(that.db_name)) return false; } @@ -29394,44 +51986,64 @@ return 0; } - public int compareTo(get_partitions_by_filter_result other) { + public int compareTo(remove_role_member_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partitions_by_filter_result typedOther = (get_partitions_by_filter_result)other; + remove_role_member_args typedOther = (remove_role_member_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetRole_name()) { + lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); if (lastComparison != 0) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -29449,36 +52061,39 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list128 = iprot.readListBegin(); - this.success = new ArrayList(_list128.size); - for (int _i129 = 0; _i129 < _list128.size; ++_i129) - { - Partition _elem130; - _elem130 = new Partition(); - _elem130.read(iprot); - this.success.add(_elem130); - } - iprot.readListEnd(); - } + case 1: // ROLE_NAME + if (field.type == TType.STRING) { + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); + case 3: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -29493,26 +52108,28 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter131 : this.success) - { - _iter131.write(oprot); - } - oprot.writeListEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -29521,30 +52138,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); + StringBuilder sb = new StringBuilder("remove_role_member_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.role_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.db_name); } first = false; sb.append(")"); @@ -29557,22 +52182,19 @@ } - public static class alter_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_partition_args"); + public static class remove_role_member_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("remove_role_member_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private Partition new_part; + private boolean success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - NEW_PART((short)3, "new_part"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -29587,12 +52209,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // NEW_PART - return NEW_PART; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -29633,152 +52253,116 @@ } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(remove_role_member_result.class, metaDataMap); } - public alter_partition_args() { + public remove_role_member_result() { } - public alter_partition_args( - String db_name, - String tbl_name, - Partition new_part) + public remove_role_member_result( + boolean success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; } /** * Performs a deep copy on other. */ - public alter_partition_args(alter_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); + public remove_role_member_result(remove_role_member_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public alter_partition_args deepCopy() { - return new alter_partition_args(this); + public remove_role_member_result deepCopy() { + return new remove_role_member_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.new_part = null; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; - } - - public void unsetDb_name() { - this.db_name = null; - } - - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; - } - - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } + setSuccessIsSet(false); + this.success = false; + this.o1 = null; } - public String getTbl_name() { - return this.tbl_name; + public boolean isSuccess() { + return this.success; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } - public Partition getNew_part() { - return this.new_part; + public MetaException getO1() { + return this.o1; } - public void setNew_part(Partition new_part) { - this.new_part = new_part; + public void setO1(MetaException o1) { + this.o1 = o1; } - - public void unsetNew_part() { - this.new_part = null; + + public void unsetO1() { + this.o1 = null; } - /** Returns true if field new_part is set (has been asigned a value) and false otherwise */ - public boolean isSetNew_part() { - return this.new_part != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setNew_partIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.new_part = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((Boolean)value); } break; - case NEW_PART: + case O1: if (value == null) { - unsetNew_part(); + unsetO1(); } else { - setNew_part((Partition)value); + setO1((MetaException)value); } break; @@ -29787,14 +52371,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return new Boolean(isSuccess()); - case NEW_PART: - return getNew_part(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -29807,12 +52388,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_PART: - return isSetNew_part(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -29821,39 +52400,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_partition_args) - return this.equals((alter_partition_args)that); + if (that instanceof remove_role_member_result) + return this.equals((remove_role_member_result)that); return false; } - public boolean equals(alter_partition_args that) { + public boolean equals(remove_role_member_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (this.success != that.success) return false; } - boolean this_present_new_part = true && this.isSetNew_part(); - boolean that_present_new_part = true && that.isSetNew_part(); - if (this_present_new_part || that_present_new_part) { - if (!(this_present_new_part && that_present_new_part)) + 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.new_part.equals(that.new_part)) + if (!this.o1.equals(that.o1)) return false; } @@ -29865,40 +52435,30 @@ return 0; } - public int compareTo(alter_partition_args other) { + public int compareTo(remove_role_member_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_partition_args typedOther = (alter_partition_args)other; + remove_role_member_result typedOther = (remove_role_member_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_part()) { - lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -29920,24 +52480,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // NEW_PART + case 1: // O1 if (field.type == TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -29952,22 +52506,15 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -29976,30 +52523,18 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_partition_args("); + StringBuilder sb = new StringBuilder("remove_role_member_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("new_part:"); - if (this.new_part == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.new_part); + sb.append(this.o1); } first = false; sb.append(")"); @@ -30012,19 +52547,25 @@ } - public static class alter_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_partition_result"); + public static class list_roles_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_roles_args"); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); - private InvalidOperationException o1; - private MetaException o2; + private String principal_name; + private boolean is_role; + private boolean is_group; + private String db_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); + PRINCIPAL_NAME((short)1, "principal_name"), + IS_ROLE((short)2, "is_role"), + IS_GROUP((short)3, "is_group"), + DB_NAME((short)4, "db_name"); private static final Map byName = new HashMap(); @@ -30039,10 +52580,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; + case 4: // DB_NAME + return DB_NAME; default: return null; } @@ -30083,113 +52628,194 @@ } // isset id assignments + private static final int __IS_ROLE_ISSET_ID = 0; + private static final int __IS_GROUP_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_roles_args.class, metaDataMap); } - public alter_partition_result() { + public list_roles_args() { } - public alter_partition_result( - InvalidOperationException o1, - MetaException o2) + public list_roles_args( + String principal_name, + boolean is_role, + boolean is_group, + String db_name) { this(); - this.o1 = o1; - this.o2 = o2; + this.principal_name = principal_name; + this.is_role = is_role; + setIs_roleIsSet(true); + this.is_group = is_group; + setIs_groupIsSet(true); + this.db_name = db_name; } /** * Performs a deep copy on other. */ - public alter_partition_result(alter_partition_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); + public list_roles_args(list_roles_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + this.is_role = other.is_role; + this.is_group = other.is_group; + if (other.isSetDb_name()) { + this.db_name = other.db_name; } } - public alter_partition_result deepCopy() { - return new alter_partition_result(this); + public list_roles_args deepCopy() { + return new list_roles_args(this); } @Override public void clear() { - this.o1 = null; - this.o2 = null; + this.principal_name = null; + setIs_roleIsSet(false); + this.is_role = false; + setIs_groupIsSet(false); + this.is_group = false; + this.db_name = null; + } + + public String getPrincipal_name() { + return this.principal_name; + } + + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } + + public void unsetPrincipal_name() { + this.principal_name = null; + } + + /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; + } + + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; + } + } + + public boolean isIs_role() { + return this.is_role; + } + + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); + } + + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); + } + + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); } - public InvalidOperationException getO1() { - return this.o1; + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); } - public void setO1(InvalidOperationException o1) { - this.o1 = o1; + public boolean isIs_group() { + return this.is_group; } - public void unsetO1() { - this.o1 = null; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); } - public MetaException getO2() { - return this.o2; + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); } - public void setO2(MetaException o2) { - this.o2 = o2; + public String getDb_name() { + return this.db_name; } - public void unsetO2() { - this.o2 = null; + public void setDb_name(String db_name) { + this.db_name = db_name; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + public void unsetDb_name() { + this.db_name = null; } - public void setO2IsSet(boolean value) { + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.db_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: + case PRINCIPAL_NAME: if (value == null) { - unsetO1(); + unsetPrincipal_name(); } else { - setO1((InvalidOperationException)value); + setPrincipal_name((String)value); } break; - case O2: + case IS_ROLE: if (value == null) { - unsetO2(); + unsetIs_role(); } else { - setO2((MetaException)value); + setIs_role((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIs_group(); + } else { + setIs_group((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } break; @@ -30198,11 +52824,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case O2: - return getO2(); + case IS_ROLE: + return new Boolean(isIs_role()); + + case IS_GROUP: + return new Boolean(isIs_group()); + + case DB_NAME: + return getDb_name(); } throw new IllegalStateException(); @@ -30215,10 +52847,14 @@ } switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case DB_NAME: + return isSetDb_name(); } throw new IllegalStateException(); } @@ -30227,30 +52863,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_partition_result) - return this.equals((alter_partition_result)that); + if (that instanceof list_roles_args) + return this.equals((list_roles_args)that); return false; } - public boolean equals(alter_partition_result that) { + public boolean equals(list_roles_args that) { if (that == null) 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)) + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.principal_name.equals(that.principal_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_role != that.is_role) + return false; + } + + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) + return false; + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) return false; } @@ -30262,30 +52916,50 @@ return 0; } - public int compareTo(alter_partition_result other) { + public int compareTo(list_roles_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_partition_result typedOther = (alter_partition_result)other; + list_roles_args typedOther = (list_roles_args)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } @@ -30307,18 +52981,32 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 2: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -30333,15 +53021,23 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -30350,22 +53046,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_partition_result("); + StringBuilder sb = new StringBuilder("list_roles_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.db_name); } first = false; sb.append(")"); @@ -30378,19 +53082,19 @@ } - public static class get_config_value_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_config_value_args"); + public static class list_roles_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_roles_result"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); - private static final TField DEFAULT_VALUE_FIELD_DESC = new TField("defaultValue", TType.STRING, (short)2); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String name; - private String defaultValue; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - NAME((short)1, "name"), - DEFAULT_VALUE((short)2, "defaultValue"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -30405,10 +53109,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // DEFAULT_VALUE - return DEFAULT_VALUE; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -30453,109 +53157,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.DEFAULT_VALUE, new FieldMetaData("defaultValue", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Role.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_roles_result.class, metaDataMap); } - public get_config_value_args() { + public list_roles_result() { } - public get_config_value_args( - String name, - String defaultValue) + public list_roles_result( + List success, + MetaException o1) { this(); - this.name = name; - this.defaultValue = defaultValue; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_config_value_args(get_config_value_args other) { - if (other.isSetName()) { - this.name = other.name; + public list_roles_result(list_roles_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Role other_element : other.success) { + __this__success.add(new Role(other_element)); + } + this.success = __this__success; } - if (other.isSetDefaultValue()) { - this.defaultValue = other.defaultValue; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public get_config_value_args deepCopy() { - return new get_config_value_args(this); + public list_roles_result deepCopy() { + return new list_roles_result(this); } @Override public void clear() { - this.name = null; - this.defaultValue = null; + this.success = null; + this.o1 = null; } - public String getName() { - return this.name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setName(String name) { - this.name = name; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetName() { - this.name = null; + public void addToSuccess(Role elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; + public List getSuccess() { + return this.success; } - public void setNameIsSet(boolean value) { + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { if (!value) { - this.name = null; + this.success = null; } } - public String getDefaultValue() { - return this.defaultValue; + public MetaException getO1() { + return this.o1; } - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetDefaultValue() { - this.defaultValue = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field defaultValue is set (has been asigned a value) and false otherwise */ - public boolean isSetDefaultValue() { - return this.defaultValue != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setDefaultValueIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.defaultValue = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: + case SUCCESS: if (value == null) { - unsetName(); + unsetSuccess(); } else { - setName((String)value); + setSuccess((List)value); } break; - case DEFAULT_VALUE: + case O1: if (value == null) { - unsetDefaultValue(); + unsetO1(); } else { - setDefaultValue((String)value); + setO1((MetaException)value); } break; @@ -30564,11 +53288,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case SUCCESS: + return getSuccess(); - case DEFAULT_VALUE: - return getDefaultValue(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -30581,10 +53305,10 @@ } switch (field) { - case NAME: - return isSetName(); - case DEFAULT_VALUE: - return isSetDefaultValue(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -30593,30 +53317,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_config_value_args) - return this.equals((get_config_value_args)that); + if (that instanceof list_roles_result) + return this.equals((list_roles_result)that); return false; } - public boolean equals(get_config_value_args that) { + public boolean equals(list_roles_result that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + 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.name.equals(that.name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_defaultValue = true && this.isSetDefaultValue(); - boolean that_present_defaultValue = true && that.isSetDefaultValue(); - if (this_present_defaultValue || that_present_defaultValue) { - if (!(this_present_defaultValue && that_present_defaultValue)) + 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.defaultValue.equals(that.defaultValue)) + if (!this.o1.equals(that.o1)) return false; } @@ -30628,30 +53352,30 @@ return 0; } - public int compareTo(get_config_value_args other) { + public int compareTo(list_roles_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_config_value_args typedOther = (get_config_value_args)other; + list_roles_result typedOther = (list_roles_result)other; - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(typedOther.isSetDefaultValue()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetDefaultValue()) { - lastComparison = TBaseHelper.compareTo(this.defaultValue, typedOther.defaultValue); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -30673,16 +53397,28 @@ break; } switch (field.id) { - case 1: // NAME - if (field.type == TType.STRING) { - this.name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list241 = iprot.readListBegin(); + this.success = new ArrayList(_list241.size); + for (int _i242 = 0; _i242 < _list241.size; ++_i242) + { + Role _elem243; + _elem243 = new Role(); + _elem243.read(iprot); + this.success.add(_elem243); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // DEFAULT_VALUE - if (field.type == TType.STRING) { - this.defaultValue = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -30697,17 +53433,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Role _iter244 : this.success) + { + _iter244.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.defaultValue != null) { - oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); - oprot.writeString(this.defaultValue); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -30716,22 +53457,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_args("); + StringBuilder sb = new StringBuilder("list_roles_result("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("defaultValue:"); - if (this.defaultValue == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.defaultValue); + sb.append(this.o1); } first = false; sb.append(")"); @@ -30744,19 +53485,22 @@ } - public static class get_config_value_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_config_value_result"); + public static class list_security_user_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_user_grant_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField PRINCIPLA_NAME_FIELD_DESC = new TField("principla_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); - private String success; - private ConfigValSecurityException o1; + private String principla_name; + private boolean is_role; + private boolean is_group; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + PRINCIPLA_NAME((short)1, "principla_name"), + IS_ROLE((short)2, "is_role"), + IS_GROUP((short)3, "is_group"); private static final Map byName = new HashMap(); @@ -30771,10 +53515,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // PRINCIPLA_NAME + return PRINCIPLA_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; default: return null; } @@ -30815,113 +53561,155 @@ } // isset id assignments + private static final int __IS_ROLE_ISSET_ID = 0; + private static final int __IS_GROUP_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PRINCIPLA_NAME, new FieldMetaData("principla_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_user_grant_args.class, metaDataMap); } - public get_config_value_result() { + public list_security_user_grant_args() { } - public get_config_value_result( - String success, - ConfigValSecurityException o1) + public list_security_user_grant_args( + String principla_name, + boolean is_role, + boolean is_group) { this(); - this.success = success; - this.o1 = o1; + this.principla_name = principla_name; + this.is_role = is_role; + setIs_roleIsSet(true); + this.is_group = is_group; + setIs_groupIsSet(true); } /** * Performs a deep copy on other. */ - public get_config_value_result(get_config_value_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetO1()) { - this.o1 = new ConfigValSecurityException(other.o1); + public list_security_user_grant_args(list_security_user_grant_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipla_name()) { + this.principla_name = other.principla_name; } + this.is_role = other.is_role; + this.is_group = other.is_group; } - public get_config_value_result deepCopy() { - return new get_config_value_result(this); + public list_security_user_grant_args deepCopy() { + return new list_security_user_grant_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; + this.principla_name = null; + setIs_roleIsSet(false); + this.is_role = false; + setIs_groupIsSet(false); + this.is_group = false; } - public String getSuccess() { - return this.success; + public String getPrincipla_name() { + return this.principla_name; } - public void setSuccess(String success) { - this.success = success; + public void setPrincipla_name(String principla_name) { + this.principla_name = principla_name; + } + + public void unsetPrincipla_name() { + this.principla_name = null; + } + + /** Returns true if field principla_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipla_name() { + return this.principla_name != null; + } + + public void setPrincipla_nameIsSet(boolean value) { + if (!value) { + this.principla_name = null; + } + } + + public boolean isIs_role() { + return this.is_role; + } + + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); } - public void unsetSuccess() { - this.success = null; + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); } - public ConfigValSecurityException getO1() { - return this.o1; + public boolean isIs_group() { + return this.is_group; } - public void setO1(ConfigValSecurityException o1) { - this.o1 = o1; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); } - public void unsetO1() { - this.o1 = null; + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case PRINCIPLA_NAME: if (value == null) { - unsetSuccess(); + unsetPrincipla_name(); } else { - setSuccess((String)value); + setPrincipla_name((String)value); } break; - case O1: + case IS_ROLE: if (value == null) { - unsetO1(); + unsetIs_role(); } else { - setO1((ConfigValSecurityException)value); + setIs_role((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIs_group(); + } else { + setIs_group((Boolean)value); } break; @@ -30930,11 +53718,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case PRINCIPLA_NAME: + return getPrincipla_name(); - case O1: - return getO1(); + case IS_ROLE: + return new Boolean(isIs_role()); + + case IS_GROUP: + return new Boolean(isIs_group()); } throw new IllegalStateException(); @@ -30947,10 +53738,12 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case PRINCIPLA_NAME: + return isSetPrincipla_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); } throw new IllegalStateException(); } @@ -30959,30 +53752,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_config_value_result) - return this.equals((get_config_value_result)that); + if (that instanceof list_security_user_grant_args) + return this.equals((list_security_user_grant_args)that); return false; } - public boolean equals(get_config_value_result that) { + public boolean equals(list_security_user_grant_args 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)) + boolean this_present_principla_name = true && this.isSetPrincipla_name(); + boolean that_present_principla_name = true && that.isSetPrincipla_name(); + if (this_present_principla_name || that_present_principla_name) { + if (!(this_present_principla_name && that_present_principla_name)) return false; - if (!this.success.equals(that.success)) + if (!this.principla_name.equals(that.principla_name)) 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)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_role != that.is_role) + return false; + } + + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) + return false; + if (this.is_group != that.is_group) return false; } @@ -30994,34 +53796,44 @@ return 0; } - public int compareTo(get_config_value_result other) { + public int compareTo(list_security_user_grant_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_config_value_result typedOther = (get_config_value_result)other; + list_security_user_grant_args typedOther = (list_security_user_grant_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetPrincipla_name()).compareTo(typedOther.isSetPrincipla_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetPrincipla_name()) { + lastComparison = TBaseHelper.compareTo(this.principla_name, typedOther.principla_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); if (lastComparison != 0) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -31039,17 +53851,25 @@ break; } switch (field.id) { - case 0: // SUCCESS + case 1: // PRINCIPLA_NAME if (field.type == TType.STRING) { - this.success = iprot.readString(); + this.principla_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new ConfigValSecurityException(); - this.o1.read(iprot); + case 2: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -31064,40 +53884,43 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.principla_name != null) { + oprot.writeFieldBegin(PRINCIPLA_NAME_FIELD_DESC); + oprot.writeString(this.principla_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_result("); + StringBuilder sb = new StringBuilder("list_security_user_grant_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("principla_name:"); + if (this.principla_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.principla_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); first = false; sb.append(")"); return sb.toString(); @@ -31109,16 +53932,19 @@ } - public static class partition_name_to_vals_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_vals_args"); + public static class list_security_user_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_user_grant_result"); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String part_name; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - PART_NAME((short)1, "part_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -31133,8 +53959,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PART_NAME - return PART_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -31179,70 +54007,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityUser.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_user_grant_result.class, metaDataMap); } - public partition_name_to_vals_args() { + public list_security_user_grant_result() { } - public partition_name_to_vals_args( - String part_name) + public list_security_user_grant_result( + List success, + MetaException o1) { this(); - this.part_name = part_name; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public partition_name_to_vals_args(partition_name_to_vals_args other) { - if (other.isSetPart_name()) { - this.part_name = other.part_name; + public list_security_user_grant_result(list_security_user_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityUser other_element : other.success) { + __this__success.add(new SecurityUser(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public partition_name_to_vals_args deepCopy() { - return new partition_name_to_vals_args(this); + public list_security_user_grant_result deepCopy() { + return new list_security_user_grant_result(this); } @Override public void clear() { - this.part_name = null; + this.success = null; + this.o1 = null; } - public String getPart_name() { - return this.part_name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setPart_name(String part_name) { - this.part_name = part_name; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetPart_name() { - this.part_name = null; + public void addToSuccess(SecurityUser elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; + 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 asigned 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 asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setPart_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.part_name = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PART_NAME: + case SUCCESS: if (value == null) { - unsetPart_name(); + unsetSuccess(); } else { - setPart_name((String)value); + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); } break; @@ -31251,8 +54138,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case PART_NAME: - return getPart_name(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); } throw new IllegalStateException(); @@ -31265,8 +54155,10 @@ } switch (field) { - case PART_NAME: - return isSetPart_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -31275,21 +54167,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof partition_name_to_vals_args) - return this.equals((partition_name_to_vals_args)that); + if (that instanceof list_security_user_grant_result) + return this.equals((list_security_user_grant_result)that); return false; } - public boolean equals(partition_name_to_vals_args that) { + public boolean equals(list_security_user_grant_result that) { if (that == null) return false; - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) + 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.part_name.equals(that.part_name)) + 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; } @@ -31301,20 +54202,30 @@ return 0; } - public int compareTo(partition_name_to_vals_args other) { + public int compareTo(list_security_user_grant_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - partition_name_to_vals_args typedOther = (partition_name_to_vals_args)other; + list_security_user_grant_result typedOther = (list_security_user_grant_result)other; - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -31336,9 +54247,28 @@ break; } switch (field.id) { - case 1: // PART_NAME - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list245 = iprot.readListBegin(); + this.success = new ArrayList(_list245.size); + for (int _i246 = 0; _i246 < _list245.size; ++_i246) + { + SecurityUser _elem247; + _elem247 = new SecurityUser(); + _elem247.read(iprot); + this.success.add(_elem247); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -31353,12 +54283,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityUser _iter248 : this.success) + { + _iter248.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -31367,14 +54307,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); + StringBuilder sb = new StringBuilder("list_security_user_grant_result("); boolean first = true; - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.part_name); + 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(")"); @@ -31387,19 +54335,25 @@ } - public static class partition_name_to_vals_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_vals_result"); + public static class list_security_db_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_db_grant_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); - private List success; - private MetaException o1; + private String principal_name; + private boolean is_group; + private boolean is_role; + private String db_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + PRINCIPAL_NAME((short)1, "principal_name"), + IS_GROUP((short)2, "is_group"), + IS_ROLE((short)3, "is_role"), + DB_NAME((short)4, "db_name"); private static final Map byName = new HashMap(); @@ -31414,10 +54368,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_GROUP + return IS_GROUP; + case 3: // IS_ROLE + return IS_ROLE; + case 4: // DB_NAME + return DB_NAME; default: return null; } @@ -31458,133 +54416,194 @@ } // isset id assignments + private static final int __IS_GROUP_ISSET_ID = 0; + private static final int __IS_ROLE_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_db_grant_args.class, metaDataMap); } - public partition_name_to_vals_result() { + public list_security_db_grant_args() { } - public partition_name_to_vals_result( - List success, - MetaException o1) + public list_security_db_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name) { this(); - this.success = success; - this.o1 = o1; + this.principal_name = principal_name; + this.is_group = is_group; + setIs_groupIsSet(true); + this.is_role = is_role; + setIs_roleIsSet(true); + this.db_name = db_name; } /** * Performs a deep copy on other. */ - public partition_name_to_vals_result(partition_name_to_vals_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; + public list_security_db_grant_args(list_security_db_grant_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + this.is_group = other.is_group; + this.is_role = other.is_role; + if (other.isSetDb_name()) { + this.db_name = other.db_name; } } - public partition_name_to_vals_result deepCopy() { - return new partition_name_to_vals_result(this); + public list_security_db_grant_args deepCopy() { + return new list_security_db_grant_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; + this.principal_name = null; + setIs_groupIsSet(false); + this.is_group = false; + setIs_roleIsSet(false); + this.is_role = false; + this.db_name = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public String getPrincipal_name() { + return this.principal_name; } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); + public void unsetPrincipal_name() { + this.principal_name = null; + } + + /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; + } + + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; } - this.success.add(elem); } - public List getSuccess() { - return this.success; + public boolean isIs_group() { + return this.is_group; } - public void setSuccess(List success) { - this.success = success; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); } - public void unsetSuccess() { - this.success = null; + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); } - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); } - public MetaException getO1() { - return this.o1; + public boolean isIs_role() { + return this.is_role; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); + } + + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); + } + + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); + } + + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setO1IsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case PRINCIPAL_NAME: if (value == null) { - unsetSuccess(); + unsetPrincipal_name(); } else { - setSuccess((List)value); + setPrincipal_name((String)value); } break; - case O1: + case IS_GROUP: if (value == null) { - unsetO1(); + unsetIs_group(); } else { - setO1((MetaException)value); + setIs_group((Boolean)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } break; @@ -31593,11 +54612,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case O1: - return getO1(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case IS_ROLE: + return new Boolean(isIs_role()); + + case DB_NAME: + return getDb_name(); } throw new IllegalStateException(); @@ -31610,10 +54635,14 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_GROUP: + return isSetIs_group(); + case IS_ROLE: + return isSetIs_role(); + case DB_NAME: + return isSetDb_name(); } throw new IllegalStateException(); } @@ -31622,30 +54651,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof partition_name_to_vals_result) - return this.equals((partition_name_to_vals_result)that); + if (that instanceof list_security_db_grant_args) + return this.equals((list_security_db_grant_args)that); return false; } - public boolean equals(partition_name_to_vals_result that) { + public boolean equals(list_security_db_grant_args 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)) + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) return false; - if (!this.success.equals(that.success)) + if (!this.principal_name.equals(that.principal_name)) 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)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) + return false; + if (this.is_role != that.is_role) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) return false; } @@ -31657,30 +54704,50 @@ return 0; } - public int compareTo(partition_name_to_vals_result other) { + public int compareTo(list_security_db_grant_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - partition_name_to_vals_result typedOther = (partition_name_to_vals_result)other; + list_security_db_grant_args typedOther = (list_security_db_grant_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } @@ -31702,27 +54769,32 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list132 = iprot.readListBegin(); - this.success = new ArrayList(_list132.size); - for (int _i133 = 0; _i133 < _list132.size; ++_i133) - { - String _elem134; - _elem134 = iprot.readString(); - this.success.add(_elem134); - } - iprot.readListEnd(); - } + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -31737,22 +54809,23 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter135 : this.success) - { - oprot.writeString(_iter135); - } - oprot.writeListEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -31761,22 +54834,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_result("); + StringBuilder sb = new StringBuilder("list_security_db_grant_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; sb.append(")"); @@ -31789,16 +54870,19 @@ } - public static class partition_name_to_spec_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_spec_args"); + public static class list_security_db_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_db_grant_result"); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String part_name; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - PART_NAME((short)1, "part_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -31813,8 +54897,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PART_NAME - return PART_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -31859,70 +54945,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityDB.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_db_grant_result.class, metaDataMap); + } + + public list_security_db_grant_result() { + } + + public list_security_db_grant_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public list_security_db_grant_result(list_security_db_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityDB other_element : other.success) { + __this__success.add(new SecurityDB(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + public list_security_db_grant_result deepCopy() { + return new list_security_db_grant_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(SecurityDB elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - public partition_name_to_spec_args() { + public List getSuccess() { + return this.success; } - public partition_name_to_spec_args( - String part_name) - { - this(); - this.part_name = part_name; + public void setSuccess(List success) { + this.success = success; } - /** - * Performs a deep copy on other. - */ - public partition_name_to_spec_args(partition_name_to_spec_args other) { - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } + public void unsetSuccess() { + this.success = null; } - public partition_name_to_spec_args deepCopy() { - return new partition_name_to_spec_args(this); + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - @Override - public void clear() { - this.part_name = null; + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } } - public String getPart_name() { - return this.part_name; + public MetaException getO1() { + return this.o1; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetPart_name() { - this.part_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ - public boolean isSetPart_name() { - return this.part_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setPart_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.part_name = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PART_NAME: + case SUCCESS: if (value == null) { - unsetPart_name(); + unsetSuccess(); } else { - setPart_name((String)value); + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); } break; @@ -31931,8 +55076,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case PART_NAME: - return getPart_name(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); } throw new IllegalStateException(); @@ -31945,8 +55093,10 @@ } switch (field) { - case PART_NAME: - return isSetPart_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -31955,21 +55105,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof partition_name_to_spec_args) - return this.equals((partition_name_to_spec_args)that); + if (that instanceof list_security_db_grant_result) + return this.equals((list_security_db_grant_result)that); return false; } - public boolean equals(partition_name_to_spec_args that) { + public boolean equals(list_security_db_grant_result that) { if (that == null) return false; - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) + 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.part_name.equals(that.part_name)) + 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; } @@ -31981,20 +55140,30 @@ return 0; } - public int compareTo(partition_name_to_spec_args other) { + public int compareTo(list_security_db_grant_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - partition_name_to_spec_args typedOther = (partition_name_to_spec_args)other; + list_security_db_grant_result typedOther = (list_security_db_grant_result)other; - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -32016,9 +55185,28 @@ break; } switch (field.id) { - case 1: // PART_NAME - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list249 = iprot.readListBegin(); + this.success = new ArrayList(_list249.size); + for (int _i250 = 0; _i250 < _list249.size; ++_i250) + { + SecurityDB _elem251; + _elem251 = new SecurityDB(); + _elem251.read(iprot); + this.success.add(_elem251); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -32033,12 +55221,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityDB _iter252 : this.success) + { + _iter252.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -32047,14 +55245,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_args("); + StringBuilder sb = new StringBuilder("list_security_db_grant_result("); boolean first = true; - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.part_name); + 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(")"); @@ -32067,19 +55273,28 @@ } - public static class partition_name_to_spec_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_spec_result"); + public static class list_security_table_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_table_grant_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)5); - private Map success; - private MetaException o1; + private String principal_name; + private boolean is_group; + private boolean is_role; + private String db_name; + private String table_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"); + PRINCIPAL_NAME((short)1, "principal_name"), + IS_GROUP((short)2, "is_group"), + IS_ROLE((short)3, "is_role"), + DB_NAME((short)4, "db_name"), + TABLE_NAME((short)5, "table_name"); private static final Map byName = new HashMap(); @@ -32094,10 +55309,16 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; + case 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_GROUP + return IS_GROUP; + case 3: // IS_ROLE + return IS_ROLE; + case 4: // DB_NAME + return DB_NAME; + case 5: // TABLE_NAME + return TABLE_NAME; default: return null; } @@ -32137,139 +55358,234 @@ } } - // isset id assignments - - public static final Map<_Fields, FieldMetaData> metaDataMap; - static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); + // isset id assignments + private static final int __IS_GROUP_ISSET_ID = 0; + private static final int __IS_ROLE_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(list_security_table_grant_args.class, metaDataMap); + } + + public list_security_table_grant_args() { + } + + public list_security_table_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name, + String table_name) + { + this(); + this.principal_name = principal_name; + this.is_group = is_group; + setIs_groupIsSet(true); + this.is_role = is_role; + setIs_roleIsSet(true); + this.db_name = db_name; + this.table_name = table_name; + } + + /** + * Performs a deep copy on other. + */ + public list_security_table_grant_args(list_security_table_grant_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + this.is_group = other.is_group; + this.is_role = other.is_role; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + } + + public list_security_table_grant_args deepCopy() { + return new list_security_table_grant_args(this); + } + + @Override + public void clear() { + this.principal_name = null; + setIs_groupIsSet(false); + this.is_group = false; + setIs_roleIsSet(false); + this.is_role = false; + this.db_name = null; + this.table_name = null; + } + + public String getPrincipal_name() { + return this.principal_name; + } + + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } + + public void unsetPrincipal_name() { + this.principal_name = null; + } + + /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; } - public partition_name_to_spec_result() { + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; + } } - public partition_name_to_spec_result( - Map success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; + public boolean isIs_group() { + return this.is_group; } - /** - * Performs a deep copy on other. - */ - public partition_name_to_spec_result(partition_name_to_spec_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(); - for (Map.Entry other_element : other.success.entrySet()) { + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); + } - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); + } - String __this__success_copy_key = other_element_key; + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); + } - String __this__success_copy_value = other_element_value; + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); + } - __this__success.put(__this__success_copy_key, __this__success_copy_value); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } + public boolean isIs_role() { + return this.is_role; } - public partition_name_to_spec_result deepCopy() { - return new partition_name_to_spec_result(this); + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); } - @Override - public void clear() { - this.success = null; - this.o1 = null; + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); } - public void putToSuccess(String key, String val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); } - public Map getSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(Map success) { - this.success = success; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - this.success = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setSuccessIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.db_name = null; } } - public MetaException getO1() { - return this.o1; + public String getTable_name() { + return this.table_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public void unsetO1() { - this.o1 = null; + public void unsetTable_name() { + this.table_name = null; } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; } - public void setO1IsSet(boolean value) { + public void setTable_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.table_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case PRINCIPAL_NAME: if (value == null) { - unsetSuccess(); + unsetPrincipal_name(); } else { - setSuccess((Map)value); + setPrincipal_name((String)value); } break; - case O1: + case IS_GROUP: if (value == null) { - unsetO1(); + unsetIs_group(); } else { - setO1((MetaException)value); + setIs_group((Boolean)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); } break; @@ -32278,11 +55594,20 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case O1: - return getO1(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case IS_ROLE: + return new Boolean(isIs_role()); + + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); } throw new IllegalStateException(); @@ -32295,10 +55620,16 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_GROUP: + return isSetIs_group(); + case IS_ROLE: + return isSetIs_role(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); } throw new IllegalStateException(); } @@ -32307,30 +55638,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof partition_name_to_spec_result) - return this.equals((partition_name_to_spec_result)that); + if (that instanceof list_security_table_grant_args) + return this.equals((list_security_table_grant_args)that); return false; } - public boolean equals(partition_name_to_spec_result that) { + public boolean equals(list_security_table_grant_args 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)) + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) return false; - if (!this.success.equals(that.success)) + if (!this.principal_name.equals(that.principal_name)) 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)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) + return false; + if (this.is_role != that.is_role) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) return false; } @@ -32342,30 +55700,60 @@ return 0; } - public int compareTo(partition_name_to_spec_result other) { + public int compareTo(list_security_table_grant_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - partition_name_to_spec_result typedOther = (partition_name_to_spec_result)other; + list_security_table_grant_args typedOther = (list_security_table_grant_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); if (lastComparison != 0) { return lastComparison; } @@ -32383,33 +55771,43 @@ while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.MAP) { - { - TMap _map136 = iprot.readMapBegin(); - this.success = new HashMap(2*_map136.size); - for (int _i137 = 0; _i137 < _map136.size; ++_i137) - { - String _key138; - String _val139; - _key138 = iprot.readString(); - _val139 = iprot.readString(); - this.success.put(_key138, _val139); - } - iprot.readMapEnd(); - } + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -32424,23 +55822,28 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); - for (Map.Entry _iter140 : this.success.entrySet()) - { - oprot.writeString(_iter140.getKey()); - oprot.writeString(_iter140.getValue()); - } - oprot.writeMapEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -32449,22 +55852,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); + StringBuilder sb = new StringBuilder("list_security_table_grant_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); } first = false; sb.append(")"); @@ -32477,19 +55896,19 @@ } - public static class add_index_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("add_index_args"); + public static class list_security_table_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_table_grant_result"); - private static final TField NEW_INDEX_FIELD_DESC = new TField("new_index", TType.STRUCT, (short)1); - private static final TField INDEX_TABLE_FIELD_DESC = new TField("index_table", TType.STRUCT, (short)2); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private Index new_index; - private Table index_table; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - NEW_INDEX((short)1, "new_index"), - INDEX_TABLE((short)2, "index_table"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -32504,10 +55923,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NEW_INDEX - return NEW_INDEX; - case 2: // INDEX_TABLE - return INDEX_TABLE; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -32552,109 +55971,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NEW_INDEX, new FieldMetaData("new_index", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - tmpMap.put(_Fields.INDEX_TABLE, new FieldMetaData("index_table", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityTablePartition.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_table_grant_result.class, metaDataMap); } - public add_index_args() { + public list_security_table_grant_result() { } - public add_index_args( - Index new_index, - Table index_table) + public list_security_table_grant_result( + List success, + MetaException o1) { this(); - this.new_index = new_index; - this.index_table = index_table; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public add_index_args(add_index_args other) { - if (other.isSetNew_index()) { - this.new_index = new Index(other.new_index); + public list_security_table_grant_result(list_security_table_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityTablePartition other_element : other.success) { + __this__success.add(new SecurityTablePartition(other_element)); + } + this.success = __this__success; } - if (other.isSetIndex_table()) { - this.index_table = new Table(other.index_table); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public add_index_args deepCopy() { - return new add_index_args(this); + public list_security_table_grant_result deepCopy() { + return new list_security_table_grant_result(this); } @Override public void clear() { - this.new_index = null; - this.index_table = null; + this.success = null; + this.o1 = null; } - public Index getNew_index() { - return this.new_index; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setNew_index(Index new_index) { - this.new_index = new_index; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetNew_index() { - this.new_index = null; + public void addToSuccess(SecurityTablePartition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - /** Returns true if field new_index is set (has been asigned a value) and false otherwise */ - public boolean isSetNew_index() { - return this.new_index != null; + public List getSuccess() { + return this.success; } - public void setNew_indexIsSet(boolean value) { + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { if (!value) { - this.new_index = null; + this.success = null; } } - public Table getIndex_table() { - return this.index_table; + public MetaException getO1() { + return this.o1; } - public void setIndex_table(Table index_table) { - this.index_table = index_table; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetIndex_table() { - this.index_table = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field index_table is set (has been asigned a value) and false otherwise */ - public boolean isSetIndex_table() { - return this.index_table != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setIndex_tableIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.index_table = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NEW_INDEX: + case SUCCESS: if (value == null) { - unsetNew_index(); + unsetSuccess(); } else { - setNew_index((Index)value); + setSuccess((List)value); } break; - case INDEX_TABLE: + case O1: if (value == null) { - unsetIndex_table(); + unsetO1(); } else { - setIndex_table((Table)value); + setO1((MetaException)value); } break; @@ -32663,11 +56102,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NEW_INDEX: - return getNew_index(); + case SUCCESS: + return getSuccess(); - case INDEX_TABLE: - return getIndex_table(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -32680,10 +56119,10 @@ } switch (field) { - case NEW_INDEX: - return isSetNew_index(); - case INDEX_TABLE: - return isSetIndex_table(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -32692,30 +56131,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_index_args) - return this.equals((add_index_args)that); + if (that instanceof list_security_table_grant_result) + return this.equals((list_security_table_grant_result)that); return false; } - public boolean equals(add_index_args that) { + public boolean equals(list_security_table_grant_result that) { if (that == null) return false; - boolean this_present_new_index = true && this.isSetNew_index(); - boolean that_present_new_index = true && that.isSetNew_index(); - if (this_present_new_index || that_present_new_index) { - if (!(this_present_new_index && that_present_new_index)) + 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.new_index.equals(that.new_index)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_index_table = true && this.isSetIndex_table(); - boolean that_present_index_table = true && that.isSetIndex_table(); - if (this_present_index_table || that_present_index_table) { - if (!(this_present_index_table && that_present_index_table)) + 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.index_table.equals(that.index_table)) + if (!this.o1.equals(that.o1)) return false; } @@ -32727,30 +56166,30 @@ return 0; } - public int compareTo(add_index_args other) { + public int compareTo(list_security_table_grant_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - add_index_args typedOther = (add_index_args)other; + list_security_table_grant_result typedOther = (list_security_table_grant_result)other; - lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(typedOther.isSetNew_index()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_index()) { - lastComparison = TBaseHelper.compareTo(this.new_index, typedOther.new_index); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(typedOther.isSetIndex_table()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetIndex_table()) { - lastComparison = TBaseHelper.compareTo(this.index_table, typedOther.index_table); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -32772,18 +56211,28 @@ break; } switch (field.id) { - case 1: // NEW_INDEX - if (field.type == TType.STRUCT) { - this.new_index = new Index(); - this.new_index.read(iprot); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list253 = iprot.readListBegin(); + this.success = new ArrayList(_list253.size); + for (int _i254 = 0; _i254 < _list253.size; ++_i254) + { + SecurityTablePartition _elem255; + _elem255 = new SecurityTablePartition(); + _elem255.read(iprot); + this.success.add(_elem255); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // INDEX_TABLE + case 1: // O1 if (field.type == TType.STRUCT) { - this.index_table = new Table(); - this.index_table.read(iprot); + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -32798,17 +56247,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_index != null) { - oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); - this.new_index.write(oprot); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityTablePartition _iter256 : this.success) + { + _iter256.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.index_table != null) { - oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); - this.index_table.write(oprot); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -32817,22 +56271,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_index_args("); + StringBuilder sb = new StringBuilder("list_security_table_grant_result("); boolean first = true; - sb.append("new_index:"); - if (this.new_index == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.new_index); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("index_table:"); - if (this.index_table == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.index_table); + sb.append(this.o1); } first = false; sb.append(")"); @@ -32845,25 +56299,31 @@ } - public static class add_index_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("add_index_result"); + public static class list_security_partition_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_partition_grant_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)5); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)6); - private Index success; - private InvalidObjectException o1; - private AlreadyExistsException o2; - private MetaException o3; + private String principal_name; + private boolean is_group; + private boolean is_role; + private String db_name; + private String table_name; + private String part_name; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + PRINCIPAL_NAME((short)1, "principal_name"), + IS_GROUP((short)2, "is_group"), + IS_ROLE((short)3, "is_role"), + DB_NAME((short)4, "db_name"), + TABLE_NAME((short)5, "table_name"), + PART_NAME((short)6, "part_name"); private static final Map byName = new HashMap(); @@ -32878,14 +56338,18 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; + case 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_GROUP + return IS_GROUP; + case 3: // IS_ROLE + return IS_ROLE; + case 4: // DB_NAME + return DB_NAME; + case 5: // TABLE_NAME + return TABLE_NAME; + case 6: // PART_NAME + return PART_NAME; default: return null; } @@ -32926,191 +56390,272 @@ } // isset id assignments + private static final int __IS_GROUP_ISSET_ID = 0; + private static final int __IS_ROLE_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_partition_grant_args.class, metaDataMap); } - public add_index_result() { + public list_security_partition_grant_args() { } - public add_index_result( - Index success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public list_security_partition_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name, + String table_name, + String part_name) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.principal_name = principal_name; + this.is_group = is_group; + setIs_groupIsSet(true); + this.is_role = is_role; + setIs_roleIsSet(true); + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public add_index_result(add_index_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); + public list_security_partition_grant_args(list_security_partition_grant_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); + this.is_group = other.is_group; + this.is_role = other.is_role; + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); + if (other.isSetTable_name()) { + this.table_name = other.table_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } - public add_index_result deepCopy() { - return new add_index_result(this); + public list_security_partition_grant_args deepCopy() { + return new list_security_partition_grant_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; - this.o3 = null; + this.principal_name = null; + setIs_groupIsSet(false); + this.is_group = false; + setIs_roleIsSet(false); + this.is_role = false; + this.db_name = null; + this.table_name = null; + this.part_name = null; } - public Index getSuccess() { - return this.success; + public String getPrincipal_name() { + return this.principal_name; } - public void setSuccess(Index success) { - this.success = success; + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; } - public void unsetSuccess() { - this.success = null; + public void unsetPrincipal_name() { + this.principal_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; } - public void setSuccessIsSet(boolean value) { + public void setPrincipal_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.principal_name = null; } } - public InvalidObjectException getO1() { - return this.o1; + public boolean isIs_group() { + return this.is_group; } - public void setO1(InvalidObjectException o1) { - this.o1 = o1; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); } - public void unsetO1() { - this.o1 = null; + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); } - public void setO1IsSet(boolean value) { + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); + } + + public boolean isIs_role() { + return this.is_role; + } + + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); + } + + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); + } + + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); + } + + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.db_name = null; } } - public AlreadyExistsException getO2() { - return this.o2; + public String getTable_name() { + return this.table_name; } - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public void unsetO2() { - this.o2 = null; + public void unsetTable_name() { + this.table_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; } - public void setO2IsSet(boolean value) { + public void setTable_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.table_name = null; } } - public MetaException getO3() { - return this.o3; + public String getPart_name() { + return this.part_name; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetO3() { - this.o3 = null; + public void unsetPart_name() { + this.part_name = null; } - /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ - public boolean isSetO3() { - return this.o3 != null; + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setO3IsSet(boolean value) { + public void setPart_nameIsSet(boolean value) { if (!value) { - this.o3 = null; + this.part_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case PRINCIPAL_NAME: if (value == null) { - unsetSuccess(); + unsetPrincipal_name(); } else { - setSuccess((Index)value); + setPrincipal_name((String)value); } break; - case O1: + case IS_GROUP: if (value == null) { - unsetO1(); + unsetIs_group(); } else { - setO1((InvalidObjectException)value); + setIs_group((Boolean)value); } break; - case O2: + case IS_ROLE: if (value == null) { - unsetO2(); + unsetIs_role(); } else { - setO2((AlreadyExistsException)value); + setIs_role((Boolean)value); } break; - case O3: + case DB_NAME: if (value == null) { - unsetO3(); + unsetDb_name(); } else { - setO3((MetaException)value); + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); } break; @@ -33119,17 +56664,23 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case O1: - return getO1(); + case IS_GROUP: + return new Boolean(isIs_group()); - case O2: - return getO2(); + case IS_ROLE: + return new Boolean(isIs_role()); - case O3: - return getO3(); + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + case PART_NAME: + return getPart_name(); } throw new IllegalStateException(); @@ -33142,14 +56693,18 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_GROUP: + return isSetIs_group(); + case IS_ROLE: + return isSetIs_role(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case PART_NAME: + return isSetPart_name(); } throw new IllegalStateException(); } @@ -33158,48 +56713,66 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_index_result) - return this.equals((add_index_result)that); + if (that instanceof list_security_partition_grant_args) + return this.equals((list_security_partition_grant_args)that); return false; } - public boolean equals(add_index_result that) { + public boolean equals(list_security_partition_grant_args 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)) + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) return false; - if (!this.success.equals(that.success)) + if (!this.principal_name.equals(that.principal_name)) 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)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_group != that.is_group) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_role != that.is_role) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o3.equals(that.o3)) + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) return false; } @@ -33211,50 +56784,70 @@ return 0; } - public int compareTo(add_index_result other) { + public int compareTo(list_security_partition_grant_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - add_index_result typedOther = (add_index_result)other; + list_security_partition_grant_args typedOther = (list_security_partition_grant_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } @@ -33276,34 +56869,46 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); + case 2: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); + case 3: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case 4: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -33318,23 +56923,33 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -33343,38 +56958,46 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_index_result("); + StringBuilder sb = new StringBuilder("list_security_partition_grant_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("table_name:"); + if (this.table_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.table_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -33387,25 +57010,19 @@ } - public static class alter_index_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_index_args"); + public static class list_security_partition_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_partition_grant_result"); - private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); - private static final TField BASE_TBL_NAME_FIELD_DESC = new TField("base_tbl_name", TType.STRING, (short)2); - private static final TField IDX_NAME_FIELD_DESC = new TField("idx_name", TType.STRING, (short)3); - private static final TField NEW_IDX_FIELD_DESC = new TField("new_idx", TType.STRUCT, (short)4); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String dbname; - private String base_tbl_name; - private String idx_name; - private Index new_idx; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DBNAME((short)1, "dbname"), - BASE_TBL_NAME((short)2, "base_tbl_name"), - IDX_NAME((short)3, "idx_name"), - NEW_IDX((short)4, "new_idx"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -33420,14 +57037,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DBNAME - return DBNAME; - case 2: // BASE_TBL_NAME - return BASE_TBL_NAME; - case 3: // IDX_NAME - return IDX_NAME; - case 4: // NEW_IDX - return NEW_IDX; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -33472,187 +57085,129 @@ public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.BASE_TBL_NAME, new FieldMetaData("base_tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.IDX_NAME, new FieldMetaData("idx_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.NEW_IDX, new FieldMetaData("new_idx", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityTablePartition.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_partition_grant_result.class, metaDataMap); } - public alter_index_args() { + public list_security_partition_grant_result() { } - public alter_index_args( - String dbname, - String base_tbl_name, - String idx_name, - Index new_idx) + public list_security_partition_grant_result( + List success, + MetaException o1) { this(); - this.dbname = dbname; - this.base_tbl_name = base_tbl_name; - this.idx_name = idx_name; - this.new_idx = new_idx; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public alter_index_args(alter_index_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetBase_tbl_name()) { - this.base_tbl_name = other.base_tbl_name; - } - if (other.isSetIdx_name()) { - this.idx_name = other.idx_name; + public list_security_partition_grant_result(list_security_partition_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityTablePartition other_element : other.success) { + __this__success.add(new SecurityTablePartition(other_element)); + } + this.success = __this__success; } - if (other.isSetNew_idx()) { - this.new_idx = new Index(other.new_idx); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public alter_index_args deepCopy() { - return new alter_index_args(this); + public list_security_partition_grant_result deepCopy() { + return new list_security_partition_grant_result(this); } @Override public void clear() { - this.dbname = null; - this.base_tbl_name = null; - this.idx_name = null; - this.new_idx = null; - } - - public String getDbname() { - return this.dbname; - } - - public void setDbname(String dbname) { - this.dbname = dbname; - } - - public void unsetDbname() { - this.dbname = null; - } - - /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ - public boolean isSetDbname() { - return this.dbname != null; - } - - public void setDbnameIsSet(boolean value) { - if (!value) { - this.dbname = null; - } - } - - public String getBase_tbl_name() { - return this.base_tbl_name; - } - - public void setBase_tbl_name(String base_tbl_name) { - this.base_tbl_name = base_tbl_name; + this.success = null; + this.o1 = null; } - public void unsetBase_tbl_name() { - this.base_tbl_name = null; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - /** Returns true if field base_tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetBase_tbl_name() { - return this.base_tbl_name != null; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void setBase_tbl_nameIsSet(boolean value) { - if (!value) { - this.base_tbl_name = null; + public void addToSuccess(SecurityTablePartition elem) { + if (this.success == null) { + this.success = new ArrayList(); } + this.success.add(elem); } - public String getIdx_name() { - return this.idx_name; + public List getSuccess() { + return this.success; } - public void setIdx_name(String idx_name) { - this.idx_name = idx_name; + public void setSuccess(List success) { + this.success = success; } - public void unsetIdx_name() { - this.idx_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field idx_name is set (has been asigned a value) and false otherwise */ - public boolean isSetIdx_name() { - return this.idx_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setIdx_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.idx_name = null; + this.success = null; } } - public Index getNew_idx() { - return this.new_idx; + public MetaException getO1() { + return this.o1; } - public void setNew_idx(Index new_idx) { - this.new_idx = new_idx; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetNew_idx() { - this.new_idx = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field new_idx is set (has been asigned a value) and false otherwise */ - public boolean isSetNew_idx() { - return this.new_idx != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setNew_idxIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.new_idx = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case BASE_TBL_NAME: - if (value == null) { - unsetBase_tbl_name(); - } else { - setBase_tbl_name((String)value); - } - break; - - case IDX_NAME: + case SUCCESS: if (value == null) { - unsetIdx_name(); + unsetSuccess(); } else { - setIdx_name((String)value); + setSuccess((List)value); } break; - case NEW_IDX: + case O1: if (value == null) { - unsetNew_idx(); + unsetO1(); } else { - setNew_idx((Index)value); + setO1((MetaException)value); } break; @@ -33661,17 +57216,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DBNAME: - return getDbname(); - - case BASE_TBL_NAME: - return getBase_tbl_name(); - - case IDX_NAME: - return getIdx_name(); + case SUCCESS: + return getSuccess(); - case NEW_IDX: - return getNew_idx(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -33684,14 +57233,10 @@ } switch (field) { - case DBNAME: - return isSetDbname(); - case BASE_TBL_NAME: - return isSetBase_tbl_name(); - case IDX_NAME: - return isSetIdx_name(); - case NEW_IDX: - return isSetNew_idx(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -33700,103 +57245,65 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_index_args) - return this.equals((alter_index_args)that); + if (that instanceof list_security_partition_grant_result) + return this.equals((list_security_partition_grant_result)that); return false; } - public boolean equals(alter_index_args that) { + public boolean equals(list_security_partition_grant_result that) { if (that == null) return false; - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_base_tbl_name = true && this.isSetBase_tbl_name(); - boolean that_present_base_tbl_name = true && that.isSetBase_tbl_name(); - if (this_present_base_tbl_name || that_present_base_tbl_name) { - if (!(this_present_base_tbl_name && that_present_base_tbl_name)) - return false; - if (!this.base_tbl_name.equals(that.base_tbl_name)) - return false; - } - - boolean this_present_idx_name = true && this.isSetIdx_name(); - boolean that_present_idx_name = true && that.isSetIdx_name(); - if (this_present_idx_name || that_present_idx_name) { - if (!(this_present_idx_name && that_present_idx_name)) + 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.idx_name.equals(that.idx_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_new_idx = true && this.isSetNew_idx(); - boolean that_present_new_idx = true && that.isSetNew_idx(); - if (this_present_new_idx || that_present_new_idx) { - if (!(this_present_new_idx && that_present_new_idx)) + 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.new_idx.equals(that.new_idx)) + if (!this.o1.equals(that.o1)) return false; } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(alter_index_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - alter_index_args typedOther = (alter_index_args)other; - - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDbname()) { - lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBase_tbl_name()).compareTo(typedOther.isSetBase_tbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBase_tbl_name()) { - lastComparison = TBaseHelper.compareTo(this.base_tbl_name, typedOther.base_tbl_name); - if (lastComparison != 0) { - return lastComparison; - } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(list_security_partition_grant_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); } - lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(typedOther.isSetIdx_name()); + + int lastComparison = 0; + list_security_partition_grant_result typedOther = (list_security_partition_grant_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetIdx_name()) { - lastComparison = TBaseHelper.compareTo(this.idx_name, typedOther.idx_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(typedOther.isSetNew_idx()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_idx()) { - lastComparison = TBaseHelper.compareTo(this.new_idx, typedOther.new_idx); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -33818,31 +57325,28 @@ break; } switch (field.id) { - case 1: // DBNAME - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // BASE_TBL_NAME - if (field.type == TType.STRING) { - this.base_tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // IDX_NAME - if (field.type == TType.STRING) { - this.idx_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list257 = iprot.readListBegin(); + this.success = new ArrayList(_list257.size); + for (int _i258 = 0; _i258 < _list257.size; ++_i258) + { + SecurityTablePartition _elem259; + _elem259 = new SecurityTablePartition(); + _elem259.read(iprot); + this.success.add(_elem259); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: // NEW_IDX + case 1: // O1 if (field.type == TType.STRUCT) { - this.new_idx = new Index(); - this.new_idx.read(iprot); + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -33857,27 +57361,22 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.base_tbl_name != null) { - oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); - oprot.writeString(this.base_tbl_name); - oprot.writeFieldEnd(); - } - if (this.idx_name != null) { - oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); - oprot.writeString(this.idx_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityTablePartition _iter260 : this.success) + { + _iter260.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.new_idx != null) { - oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); - this.new_idx.write(oprot); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -33886,228 +57385,435 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_index_args("); + StringBuilder sb = new StringBuilder("list_security_partition_grant_result("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("base_tbl_name:"); - if (this.base_tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.base_tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("idx_name:"); - if (this.idx_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.idx_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("new_idx:"); - if (this.new_idx == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.new_idx); + sb.append(this.o1); } first = false; sb.append(")"); return sb.toString(); } - public void validate() throws TException { - // check for required fields + public void validate() throws TException { + // check for required fields + } + + } + + public static class list_security_column_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_column_grant_args"); + + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)5); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)6); + private static final TField COLUMN_NAME_FIELD_DESC = new TField("column_name", TType.STRING, (short)7); + + private String principal_name; + private boolean is_group; + private boolean is_role; + private String db_name; + private String table_name; + private String part_name; + private String column_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PRINCIPAL_NAME((short)1, "principal_name"), + IS_GROUP((short)2, "is_group"), + IS_ROLE((short)3, "is_role"), + DB_NAME((short)4, "db_name"), + TABLE_NAME((short)5, "table_name"), + PART_NAME((short)6, "part_name"), + COLUMN_NAME((short)7, "column_name"); + + 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: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // IS_GROUP + return IS_GROUP; + case 3: // IS_ROLE + return IS_ROLE; + case 4: // DB_NAME + return DB_NAME; + case 5: // TABLE_NAME + return TABLE_NAME; + case 6: // PART_NAME + return PART_NAME; + case 7: // COLUMN_NAME + return COLUMN_NAME; + 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 __IS_GROUP_ISSET_ID = 0; + private static final int __IS_ROLE_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.COLUMN_NAME, new FieldMetaData("column_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(list_security_column_grant_args.class, metaDataMap); + } + + public list_security_column_grant_args() { + } + + public list_security_column_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name, + String table_name, + String part_name, + String column_name) + { + this(); + this.principal_name = principal_name; + this.is_group = is_group; + setIs_groupIsSet(true); + this.is_role = is_role; + setIs_roleIsSet(true); + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; + this.column_name = column_name; + } + + /** + * Performs a deep copy on other. + */ + public list_security_column_grant_args(list_security_column_grant_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + this.is_group = other.is_group; + this.is_role = other.is_role; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetColumn_name()) { + this.column_name = other.column_name; + } + } + + public list_security_column_grant_args deepCopy() { + return new list_security_column_grant_args(this); + } + + @Override + public void clear() { + this.principal_name = null; + setIs_groupIsSet(false); + this.is_group = false; + setIs_roleIsSet(false); + this.is_role = false; + this.db_name = null; + this.table_name = null; + this.part_name = null; + this.column_name = null; + } + + public String getPrincipal_name() { + return this.principal_name; } - } + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } - public static class alter_index_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_index_result"); + public void unsetPrincipal_name() { + this.principal_name = null; + } - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; + } - private InvalidOperationException o1; - private MetaException o2; + public void setPrincipal_nameIsSet(boolean value) { + if (!value) { + this.principal_name = null; + } + } - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { - O1((short)1, "o1"), - O2((short)2, "o2"); + public boolean isIs_group() { + return this.is_group; + } - private static final Map byName = new HashMap(); + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); + } - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 - return O2; - default: - return null; - } - } + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); + } - /** - * 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; - } + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); + } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } + public boolean isIs_role() { + return this.is_role; + } - private final short _thriftId; - private final String _fieldName; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); + } - public short getThriftFieldId() { - return _thriftId; - } + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); + } - public String getFieldName() { - return _fieldName; - } + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); } - // isset id assignments + public String getDb_name() { + return this.db_name; + } - public static final Map<_Fields, FieldMetaData> metaDataMap; - static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_index_result.class, metaDataMap); + public void setDb_name(String db_name) { + this.db_name = db_name; } - public alter_index_result() { + public void unsetDb_name() { + this.db_name = null; } - public alter_index_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - /** - * Performs a deep copy on other. - */ - public alter_index_result(alter_index_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; } } - public alter_index_result deepCopy() { - return new alter_index_result(this); + public String getTable_name() { + return this.table_name; } - @Override - public void clear() { - this.o1 = null; - this.o2 = null; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public InvalidOperationException getO1() { - return this.o1; + public void unsetTable_name() { + this.table_name = null; } - public void setO1(InvalidOperationException o1) { - this.o1 = o1; + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTable_name() { + return this.table_name != null; } - public void unsetO1() { - this.o1 = null; + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + public String getPart_name() { + return this.part_name; } - public void setO1IsSet(boolean value) { + public void setPart_name(String part_name) { + this.part_name = part_name; + } + + public void unsetPart_name() { + this.part_name = null; + } + + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; + } + + public void setPart_nameIsSet(boolean value) { if (!value) { - this.o1 = null; + this.part_name = null; } } - public MetaException getO2() { - return this.o2; + public String getColumn_name() { + return this.column_name; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setColumn_name(String column_name) { + this.column_name = column_name; } - public void unsetO2() { - this.o2 = null; + public void unsetColumn_name() { + this.column_name = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field column_name is set (has been asigned a value) and false otherwise */ + public boolean isSetColumn_name() { + return this.column_name != null; } - public void setO2IsSet(boolean value) { + public void setColumn_nameIsSet(boolean value) { if (!value) { - this.o2 = null; + this.column_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: + case PRINCIPAL_NAME: if (value == null) { - unsetO1(); + unsetPrincipal_name(); } else { - setO1((InvalidOperationException)value); + setPrincipal_name((String)value); } break; - case O2: + case IS_GROUP: if (value == null) { - unsetO2(); + unsetIs_group(); } else { - setO2((MetaException)value); + setIs_group((Boolean)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumn_name(); + } else { + setColumn_name((String)value); } break; @@ -34116,11 +57822,26 @@ public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case O2: - return getO2(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case IS_ROLE: + return new Boolean(isIs_role()); + + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + case PART_NAME: + return getPart_name(); + + case COLUMN_NAME: + return getColumn_name(); } throw new IllegalStateException(); @@ -34133,10 +57854,20 @@ } switch (field) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_GROUP: + return isSetIs_group(); + case IS_ROLE: + return isSetIs_role(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case PART_NAME: + return isSetPart_name(); + case COLUMN_NAME: + return isSetColumn_name(); } throw new IllegalStateException(); } @@ -34145,30 +57876,75 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_index_result) - return this.equals((alter_index_result)that); + if (that instanceof list_security_column_grant_args) + return this.equals((list_security_column_grant_args)that); return false; } - public boolean equals(alter_index_result that) { + public boolean equals(list_security_column_grant_args that) { if (that == null) 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)) + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.principal_name.equals(that.principal_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) + return false; + if (this.is_role != that.is_role) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_column_name = true && this.isSetColumn_name(); + boolean that_present_column_name = true && that.isSetColumn_name(); + if (this_present_column_name || that_present_column_name) { + if (!(this_present_column_name && that_present_column_name)) + return false; + if (!this.column_name.equals(that.column_name)) return false; } @@ -34180,30 +57956,80 @@ return 0; } - public int compareTo(alter_index_result other) { + public int compareTo(list_security_column_grant_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_index_result typedOther = (alter_index_result)other; + list_security_column_grant_args typedOther = (list_security_column_grant_args)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(typedOther.isSetColumn_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn_name()) { + lastComparison = TBaseHelper.compareTo(this.column_name, typedOther.column_name); if (lastComparison != 0) { return lastComparison; } @@ -34225,18 +58051,53 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); + case 1: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case 2: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DB_NAME + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // TABLE_NAME + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // COLUMN_NAME + if (field.type == TType.STRING) { + this.column_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -34251,15 +58112,38 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + if (this.column_name != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(this.column_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -34268,22 +58152,54 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_index_result("); + StringBuilder sb = new StringBuilder("list_security_column_grant_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("column_name:"); + if (this.column_name == null) { + sb.append("null"); + } else { + sb.append(this.column_name); } first = false; sb.append(")"); @@ -34296,25 +58212,19 @@ } - public static class drop_index_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_index_by_name_args"); + public static class list_security_column_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_column_grant_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); - private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private String index_name; - private boolean deleteData; + private List success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - INDEX_NAME((short)3, "index_name"), - DELETE_DATA((short)4, "deleteData"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -34329,14 +58239,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // INDEX_NAME - return INDEX_NAME; - case 4: // DELETE_DATA - return DELETE_DATA; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -34377,194 +58283,133 @@ } // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityColumn.class)))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_column_grant_result.class, metaDataMap); } - public drop_index_by_name_args() { + public list_security_column_grant_result() { } - public drop_index_by_name_args( - String db_name, - String tbl_name, - String index_name, - boolean deleteData) + public list_security_column_grant_result( + List success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public drop_index_by_name_args(drop_index_by_name_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public list_security_column_grant_result(list_security_column_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityColumn other_element : other.success) { + __this__success.add(new SecurityColumn(other_element)); + } + this.success = __this__success; } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - this.deleteData = other.deleteData; } - public drop_index_by_name_args deepCopy() { - return new drop_index_by_name_args(this); + public list_security_column_grant_result deepCopy() { + return new list_security_column_grant_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.index_name = null; - setDeleteDataIsSet(false); - this.deleteData = false; - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; + this.success = null; + this.o1 = null; } - public void unsetDb_name() { - this.db_name = null; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; + public void addToSuccess(SecurityColumn elem) { + if (this.success == null) { + this.success = new ArrayList(); } + this.success.add(elem); } - public String getTbl_name() { - return this.tbl_name; + public List getSuccess() { + return this.success; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setSuccess(List success) { + this.success = success; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetSuccess() { + this.success = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setTbl_nameIsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.success = null; } } - public String getIndex_name() { - return this.index_name; + public MetaException getO1() { + return this.o1; } - public void setIndex_name(String index_name) { - this.index_name = index_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetIndex_name() { - this.index_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field index_name is set (has been asigned a value) and false otherwise */ - public boolean isSetIndex_name() { - return this.index_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setIndex_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.index_name = null; + this.o1 = null; } } - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); - } - - /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ - public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case INDEX_NAME: + case SUCCESS: if (value == null) { - unsetIndex_name(); + unsetSuccess(); } else { - setIndex_name((String)value); + setSuccess((List)value); } break; - case DELETE_DATA: + case O1: if (value == null) { - unsetDeleteData(); + unsetO1(); } else { - setDeleteData((Boolean)value); + setO1((MetaException)value); } break; @@ -34573,17 +58418,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case INDEX_NAME: - return getIndex_name(); + case SUCCESS: + return getSuccess(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -34596,14 +58435,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); - case DELETE_DATA: - return isSetDeleteData(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -34612,48 +58447,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_index_by_name_args) - return this.equals((drop_index_by_name_args)that); + if (that instanceof list_security_column_grant_result) + return this.equals((list_security_column_grant_result)that); return false; } - public boolean equals(drop_index_by_name_args that) { + public boolean equals(list_security_column_grant_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) + 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.index_name.equals(that.index_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + 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.deleteData != that.deleteData) + if (!this.o1.equals(that.o1)) return false; } @@ -34665,50 +58482,30 @@ return 0; } - public int compareTo(drop_index_by_name_args other) { + public int compareTo(list_security_column_grant_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_index_by_name_args typedOther = (drop_index_by_name_args)other; + list_security_column_grant_result typedOther = (list_security_column_grant_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetIndex_name()) { - lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -34730,31 +58527,28 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 3: // INDEX_NAME - if (field.type == TType.STRING) { - this.index_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list261 = iprot.readListBegin(); + this.success = new ArrayList(_list261.size); + for (int _i262 = 0; _i262 < _list261.size; ++_i262) + { + SecurityColumn _elem263; + _elem263 = new SecurityColumn(); + _elem263.read(iprot); + this.success.add(_elem263); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } - break; - case 4: // DELETE_DATA - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); + break; + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -34769,63 +58563,48 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityColumn _iter264 : this.success) + { + _iter264.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_args("); + StringBuilder sb = new StringBuilder("list_security_column_grant_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.index_name); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -34836,22 +58615,28 @@ } - public static class drop_index_by_name_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_index_by_name_result"); + public static class grant_privileges_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("grant_privileges_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)4); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)5); - private boolean success; - private NoSuchObjectException o1; - private MetaException o2; + private String user_name; + private boolean is_role; + private boolean is_group; + private PrivilegeBag privileges; + private String grantor; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + USER_NAME((short)1, "user_name"), + IS_ROLE((short)2, "is_role"), + IS_GROUP((short)3, "is_group"), + PRIVILEGES((short)4, "privileges"), + GRANTOR((short)5, "grantor"); private static final Map byName = new HashMap(); @@ -34866,12 +58651,16 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // USER_NAME + return USER_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; + case 4: // PRIVILEGES + return PRIVILEGES; + case 5: // GRANTOR + return GRANTOR; default: return null; } @@ -34912,155 +58701,233 @@ } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); + private static final int __IS_ROLE_ISSET_ID = 0; + private static final int __IS_GROUP_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrivilegeBag.class))); + tmpMap.put(_Fields.GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); } - public drop_index_by_name_result() { + public grant_privileges_args() { } - public drop_index_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) + public grant_privileges_args( + String user_name, + boolean is_role, + boolean is_group, + PrivilegeBag privileges, + String grantor) { this(); - this.success = success; - setSuccessIsSet(true); - this.o1 = o1; - this.o2 = o2; + this.user_name = user_name; + this.is_role = is_role; + setIs_roleIsSet(true); + this.is_group = is_group; + setIs_groupIsSet(true); + this.privileges = privileges; + this.grantor = grantor; } /** * Performs a deep copy on other. */ - public drop_index_by_name_result(drop_index_by_name_result other) { + public grant_privileges_args(grant_privileges_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + this.is_role = other.is_role; + this.is_group = other.is_group; + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); + } + if (other.isSetGrantor()) { + this.grantor = other.grantor; } } - public drop_index_by_name_result deepCopy() { - return new drop_index_by_name_result(this); + public grant_privileges_args deepCopy() { + return new grant_privileges_args(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; - this.o1 = null; - this.o2 = null; + this.user_name = null; + setIs_roleIsSet(false); + this.is_role = false; + setIs_groupIsSet(false); + this.is_group = false; + this.privileges = null; + this.grantor = null; } - public boolean isSuccess() { - return this.success; + public String getUser_name() { + return this.user_name; } - public void setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; + } } - public NoSuchObjectException getO1() { - return this.o1; + public boolean isIs_role() { + return this.is_role; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); } - public void unsetO1() { - this.o1 = null; + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); } - public void setO1IsSet(boolean value) { + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); + } + + public boolean isIs_group() { + return this.is_group; + } + + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); + } + + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); + } + + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); + } + + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); + } + + 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 asigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { if (!value) { - this.o1 = null; + this.privileges = null; } } - public MetaException getO2() { - return this.o2; + public String getGrantor() { + return this.grantor; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setGrantor(String grantor) { + this.grantor = grantor; } - public void unsetO2() { - this.o2 = null; + public void unsetGrantor() { + this.grantor = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field grantor is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantor() { + return this.grantor != null; } - public void setO2IsSet(boolean value) { + public void setGrantorIsSet(boolean value) { if (!value) { - this.o2 = null; + this.grantor = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case USER_NAME: if (value == null) { - unsetSuccess(); + unsetUser_name(); } else { - setSuccess((Boolean)value); + setUser_name((String)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIs_group(); + } else { + setIs_group((Boolean)value); } break; - case O1: + case PRIVILEGES: if (value == null) { - unsetO1(); + unsetPrivileges(); } else { - setO1((NoSuchObjectException)value); + setPrivileges((PrivilegeBag)value); } break; - case O2: + case GRANTOR: if (value == null) { - unsetO2(); + unsetGrantor(); } else { - setO2((MetaException)value); + setGrantor((String)value); } break; @@ -35069,14 +58936,20 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return new Boolean(isSuccess()); + case USER_NAME: + return getUser_name(); - case O1: - return getO1(); + case IS_ROLE: + return new Boolean(isIs_role()); - case O2: - return getO2(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case PRIVILEGES: + return getPrivileges(); + + case GRANTOR: + return getGrantor(); } throw new IllegalStateException(); @@ -35089,12 +58962,16 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case PRIVILEGES: + return isSetPrivileges(); + case GRANTOR: + return isSetGrantor(); } throw new IllegalStateException(); } @@ -35103,39 +58980,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_index_by_name_result) - return this.equals((drop_index_by_name_result)that); + if (that instanceof grant_privileges_args) + return this.equals((grant_privileges_args)that); return false; } - public boolean equals(drop_index_by_name_result that) { + public boolean equals(grant_privileges_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (this.success != that.success) + if (!this.user_name.equals(that.user_name)) 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)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_role != that.is_role) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_group != that.is_group) + 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_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) return false; } @@ -35147,44 +59042,64 @@ return 0; } - public int compareTo(drop_index_by_name_result other) { + public int compareTo(grant_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_index_by_name_result typedOther = (drop_index_by_name_result)other; + grant_privileges_args typedOther = (grant_privileges_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); if (lastComparison != 0) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(typedOther.isSetGrantor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantor()) { + lastComparison = TBaseHelper.compareTo(this.grantor, typedOther.grantor); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -35202,26 +59117,40 @@ break; } switch (field.id) { - case 0: // SUCCESS + case 1: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // IS_ROLE if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 + case 4: // PRIVILEGES if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + this.privileges = new PrivilegeBag(); + this.privileges.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // GRANTOR + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -35236,19 +59165,28 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + oprot.writeStructBegin(STRUCT_DESC); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.write(oprot); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -35257,26 +59195,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_result("); + StringBuilder sb = new StringBuilder("grant_privileges_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.privileges); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("grantor:"); + if (this.grantor == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.grantor); } first = false; sb.append(")"); @@ -35289,22 +59239,19 @@ } - public static class get_index_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_index_by_name_args"); + public static class grant_privileges_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("grant_privileges_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private String index_name; + private boolean success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - INDEX_NAME((short)3, "index_name"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -35319,12 +59266,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // INDEX_NAME - return INDEX_NAME; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -35365,152 +59310,116 @@ } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; - static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); - } - - public get_index_by_name_args() { - } - - public get_index_by_name_args( - String db_name, - String tbl_name, - String index_name) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - } - - /** - * Performs a deep copy on other. - */ - public get_index_by_name_args(get_index_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; - } - } - - public get_index_by_name_args deepCopy() { - return new get_index_by_name_args(this); - } - - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.index_name = null; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(grant_privileges_result.class, metaDataMap); } - public String getDb_name() { - return this.db_name; + public grant_privileges_result() { } - public void setDb_name(String db_name) { - this.db_name = db_name; + public grant_privileges_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; } - public void unsetDb_name() { - this.db_name = null; + /** + * Performs a deep copy on other. + */ + public grant_privileges_result(grant_privileges_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public grant_privileges_result deepCopy() { + return new grant_privileges_result(this); } - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; } - public String getTbl_name() { - return this.tbl_name; + public boolean isSuccess() { + return this.success; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setTbl_nameIsSet(boolean value) { - if (!value) { - this.tbl_name = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } - public String getIndex_name() { - return this.index_name; + public MetaException getO1() { + return this.o1; } - public void setIndex_name(String index_name) { - this.index_name = index_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetIndex_name() { - this.index_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field index_name is set (has been asigned a value) and false otherwise */ - public boolean isSetIndex_name() { - return this.index_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setIndex_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.index_name = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((Boolean)value); } break; - case INDEX_NAME: + case O1: if (value == null) { - unsetIndex_name(); + unsetO1(); } else { - setIndex_name((String)value); + setO1((MetaException)value); } break; @@ -35519,14 +59428,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return new Boolean(isSuccess()); - case INDEX_NAME: - return getIndex_name(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -35539,12 +59445,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -35553,39 +59457,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_by_name_args) - return this.equals((get_index_by_name_args)that); + if (that instanceof grant_privileges_result) + return this.equals((grant_privileges_result)that); return false; } - public boolean equals(get_index_by_name_args that) { + public boolean equals(grant_privileges_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (this.success != that.success) return false; } - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) + 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.index_name.equals(that.index_name)) + if (!this.o1.equals(that.o1)) return false; } @@ -35597,40 +59492,30 @@ return 0; } - public int compareTo(get_index_by_name_args other) { + public int compareTo(grant_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_index_by_name_args typedOther = (get_index_by_name_args)other; + grant_privileges_result typedOther = (grant_privileges_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetIndex_name()) { - lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -35652,23 +59537,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // INDEX_NAME - if (field.type == TType.STRING) { - this.index_name = iprot.readString(); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -35683,22 +59563,15 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -35707,30 +59580,18 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_args("); + StringBuilder sb = new StringBuilder("grant_privileges_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.index_name); + sb.append(this.o1); } first = false; sb.append(")"); @@ -35743,22 +59604,25 @@ } - public static class get_index_by_name_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_index_by_name_result"); + public static class revoke_privileges_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_privileges_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)4); - private Index success; - private MetaException o1; - private NoSuchObjectException o2; + private String user_name; + private boolean is_role; + private boolean is_group; + private PrivilegeBag privileges; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + USER_NAME((short)1, "user_name"), + IS_ROLE((short)2, "is_role"), + IS_GROUP((short)3, "is_group"), + PRIVILEGES((short)4, "privileges"); private static final Map byName = new HashMap(); @@ -35773,12 +59637,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // USER_NAME + return USER_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; + case 4: // PRIVILEGES + return PRIVILEGES; default: return null; } @@ -35819,152 +59685,194 @@ } // isset id assignments + private static final int __IS_ROLE_ISSET_ID = 0; + private static final int __IS_GROUP_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrivilegeBag.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap); } - public get_index_by_name_result() { + public revoke_privileges_args() { } - public get_index_by_name_result( - Index success, - MetaException o1, - NoSuchObjectException o2) + public revoke_privileges_args( + String user_name, + boolean is_role, + boolean is_group, + PrivilegeBag privileges) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.user_name = user_name; + this.is_role = is_role; + setIs_roleIsSet(true); + this.is_group = is_group; + setIs_groupIsSet(true); + this.privileges = privileges; } /** * Performs a deep copy on other. */ - public get_index_by_name_result(get_index_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + public revoke_privileges_args(revoke_privileges_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + this.is_role = other.is_role; + this.is_group = other.is_group; + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); } } - public get_index_by_name_result deepCopy() { - return new get_index_by_name_result(this); + public revoke_privileges_args deepCopy() { + return new revoke_privileges_args(this); } @Override public void clear() { - this.success = null; - this.o1 = null; - this.o2 = null; + this.user_name = null; + setIs_roleIsSet(false); + this.is_role = false; + setIs_groupIsSet(false); + this.is_group = false; + this.privileges = null; } - public Index getSuccess() { - return this.success; + public String getUser_name() { + return this.user_name; } - public void setSuccess(Index success) { - this.success = success; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetSuccess() { - this.success = null; + public void unsetUser_name() { + this.user_name = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; } - public void setSuccessIsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.success = null; + this.user_name = null; } } - public MetaException getO1() { - return this.o1; + public boolean isIs_role() { + return this.is_role; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); } - public void unsetO1() { - this.o1 = null; + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); } - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); } - public NoSuchObjectException getO2() { - return this.o2; + public boolean isIs_group() { + return this.is_group; } - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); } - public void unsetO2() { - this.o2 = null; + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); } - public void setO2IsSet(boolean value) { + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); + } + + 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 asigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public void setPrivilegesIsSet(boolean value) { if (!value) { - this.o2 = null; + this.privileges = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case USER_NAME: if (value == null) { - unsetSuccess(); + unsetUser_name(); } else { - setSuccess((Index)value); + setUser_name((String)value); } break; - case O1: + case IS_ROLE: if (value == null) { - unsetO1(); + unsetIs_role(); } else { - setO1((MetaException)value); + setIs_role((Boolean)value); } break; - case O2: + case IS_GROUP: if (value == null) { - unsetO2(); + unsetIs_group(); } else { - setO2((NoSuchObjectException)value); + setIs_group((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrivilegeBag)value); } break; @@ -35973,14 +59881,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case USER_NAME: + return getUser_name(); - case O1: - return getO1(); + case IS_ROLE: + return new Boolean(isIs_role()); - case O2: - return getO2(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case PRIVILEGES: + return getPrivileges(); } throw new IllegalStateException(); @@ -35993,12 +59904,14 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case PRIVILEGES: + return isSetPrivileges(); } throw new IllegalStateException(); } @@ -36007,39 +59920,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_by_name_result) - return this.equals((get_index_by_name_result)that); + if (that instanceof revoke_privileges_args) + return this.equals((revoke_privileges_args)that); return false; } - public boolean equals(get_index_by_name_result that) { + public boolean equals(revoke_privileges_args 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)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (!this.success.equals(that.success)) + if (!this.user_name.equals(that.user_name)) 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)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_role != that.is_role) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_group != that.is_group) + 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; } @@ -36051,40 +59973,50 @@ return 0; } - public int compareTo(get_index_by_name_result other) { + public int compareTo(revoke_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_index_by_name_result typedOther = (get_index_by_name_result)other; + revoke_privileges_args typedOther = (revoke_privileges_args)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); if (lastComparison != 0) { return lastComparison; } @@ -36106,26 +60038,33 @@ break; } switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); + case 1: // USER_NAME + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case 2: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // PRIVILEGES if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); + this.privileges = new PrivilegeBag(); + this.privileges.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -36140,19 +60079,23 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -36161,30 +60104,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_result("); + StringBuilder sb = new StringBuilder("revoke_privileges_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } + sb.append("is_role:"); + sb.append(this.is_role); first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.privileges); } first = false; sb.append(")"); @@ -36197,22 +60140,19 @@ } - public static class get_indexes_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_indexes_args"); + public static class revoke_privileges_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_privileges_result"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private short max_indexes; + private boolean success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_INDEXES((short)3, "max_indexes"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -36227,12 +60167,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_INDEXES - return MAX_INDEXES; + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; default: return null; } @@ -36273,157 +60211,116 @@ } // isset id assignments - private static final int __MAX_INDEXES_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_privileges_result.class, metaDataMap); } - public get_indexes_args() { - this.max_indexes = (short)-1; - + public revoke_privileges_result() { } - public get_indexes_args( - String db_name, - String tbl_name, - short max_indexes) + public revoke_privileges_result( + boolean success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_indexes_args(get_indexes_args other) { + public revoke_privileges_result(revoke_privileges_result other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - this.max_indexes = other.max_indexes; } - public get_indexes_args deepCopy() { - return new get_indexes_args(this); + public revoke_privileges_result deepCopy() { + return new revoke_privileges_result(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_indexes = (short)-1; - + setSuccessIsSet(false); + this.success = false; + this.o1 = null; } - public String getDb_name() { - return this.db_name; + public boolean isSuccess() { + return this.success; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); } - public void unsetDb_name() { - this.db_name = null; + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } - public String getTbl_name() { - return this.tbl_name; + public MetaException getO1() { + return this.o1; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setTbl_nameIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.o1 = null; } } - public short getMax_indexes() { - return this.max_indexes; - } - - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); - } - - public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); - } - - /** Returns true if field max_indexes is set (has been asigned a value) and false otherwise */ - public boolean isSetMax_indexes() { - return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); - } - - public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((Boolean)value); } break; - case MAX_INDEXES: + case O1: if (value == null) { - unsetMax_indexes(); + unsetO1(); } else { - setMax_indexes((Short)value); + setO1((MetaException)value); } break; @@ -36432,14 +60329,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return new Boolean(isSuccess()); - case MAX_INDEXES: - return new Short(getMax_indexes()); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -36452,12 +60346,10 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -36466,39 +60358,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_indexes_args) - return this.equals((get_indexes_args)that); + if (that instanceof revoke_privileges_result) + return this.equals((revoke_privileges_result)that); return false; } - public boolean equals(get_indexes_args that) { + public boolean equals(revoke_privileges_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + 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.tbl_name.equals(that.tbl_name)) + if (this.success != that.success) return false; } - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) + 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.max_indexes != that.max_indexes) + if (!this.o1.equals(that.o1)) return false; } @@ -36510,40 +60393,30 @@ return 0; } - public int compareTo(get_indexes_args other) { + public int compareTo(revoke_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_indexes_args typedOther = (get_indexes_args)other; + revoke_privileges_result typedOther = (revoke_privileges_result)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_indexes()) { - lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -36565,24 +60438,18 @@ break; } switch (field.id) { - case 1: // DB_NAME - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 0: // SUCCESS + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // MAX_INDEXES - if (field.type == TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); + case 1: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -36597,50 +60464,37 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_args("); + StringBuilder sb = new StringBuilder("revoke_privileges_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); - first = false; sb.append(")"); return sb.toString(); } @@ -36651,22 +60505,37 @@ } - public static class get_indexes_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_indexes_result"); + public static class revoke_all_privileges_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_all_privileges_args"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); + private static final TField REMOVE_USER_PRIV_FIELD_DESC = new TField("remove_user_priv", TType.BOOL, (short)4); + private static final TField DBS_FIELD_DESC = new TField("dbs", TType.LIST, (short)5); + private static final TField TABLES_FIELD_DESC = new TField("tables", TType.LIST, (short)6); + private static final TField PARTS_FIELD_DESC = new TField("parts", TType.LIST, (short)7); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.MAP, (short)8); - private List success; - private NoSuchObjectException o1; - private MetaException o2; + private String user_name; + private boolean is_role; + private boolean is_group; + private boolean remove_user_priv; + private List dbs; + private List
tables; + private List parts; + private Map> columns; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { - SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + USER_NAME((short)1, "user_name"), + IS_ROLE((short)2, "is_role"), + IS_GROUP((short)3, "is_group"), + REMOVE_USER_PRIV((short)4, "remove_user_priv"), + DBS((short)5, "dbs"), + TABLES((short)6, "tables"), + PARTS((short)7, "parts"), + COLUMNS((short)8, "columns"); private static final Map byName = new HashMap(); @@ -36681,12 +60550,22 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 - return O2; + case 1: // USER_NAME + return USER_NAME; + case 2: // IS_ROLE + return IS_ROLE; + case 3: // IS_GROUP + return IS_GROUP; + case 4: // REMOVE_USER_PRIV + return REMOVE_USER_PRIV; + case 5: // DBS + return DBS; + case 6: // TABLES + return TABLES; + case 7: // PARTS + return PARTS; + case 8: // COLUMNS + return COLUMNS; default: return null; } @@ -36727,648 +60606,439 @@ } // isset id assignments + private static final int __IS_ROLE_ISSET_ID = 0; + private static final int __IS_GROUP_ISSET_ID = 1; + private static final int __REMOVE_USER_PRIV_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.REMOVE_USER_PRIV, new FieldMetaData("remove_user_priv", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.DBS, new FieldMetaData("dbs", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Index.class)))); - tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + new StructMetaData(TType.STRUCT, Database.class)))); + tmpMap.put(_Fields.TABLES, new FieldMetaData("tables", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Table.class)))); + tmpMap.put(_Fields.PARTS, new FieldMetaData("parts", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); + tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new StructMetaData(TType.STRUCT, Table.class), + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING))))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_all_privileges_args.class, metaDataMap); } - public get_indexes_result() { + public revoke_all_privileges_args() { } - public get_indexes_result( - List success, - NoSuchObjectException o1, - MetaException o2) + public revoke_all_privileges_args( + String user_name, + boolean is_role, + boolean is_group, + boolean remove_user_priv, + List dbs, + List
tables, + List parts, + Map> columns) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.user_name = user_name; + this.is_role = is_role; + setIs_roleIsSet(true); + this.is_group = is_group; + setIs_groupIsSet(true); + this.remove_user_priv = remove_user_priv; + setRemove_user_privIsSet(true); + this.dbs = dbs; + this.tables = tables; + this.parts = parts; + this.columns = columns; } /** * Performs a deep copy on other. */ - public get_indexes_result(get_indexes_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Index other_element : other.success) { - __this__success.add(new Index(other_element)); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - public get_indexes_result deepCopy() { - return new get_indexes_result(this); - } - - @Override - public void clear() { - this.success = null; - this.o1 = null; - this.o2 = 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(Index 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 asigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public NoSuchObjectException getO1() { - return this.o1; - } - - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; - } - - public void unsetO1() { - this.o1 = null; - } - - /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ - public boolean isSetO1() { - return this.o1 != null; - } - - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; - } - } - - public MetaException getO2() { - return this.o2; - } - - public void setO2(MetaException o2) { - this.o2 = o2; - } - - public void unsetO2() { - this.o2 = null; - } - - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; - } - - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; + public revoke_all_privileges_args(revoke_all_privileges_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); + this.is_role = other.is_role; + this.is_group = other.is_group; + this.remove_user_priv = other.remove_user_priv; + if (other.isSetDbs()) { + List __this__dbs = new ArrayList(); + for (Database other_element : other.dbs) { + __this__dbs.add(new Database(other_element)); } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); + this.dbs = __this__dbs; + } + if (other.isSetTables()) { + List
__this__tables = new ArrayList
(); + for (Table other_element : other.tables) { + __this__tables.add(new Table(other_element)); } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + this.tables = __this__tables; + } + if (other.isSetParts()) { + List __this__parts = new ArrayList(); + for (Partition other_element : other.parts) { + __this__parts.add(new Partition(other_element)); } - break; - + this.parts = __this__parts; } - } + if (other.isSetColumns()) { + Map> __this__columns = new HashMap>(); + for (Map.Entry> other_element : other.columns.entrySet()) { - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); + Table other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); - case O1: - return getO1(); + Table __this__columns_copy_key = new Table(other_element_key); - case O2: - return getO2(); + List __this__columns_copy_value = new ArrayList(); + for (String other_element_value_element : other_element_value) { + __this__columns_copy_value.add(other_element_value_element); + } + __this__columns.put(__this__columns_copy_key, __this__columns_copy_value); + } + this.columns = __this__columns; } - throw new IllegalStateException(); } - /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - case O2: - return isSetO2(); - } - throw new IllegalStateException(); + public revoke_all_privileges_args deepCopy() { + return new revoke_all_privileges_args(this); } @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_indexes_result) - return this.equals((get_indexes_result)that); - return false; + public void clear() { + this.user_name = null; + setIs_roleIsSet(false); + this.is_role = false; + setIs_groupIsSet(false); + this.is_group = false; + setRemove_user_privIsSet(false); + this.remove_user_priv = false; + this.dbs = null; + this.tables = null; + this.parts = null; + this.columns = null; } - public boolean equals(get_indexes_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; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; + public String getUser_name() { + return this.user_name; } - @Override - public int hashCode() { - return 0; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public int compareTo(get_indexes_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } + public void unsetUser_name() { + this.user_name = null; + } - int lastComparison = 0; - get_indexes_result typedOther = (get_indexes_result)other; + /** Returns true if field user_name is set (has been asigned a value) and false otherwise */ + public boolean isSetUser_name() { + return this.user_name != null; + } - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); - if (lastComparison != 0) { - return lastComparison; - } + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; } - return 0; } - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); + public boolean isIs_role() { + return this.is_role; } - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) { - case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list141 = iprot.readListBegin(); - this.success = new ArrayList(_list141.size); - for (int _i142 = 0; _i142 < _list141.size; ++_i142) - { - Index _elem143; - _elem143 = new Index(); - _elem143.read(iprot); - this.success.add(_elem143); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 2: // O2 - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - validate(); + public void setIs_role(boolean is_role) { + this.is_role = is_role; + setIs_roleIsSet(true); } - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Index _iter144 : this.success) - { - _iter144.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + public void unsetIs_role() { + __isset_bit_vector.clear(__IS_ROLE_ISSET_ID); } - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_result("); - boolean first = true; + /** Returns true if field is_role is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_role() { + return __isset_bit_vector.get(__IS_ROLE_ISSET_ID); + } - 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; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - sb.append(")"); - return sb.toString(); + public void setIs_roleIsSet(boolean value) { + __isset_bit_vector.set(__IS_ROLE_ISSET_ID, value); } - public void validate() throws TException { - // check for required fields + public boolean isIs_group() { + return this.is_group; } - } + public void setIs_group(boolean is_group) { + this.is_group = is_group; + setIs_groupIsSet(true); + } - public static class get_index_names_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_index_names_args"); + public void unsetIs_group() { + __isset_bit_vector.clear(__IS_GROUP_ISSET_ID); + } - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); + /** Returns true if field is_group is set (has been asigned a value) and false otherwise */ + public boolean isSetIs_group() { + return __isset_bit_vector.get(__IS_GROUP_ISSET_ID); + } - private String db_name; - private String tbl_name; - private short max_indexes; + public void setIs_groupIsSet(boolean value) { + __isset_bit_vector.set(__IS_GROUP_ISSET_ID, value); + } - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_INDEXES((short)3, "max_indexes"); + public boolean isRemove_user_priv() { + return this.remove_user_priv; + } - private static final Map byName = new HashMap(); + public void setRemove_user_priv(boolean remove_user_priv) { + this.remove_user_priv = remove_user_priv; + setRemove_user_privIsSet(true); + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } + public void unsetRemove_user_priv() { + __isset_bit_vector.clear(__REMOVE_USER_PRIV_ISSET_ID); + } - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DB_NAME - return DB_NAME; - case 2: // TBL_NAME - return TBL_NAME; - case 3: // MAX_INDEXES - return MAX_INDEXES; - default: - return null; - } - } + /** Returns true if field remove_user_priv is set (has been asigned a value) and false otherwise */ + public boolean isSetRemove_user_priv() { + return __isset_bit_vector.get(__REMOVE_USER_PRIV_ISSET_ID); + } - /** - * 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; - } + public void setRemove_user_privIsSet(boolean value) { + __isset_bit_vector.set(__REMOVE_USER_PRIV_ISSET_ID, value); + } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } + public int getDbsSize() { + return (this.dbs == null) ? 0 : this.dbs.size(); + } - private final short _thriftId; - private final String _fieldName; + public java.util.Iterator getDbsIterator() { + return (this.dbs == null) ? null : this.dbs.iterator(); + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; + public void addToDbs(Database elem) { + if (this.dbs == null) { + this.dbs = new ArrayList(); } + this.dbs.add(elem); + } - public short getThriftFieldId() { - return _thriftId; - } + public List getDbs() { + return this.dbs; + } - public String getFieldName() { - return _fieldName; - } + public void setDbs(List dbs) { + this.dbs = dbs; } - // isset id assignments - private static final int __MAX_INDEXES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); + public void unsetDbs() { + this.dbs = null; + } - public static final Map<_Fields, FieldMetaData> metaDataMap; - static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); + /** Returns true if field dbs is set (has been asigned a value) and false otherwise */ + public boolean isSetDbs() { + return this.dbs != null; } - public get_index_names_args() { - this.max_indexes = (short)-1; + public void setDbsIsSet(boolean value) { + if (!value) { + this.dbs = null; + } + } + public int getTablesSize() { + return (this.tables == null) ? 0 : this.tables.size(); } - public get_index_names_args( - String db_name, - String tbl_name, - short max_indexes) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + public java.util.Iterator
getTablesIterator() { + return (this.tables == null) ? null : this.tables.iterator(); } - /** - * Performs a deep copy on other. - */ - public get_index_names_args(get_index_names_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public void addToTables(Table elem) { + if (this.tables == null) { + this.tables = new ArrayList
(); } - this.max_indexes = other.max_indexes; + this.tables.add(elem); } - public get_index_names_args deepCopy() { - return new get_index_names_args(this); + public List
getTables() { + return this.tables; } - @Override - public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_indexes = (short)-1; + public void setTables(List
tables) { + this.tables = tables; + } + public void unsetTables() { + this.tables = null; } - public String getDb_name() { - return this.db_name; + /** Returns true if field tables is set (has been asigned a value) and false otherwise */ + public boolean isSetTables() { + return this.tables != null; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setTablesIsSet(boolean value) { + if (!value) { + this.tables = null; + } } - public void unsetDb_name() { - this.db_name = null; + public int getPartsSize() { + return (this.parts == null) ? 0 : this.parts.size(); } - /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public java.util.Iterator getPartsIterator() { + return (this.parts == null) ? null : this.parts.iterator(); } - public void setDb_nameIsSet(boolean value) { - if (!value) { - this.db_name = null; + public void addToParts(Partition elem) { + if (this.parts == null) { + this.parts = new ArrayList(); } + this.parts.add(elem); } - public String getTbl_name() { - return this.tbl_name; + public List getParts() { + return this.parts; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setParts(List parts) { + this.parts = parts; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetParts() { + this.parts = null; } - /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl_name() { - return this.tbl_name != null; + /** Returns true if field parts is set (has been asigned a value) and false otherwise */ + public boolean isSetParts() { + return this.parts != null; } - public void setTbl_nameIsSet(boolean value) { + public void setPartsIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.parts = null; } } - public short getMax_indexes() { - return this.max_indexes; + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); } - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + public void putToColumns(Table key, List val) { + if (this.columns == null) { + this.columns = new HashMap>(); + } + this.columns.put(key, val); } - public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + public Map> getColumns() { + return this.columns; } - /** Returns true if field max_indexes is set (has been asigned a value) and false otherwise */ - public boolean isSetMax_indexes() { - return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + public void setColumns(Map> columns) { + this.columns = columns; } - public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been asigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: + case USER_NAME: if (value == null) { - unsetDb_name(); + unsetUser_name(); } else { - setDb_name((String)value); + setUser_name((String)value); } break; - case TBL_NAME: + case IS_ROLE: if (value == null) { - unsetTbl_name(); + unsetIs_role(); } else { - setTbl_name((String)value); + setIs_role((Boolean)value); } break; - case MAX_INDEXES: + case IS_GROUP: if (value == null) { - unsetMax_indexes(); + unsetIs_group(); } else { - setMax_indexes((Short)value); + setIs_group((Boolean)value); + } + break; + + case REMOVE_USER_PRIV: + if (value == null) { + unsetRemove_user_priv(); + } else { + setRemove_user_priv((Boolean)value); + } + break; + + case DBS: + if (value == null) { + unsetDbs(); + } else { + setDbs((List)value); + } + break; + + case TABLES: + if (value == null) { + unsetTables(); + } else { + setTables((List
)value); + } + break; + + case PARTS: + if (value == null) { + unsetParts(); + } else { + setParts((List)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((Map>)value); } break; @@ -37377,14 +61047,29 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case USER_NAME: + return getUser_name(); - case TBL_NAME: - return getTbl_name(); + case IS_ROLE: + return new Boolean(isIs_role()); - case MAX_INDEXES: - return new Short(getMax_indexes()); + case IS_GROUP: + return new Boolean(isIs_group()); + + case REMOVE_USER_PRIV: + return new Boolean(isRemove_user_priv()); + + case DBS: + return getDbs(); + + case TABLES: + return getTables(); + + case PARTS: + return getParts(); + + case COLUMNS: + return getColumns(); } throw new IllegalStateException(); @@ -37397,12 +61082,22 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case REMOVE_USER_PRIV: + return isSetRemove_user_priv(); + case DBS: + return isSetDbs(); + case TABLES: + return isSetTables(); + case PARTS: + return isSetParts(); + case COLUMNS: + return isSetColumns(); } throw new IllegalStateException(); } @@ -37411,39 +61106,84 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_names_args) - return this.equals((get_index_names_args)that); + if (that instanceof revoke_all_privileges_args) + return this.equals((revoke_all_privileges_args)that); return false; } - public boolean equals(get_index_names_args that) { + public boolean equals(revoke_all_privileges_args that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (!this.db_name.equals(that.db_name)) + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (this.is_role != that.is_role) return false; } - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (this.max_indexes != that.max_indexes) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_remove_user_priv = true; + boolean that_present_remove_user_priv = true; + if (this_present_remove_user_priv || that_present_remove_user_priv) { + if (!(this_present_remove_user_priv && that_present_remove_user_priv)) + return false; + if (this.remove_user_priv != that.remove_user_priv) + return false; + } + + boolean this_present_dbs = true && this.isSetDbs(); + boolean that_present_dbs = true && that.isSetDbs(); + if (this_present_dbs || that_present_dbs) { + if (!(this_present_dbs && that_present_dbs)) + return false; + if (!this.dbs.equals(that.dbs)) + return false; + } + + boolean this_present_tables = true && this.isSetTables(); + boolean that_present_tables = true && that.isSetTables(); + if (this_present_tables || that_present_tables) { + if (!(this_present_tables && that_present_tables)) + return false; + if (!this.tables.equals(that.tables)) + return false; + } + + boolean this_present_parts = true && this.isSetParts(); + boolean that_present_parts = true && that.isSetParts(); + if (this_present_parts || that_present_parts) { + if (!(this_present_parts && that_present_parts)) + return false; + if (!this.parts.equals(that.parts)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) return false; } @@ -37455,40 +61195,90 @@ return 0; } - public int compareTo(get_index_names_args other) { + public int compareTo(revoke_all_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_index_names_args typedOther = (get_index_names_args)other; + revoke_all_privileges_args typedOther = (revoke_all_privileges_args)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetIs_role()).compareTo(typedOther.isSetIs_role()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetIs_role()) { + lastComparison = TBaseHelper.compareTo(this.is_role, typedOther.is_role); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + lastComparison = Boolean.valueOf(isSetIs_group()).compareTo(typedOther.isSetIs_group()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_indexes()) { - lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (isSetIs_group()) { + lastComparison = TBaseHelper.compareTo(this.is_group, typedOther.is_group); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRemove_user_priv()).compareTo(typedOther.isSetRemove_user_priv()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRemove_user_priv()) { + lastComparison = TBaseHelper.compareTo(this.remove_user_priv, typedOther.remove_user_priv); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbs()).compareTo(typedOther.isSetDbs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbs()) { + lastComparison = TBaseHelper.compareTo(this.dbs, typedOther.dbs); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTables()).compareTo(typedOther.isSetTables()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTables()) { + lastComparison = TBaseHelper.compareTo(this.tables, typedOther.tables); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParts()).compareTo(typedOther.isSetParts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParts()) { + lastComparison = TBaseHelper.compareTo(this.parts, typedOther.parts); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns); if (lastComparison != 0) { return lastComparison; } @@ -37510,24 +61300,117 @@ break; } switch (field.id) { - case 1: // DB_NAME + case 1: // USER_NAME if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TBL_NAME - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case 2: // IS_ROLE + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + setIs_roleIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // MAX_INDEXES - if (field.type == TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); + case 3: // IS_GROUP + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + setIs_groupIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // REMOVE_USER_PRIV + if (field.type == TType.BOOL) { + this.remove_user_priv = iprot.readBool(); + setRemove_user_privIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // DBS + if (field.type == TType.LIST) { + { + TList _list265 = iprot.readListBegin(); + this.dbs = new ArrayList(_list265.size); + for (int _i266 = 0; _i266 < _list265.size; ++_i266) + { + Database _elem267; + _elem267 = new Database(); + _elem267.read(iprot); + this.dbs.add(_elem267); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // TABLES + if (field.type == TType.LIST) { + { + TList _list268 = iprot.readListBegin(); + this.tables = new ArrayList
(_list268.size); + for (int _i269 = 0; _i269 < _list268.size; ++_i269) + { + Table _elem270; + _elem270 = new Table(); + _elem270.read(iprot); + this.tables.add(_elem270); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 7: // PARTS + if (field.type == TType.LIST) { + { + TList _list271 = iprot.readListBegin(); + this.parts = new ArrayList(_list271.size); + for (int _i272 = 0; _i272 < _list271.size; ++_i272) + { + Partition _elem273; + _elem273 = new Partition(); + _elem273.read(iprot); + this.parts.add(_elem273); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 8: // COLUMNS + if (field.type == TType.MAP) { + { + TMap _map274 = iprot.readMapBegin(); + this.columns = new HashMap>(2*_map274.size); + for (int _i275 = 0; _i275 < _map274.size; ++_i275) + { + Table _key276; + List _val277; + _key276 = new Table(); + _key276.read(iprot); + { + TList _list278 = iprot.readListBegin(); + _val277 = new ArrayList(_list278.size); + for (int _i279 = 0; _i279 < _list278.size; ++_i279) + { + String _elem280; + _elem280 = iprot.readString(); + _val277.add(_elem280); + } + iprot.readListEnd(); + } + this.columns.put(_key276, _val277); + } + iprot.readMapEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -37535,56 +61418,145 @@ default: TProtocolUtil.skip(iprot, field.type); } - iprot.readFieldEnd(); + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(REMOVE_USER_PRIV_FIELD_DESC); + oprot.writeBool(this.remove_user_priv); + oprot.writeFieldEnd(); + if (this.dbs != null) { + oprot.writeFieldBegin(DBS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.dbs.size())); + for (Database _iter281 : this.dbs) + { + _iter281.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.tables != null) { + oprot.writeFieldBegin(TABLES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.tables.size())); + for (Table _iter282 : this.tables) + { + _iter282.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); } - iprot.readStructEnd(); - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + if (this.parts != null) { + oprot.writeFieldBegin(PARTS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.parts.size())); + for (Partition _iter283 : this.parts) + { + _iter283.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + if (this.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.LIST, this.columns.size())); + for (Map.Entry> _iter284 : this.columns.entrySet()) + { + _iter284.getKey().write(oprot); + { + oprot.writeListBegin(new TList(TType.STRING, _iter284.getValue().size())); + for (String _iter285 : _iter284.getValue()) + { + oprot.writeString(_iter285); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_args("); + StringBuilder sb = new StringBuilder("revoke_all_privileges_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("remove_user_priv:"); + sb.append(this.remove_user_priv); + first = false; + if (!first) sb.append(", "); + sb.append("dbs:"); + if (this.dbs == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.dbs); } first = false; if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); + sb.append("tables:"); + if (this.tables == null) { + sb.append("null"); + } else { + sb.append(this.tables); + } + first = false; + if (!first) sb.append(", "); + sb.append("parts:"); + if (this.parts == null) { + sb.append("null"); + } else { + sb.append(this.parts); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } first = false; sb.append(")"); return sb.toString(); @@ -37596,19 +61568,19 @@ } - public static class get_index_names_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_index_names_result"); + public static class revoke_all_privileges_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_all_privileges_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private List success; - private MetaException o2; + private boolean success; + private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { SUCCESS((short)0, "success"), - O2((short)1, "o2"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -37625,8 +61597,8 @@ switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // O2 - return O2; + case 1: // O1 + return O1; default: return null; } @@ -37667,115 +61639,98 @@ } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_all_privileges_result.class, metaDataMap); } - public get_index_names_result() { + public revoke_all_privileges_result() { } - public get_index_names_result( - List success, - MetaException o2) + public revoke_all_privileges_result( + boolean success, + MetaException o1) { this(); this.success = success; - this.o2 = o2; + setSuccessIsSet(true); + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_index_names_result(get_index_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + public revoke_all_privileges_result(revoke_all_privileges_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public get_index_names_result deepCopy() { - return new get_index_names_result(this); + public revoke_all_privileges_result deepCopy() { + return new revoke_all_privileges_result(this); } @Override public void clear() { - this.success = null; - this.o2 = 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(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + setSuccessIsSet(false); + this.success = false; + this.o1 = null; } - 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_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } - public MetaException getO2() { - return this.o2; + public MetaException getO1() { + return this.o1; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetO2() { - this.o2 = null; + public void unsetO1() { + this.o1 = null; } - /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ - public boolean isSetO2() { - return this.o2 != null; + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setO2IsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.o2 = null; + this.o1 = null; } } @@ -37785,15 +61740,15 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; - case O2: + case O1: if (value == null) { - unsetO2(); + unsetO1(); } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -37803,10 +61758,10 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); - case O2: - return getO2(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -37821,8 +61776,8 @@ switch (field) { case SUCCESS: return isSetSuccess(); - case O2: - return isSetO2(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -37831,30 +61786,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_names_result) - return this.equals((get_index_names_result)that); + if (that instanceof revoke_all_privileges_result) + return this.equals((revoke_all_privileges_result)that); return false; } - public boolean equals(get_index_names_result that) { + public boolean equals(revoke_all_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; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + 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.o2.equals(that.o2)) + if (!this.o1.equals(that.o1)) return false; } @@ -37866,13 +61821,13 @@ return 0; } - public int compareTo(get_index_names_result other) { + public int compareTo(revoke_all_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_index_names_result typedOther = (get_index_names_result)other; + revoke_all_privileges_result typedOther = (revoke_all_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -37884,12 +61839,12 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -37912,26 +61867,17 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list145 = iprot.readListBegin(); - this.success = new ArrayList(_list145.size); - for (int _i146 = 0; _i146 < _list145.size; ++_i146) - { - String _elem147; - _elem147 = iprot.readString(); - this.success.add(_elem147); - } - iprot.readListEnd(); - } + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O2 + case 1: // O1 if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -37950,18 +61896,11 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter148 : this.success) - { - oprot.writeString(_iter148); - } - oprot.writeListEnd(); - } + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -37970,22 +61909,18 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_result("); + StringBuilder sb = new StringBuilder("revoke_all_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("o2:"); - if (this.o2 == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.o1); } first = false; sb.append(")"); Index: metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php =================================================================== --- metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (revision 1044070) +++ metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (working copy) @@ -33,10 +33,13 @@ public function drop_partition($db_name, $tbl_name, $part_vals, $deleteData); public function drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData); public function get_partition($db_name, $tbl_name, $part_vals); + public function get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names); public function get_partition_by_name($db_name, $tbl_name, $part_name); public function get_partitions($db_name, $tbl_name, $max_parts); + public function get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names); public function get_partition_names($db_name, $tbl_name, $max_parts); public function get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts); + public function get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names); public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts); public function get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts); public function alter_partition($db_name, $tbl_name, $new_part); @@ -49,6 +52,24 @@ public function get_index_by_name($db_name, $tbl_name, $index_name); public function get_indexes($db_name, $tbl_name, $max_indexes); public function get_index_names($db_name, $tbl_name, $max_indexes); + public function get_user_privilege_set($user_name, $group_names); + public function get_db_privilege_set($db_name, $user_name, $group_names); + public function get_table_privilege_set($db_name, $table_name, $user_name, $group_names); + public function get_partition_privilege_set($db_name, $table_name, $part_name, $user_name, $group_names); + public function get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names); + public function create_role($role_name, $owner_name, $db_name); + public function drop_role($role_name, $db_name); + public function add_role_member($role_name, $user_name, $is_role, $is_group, $db_name); + public function remove_role_member($role_name, $user_name, $is_role, $is_group, $db_name); + public function list_roles($principal_name, $is_role, $is_group, $db_name); + public function list_security_user_grant($principla_name, $is_role, $is_group); + public function list_security_db_grant($principal_name, $is_group, $is_role, $db_name); + public function list_security_table_grant($principal_name, $is_group, $is_role, $db_name, $table_name); + public function list_security_partition_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name); + public function list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name, $column_name); + public function grant_privileges($user_name, $is_role, $is_group, $privileges, $grantor); + public function revoke_privileges($user_name, $is_role, $is_group, $privileges); + public function revoke_all_privileges($user_name, $is_role, $is_group, $remove_user_priv, $dbs, $tables, $parts, $columns); } class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftHiveMetastoreIf { @@ -1387,6 +1408,67 @@ throw new Exception("get_partition failed: unknown result"); } + public function get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names) + { + $this->send_get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names); + return $this->recv_get_partition_with_auth(); + } + + public function send_get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_partition_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_with_auth() + { + $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_get_partition_with_auth_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_get_partition_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partition_with_auth failed: unknown result"); + } + public function get_partition_by_name($db_name, $tbl_name, $part_name) { $this->send_get_partition_by_name($db_name, $tbl_name, $part_name); @@ -1505,6 +1587,67 @@ throw new Exception("get_partitions failed: unknown result"); } + public function get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names) + { + $this->send_get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names); + return $this->recv_get_partitions_with_auth(); + } + + public function send_get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_partitions_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_with_auth() + { + $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_get_partitions_with_auth_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_get_partitions_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partitions_with_auth failed: unknown result"); + } + public function get_partition_names($db_name, $tbl_name, $max_parts) { $this->send_get_partition_names($db_name, $tbl_name, $max_parts); @@ -1618,6 +1761,68 @@ throw new Exception("get_partitions_ps failed: unknown result"); } + public function get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names) + { + $this->send_get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names); + return $this->recv_get_partitions_ps_with_auth(); + } + + public function send_get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_ps_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_ps_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_ps_with_auth() + { + $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_get_partitions_ps_with_auth_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_get_partitions_ps_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partitions_ps_with_auth failed: unknown result"); + } + public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) { $this->send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts); @@ -2306,129 +2511,5777 @@ throw new Exception("get_index_names failed: unknown result"); } -} - -// HELPER FUNCTIONS AND STRUCTURES + public function get_user_privilege_set($user_name, $group_names) + { + $this->send_get_user_privilege_set($user_name, $group_names); + return $this->recv_get_user_privilege_set(); + } -class metastore_ThriftHiveMetastore_create_database_args { - static $_TSPEC; + public function send_get_user_privilege_set($user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_user_privilege_set_args(); + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_user_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_user_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } - public $database = null; + public function recv_get_user_privilege_set() + { + $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_get_user_privilege_set_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'database', - 'type' => TType::STRUCT, - 'class' => 'metastore_Database', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['database'])) { - $this->database = $vals['database']; + $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_get_user_privilege_set_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("get_user_privilege_set failed: unknown result"); } - public function getName() { - return 'ThriftHiveMetastore_create_database_args'; + public function get_db_privilege_set($db_name, $user_name, $group_names) + { + $this->send_get_db_privilege_set($db_name, $user_name, $group_names); + return $this->recv_get_db_privilege_set(); } - public function read($input) + public function send_get_db_privilege_set($db_name, $user_name, $group_names) { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) + $args = new metastore_ThriftHiveMetastore_get_db_privilege_set_args(); + $args->db_name = $db_name; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->database = new metastore_Database(); - $xfer += $this->database->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); + thrift_protocol_write_binary($this->output_, 'get_db_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args'); - if ($this->database !== null) { - if (!is_object($this->database)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); - $xfer += $this->database->write($output); - $xfer += $output->writeFieldEnd(); + else + { + $this->output_->writeMessageBegin('get_db_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; + } + + public function recv_get_db_privilege_set() + { + $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_get_db_privilege_set_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_get_db_privilege_set_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("get_db_privilege_set failed: unknown result"); + } + + public function get_table_privilege_set($db_name, $table_name, $user_name, $group_names) + { + $this->send_get_table_privilege_set($db_name, $table_name, $user_name, $group_names); + return $this->recv_get_table_privilege_set(); + } + + public function send_get_table_privilege_set($db_name, $table_name, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_table_privilege_set_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_privilege_set() + { + $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_get_table_privilege_set_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_get_table_privilege_set_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("get_table_privilege_set failed: unknown result"); + } + + public function get_partition_privilege_set($db_name, $table_name, $part_name, $user_name, $group_names) + { + $this->send_get_partition_privilege_set($db_name, $table_name, $part_name, $user_name, $group_names); + return $this->recv_get_partition_privilege_set(); + } + + public function send_get_partition_privilege_set($db_name, $table_name, $part_name, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_partition_privilege_set_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->part_name = $part_name; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_privilege_set() + { + $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_get_partition_privilege_set_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_get_partition_privilege_set_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("get_partition_privilege_set failed: unknown result"); + } + + public function get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names) + { + $this->send_get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names); + return $this->recv_get_column_privilege_set(); + } + + public function send_get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_column_privilege_set_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->part_name = $part_name; + $args->column_name = $column_name; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_column_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_column_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_column_privilege_set() + { + $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_get_column_privilege_set_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_get_column_privilege_set_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("get_column_privilege_set failed: unknown result"); + } + + public function create_role($role_name, $owner_name, $db_name) + { + $this->send_create_role($role_name, $owner_name, $db_name); + return $this->recv_create_role(); + } + + public function send_create_role($role_name, $owner_name, $db_name) + { + $args = new metastore_ThriftHiveMetastore_create_role_args(); + $args->role_name = $role_name; + $args->owner_name = $owner_name; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_role() + { + $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_create_role_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_create_role_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("create_role failed: unknown result"); + } + + public function drop_role($role_name, $db_name) + { + $this->send_drop_role($role_name, $db_name); + return $this->recv_drop_role(); + } + + public function send_drop_role($role_name, $db_name) + { + $args = new metastore_ThriftHiveMetastore_drop_role_args(); + $args->role_name = $role_name; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_role() + { + $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_drop_role_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_drop_role_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("drop_role failed: unknown result"); + } + + public function add_role_member($role_name, $user_name, $is_role, $is_group, $db_name) + { + $this->send_add_role_member($role_name, $user_name, $is_role, $is_group, $db_name); + return $this->recv_add_role_member(); + } + + public function send_add_role_member($role_name, $user_name, $is_role, $is_group, $db_name) + { + $args = new metastore_ThriftHiveMetastore_add_role_member_args(); + $args->role_name = $role_name; + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_role_member', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_role_member', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_role_member() + { + $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_add_role_member_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_add_role_member_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("add_role_member failed: unknown result"); + } + + public function remove_role_member($role_name, $user_name, $is_role, $is_group, $db_name) + { + $this->send_remove_role_member($role_name, $user_name, $is_role, $is_group, $db_name); + return $this->recv_remove_role_member(); + } + + public function send_remove_role_member($role_name, $user_name, $is_role, $is_group, $db_name) + { + $args = new metastore_ThriftHiveMetastore_remove_role_member_args(); + $args->role_name = $role_name; + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'remove_role_member', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('remove_role_member', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_remove_role_member() + { + $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_remove_role_member_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_remove_role_member_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("remove_role_member failed: unknown result"); + } + + public function list_roles($principal_name, $is_role, $is_group, $db_name) + { + $this->send_list_roles($principal_name, $is_role, $is_group, $db_name); + return $this->recv_list_roles(); + } + + public function send_list_roles($principal_name, $is_role, $is_group, $db_name) + { + $args = new metastore_ThriftHiveMetastore_list_roles_args(); + $args->principal_name = $principal_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_roles() + { + $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_list_roles_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_list_roles_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("list_roles failed: unknown result"); + } + + public function list_security_user_grant($principla_name, $is_role, $is_group) + { + $this->send_list_security_user_grant($principla_name, $is_role, $is_group); + return $this->recv_list_security_user_grant(); + } + + public function send_list_security_user_grant($principla_name, $is_role, $is_group) + { + $args = new metastore_ThriftHiveMetastore_list_security_user_grant_args(); + $args->principla_name = $principla_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_user_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_user_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_user_grant() + { + $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_list_security_user_grant_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_list_security_user_grant_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("list_security_user_grant failed: unknown result"); + } + + public function list_security_db_grant($principal_name, $is_group, $is_role, $db_name) + { + $this->send_list_security_db_grant($principal_name, $is_group, $is_role, $db_name); + return $this->recv_list_security_db_grant(); + } + + public function send_list_security_db_grant($principal_name, $is_group, $is_role, $db_name) + { + $args = new metastore_ThriftHiveMetastore_list_security_db_grant_args(); + $args->principal_name = $principal_name; + $args->is_group = $is_group; + $args->is_role = $is_role; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_db_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_db_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_db_grant() + { + $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_list_security_db_grant_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_list_security_db_grant_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("list_security_db_grant failed: unknown result"); + } + + public function list_security_table_grant($principal_name, $is_group, $is_role, $db_name, $table_name) + { + $this->send_list_security_table_grant($principal_name, $is_group, $is_role, $db_name, $table_name); + return $this->recv_list_security_table_grant(); + } + + public function send_list_security_table_grant($principal_name, $is_group, $is_role, $db_name, $table_name) + { + $args = new metastore_ThriftHiveMetastore_list_security_table_grant_args(); + $args->principal_name = $principal_name; + $args->is_group = $is_group; + $args->is_role = $is_role; + $args->db_name = $db_name; + $args->table_name = $table_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_table_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_table_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_table_grant() + { + $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_list_security_table_grant_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_list_security_table_grant_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("list_security_table_grant failed: unknown result"); + } + + public function list_security_partition_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name) + { + $this->send_list_security_partition_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name); + return $this->recv_list_security_partition_grant(); + } + + public function send_list_security_partition_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name) + { + $args = new metastore_ThriftHiveMetastore_list_security_partition_grant_args(); + $args->principal_name = $principal_name; + $args->is_group = $is_group; + $args->is_role = $is_role; + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_partition_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_partition_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_partition_grant() + { + $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_list_security_partition_grant_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_list_security_partition_grant_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("list_security_partition_grant failed: unknown result"); + } + + public function list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name, $column_name) + { + $this->send_list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name, $column_name); + return $this->recv_list_security_column_grant(); + } + + public function send_list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name, $column_name) + { + $args = new metastore_ThriftHiveMetastore_list_security_column_grant_args(); + $args->principal_name = $principal_name; + $args->is_group = $is_group; + $args->is_role = $is_role; + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->part_name = $part_name; + $args->column_name = $column_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_column_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_column_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_column_grant() + { + $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_list_security_column_grant_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_list_security_column_grant_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("list_security_column_grant failed: unknown result"); + } + + public function grant_privileges($user_name, $is_role, $is_group, $privileges, $grantor) + { + $this->send_grant_privileges($user_name, $is_role, $is_group, $privileges, $grantor); + return $this->recv_grant_privileges(); + } + + public function send_grant_privileges($user_name, $is_role, $is_group, $privileges, $grantor) + { + $args = new metastore_ThriftHiveMetastore_grant_privileges_args(); + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->privileges = $privileges; + $args->grantor = $grantor; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_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_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_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_privileges failed: unknown result"); + } + + public function revoke_privileges($user_name, $is_role, $is_group, $privileges) + { + $this->send_revoke_privileges($user_name, $is_role, $is_group, $privileges); + return $this->recv_revoke_privileges(); + } + + public function send_revoke_privileges($user_name, $is_role, $is_group, $privileges) + { + $args = new metastore_ThriftHiveMetastore_revoke_privileges_args(); + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->privileges = $privileges; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_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_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_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("revoke_privileges failed: unknown result"); + } + + public function revoke_all_privileges($user_name, $is_role, $is_group, $remove_user_priv, $dbs, $tables, $parts, $columns) + { + $this->send_revoke_all_privileges($user_name, $is_role, $is_group, $remove_user_priv, $dbs, $tables, $parts, $columns); + return $this->recv_revoke_all_privileges(); + } + + public function send_revoke_all_privileges($user_name, $is_role, $is_group, $remove_user_priv, $dbs, $tables, $parts, $columns) + { + $args = new metastore_ThriftHiveMetastore_revoke_all_privileges_args(); + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->remove_user_priv = $remove_user_priv; + $args->dbs = $dbs; + $args->tables = $tables; + $args->parts = $parts; + $args->columns = $columns; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_all_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_all_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_all_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_revoke_all_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_revoke_all_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("revoke_all_privileges failed: unknown result"); + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class metastore_ThriftHiveMetastore_create_database_args { + static $_TSPEC; + + public $database = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'database', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['database'])) { + $this->database = $vals['database']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_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->database = new metastore_Database(); + $xfer += $this->database->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_create_database_args'); + if ($this->database !== null) { + if (!is_object($this->database)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); + $xfer += $this->database->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->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_create_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_database_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_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::STRING) { + $xfer += $input->readString($this->name); + } 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_get_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_database_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + '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']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_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_Database(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->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_get_database_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(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_database_args { + static $_TSPEC; + + public $name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_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::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidOperationException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->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_drop_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_databases_args { + static $_TSPEC; + + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_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::STRING) { + $xfer += $input->readString($this->pattern); + } 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_get_databases_args'); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_databases_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::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 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_get_databases_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::LST) { + $this->success = array(); + $_size191 = 0; + $_etype194 = 0; + $xfer += $input->readListBegin($_etype194, $_size191); + for ($_i195 = 0; $_i195 < $_size191; ++$_i195) + { + $elem196 = null; + $xfer += $input->readString($elem196); + $this->success []= $elem196; + } + $xfer += $input->readListEnd(); + } 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_get_databases_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter197) + { + $xfer += $output->writeString($iter197); + } + } + $output->writeListEnd(); + } + $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 metastore_ThriftHiveMetastore_get_all_databases_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_databases_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) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_all_databases_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::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 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_get_all_databases_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::LST) { + $this->success = array(); + $_size198 = 0; + $_etype201 = 0; + $xfer += $input->readListBegin($_etype201, $_size198); + for ($_i202 = 0; $_i202 < $_size198; ++$_i202) + { + $elem203 = null; + $xfer += $input->readString($elem203); + $this->success []= $elem203; + } + $xfer += $input->readListEnd(); + } 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_get_all_databases_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter204) + { + $xfer += $output->writeString($iter204); + } + } + $output->writeListEnd(); + } + $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 metastore_ThriftHiveMetastore_get_type_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_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::STRING) { + $xfer += $input->readString($this->name); + } 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_get_type_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Type', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_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_Type(); + $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; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->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_get_type_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(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRUCT, + 'class' => 'metastore_Type', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_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->type = new metastore_Type(); + $xfer += $this->type->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_create_type_args'); + if ($this->type !== null) { + if (!is_object($this->type)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1); + $xfer += $this->type->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + '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']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->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_create_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_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::STRING) { + $xfer += $input->readString($this->type); + } 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_drop_type_args'); + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 1); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_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::BOOL) { + $xfer += $input->readBool($this->success); + } 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; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->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_drop_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_type_all_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_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::STRING) { + $xfer += $input->readString($this->name); + } 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_get_type_all_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_type_all_result { + static $_TSPEC; + + public $success = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRUCT, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Type', + ), + ), + 1 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_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::MAP) { + $this->success = array(); + $_size205 = 0; + $_ktype206 = 0; + $_vtype207 = 0; + $xfer += $input->readMapBegin($_ktype206, $_vtype207, $_size205); + for ($_i209 = 0; $_i209 < $_size205; ++$_i209) + { + $key210 = ''; + $val211 = new metastore_Type(); + $xfer += $input->readString($key210); + $val211 = new metastore_Type(); + $xfer += $val211->read($input); + $this->success[$key210] = $val211; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->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_get_type_all_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); + { + foreach ($this->success as $kiter212 => $viter213) + { + $xfer += $output->writeString($kiter212); + $xfer += $viter213->write($output); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_fields_args { + static $_TSPEC; + + public $db_name = null; + public $table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_fields_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::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } 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_get_fields_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_fields_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownDBException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_fields_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::LST) { + $this->success = array(); + $_size214 = 0; + $_etype217 = 0; + $xfer += $input->readListBegin($_etype217, $_size214); + for ($_i218 = 0; $_i218 < $_size214; ++$_i218) + { + $elem219 = null; + $elem219 = new metastore_FieldSchema(); + $xfer += $elem219->read($input); + $this->success []= $elem219; + } + $xfer += $input->readListEnd(); + } 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; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_UnknownTableException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_UnknownDBException(); + $xfer += $this->o3->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_get_fields_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter220) + { + $xfer += $iter220->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_schema_args { + static $_TSPEC; + + public $db_name = null; + public $table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_schema_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::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } 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_get_schema_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_schema_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownDBException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_schema_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::LST) { + $this->success = array(); + $_size221 = 0; + $_etype224 = 0; + $xfer += $input->readListBegin($_etype224, $_size221); + for ($_i225 = 0; $_i225 < $_size221; ++$_i225) + { + $elem226 = null; + $elem226 = new metastore_FieldSchema(); + $xfer += $elem226->read($input); + $this->success []= $elem226; + } + $xfer += $input->readListEnd(); + } 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; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_UnknownTableException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_UnknownDBException(); + $xfer += $this->o3->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_get_schema_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter227) + { + $xfer += $iter227->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_table_args { + static $_TSPEC; + + public $tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_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->tbl = new metastore_Table(); + $xfer += $this->tbl->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_create_table_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new metastore_NoSuchObjectException(); + $xfer += $this->o4->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_create_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_table_args { + static $_TSPEC; + + public $dbname = null; + public $name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_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::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 2); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_table_result { + static $_TSPEC; + + public $o1 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->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_drop_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_args { + static $_TSPEC; + + public $db_name = null; + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_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::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pattern); + } 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_get_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_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::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 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_get_tables_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::LST) { + $this->success = array(); + $_size228 = 0; + $_etype231 = 0; + $xfer += $input->readListBegin($_etype231, $_size228); + for ($_i232 = 0; $_i232 < $_size228; ++$_i232) + { + $elem233 = null; + $xfer += $input->readString($elem233); + $this->success []= $elem233; + } + $xfer += $input->readListEnd(); + } 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_get_tables_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter234) + { + $xfer += $output->writeString($iter234); + } + } + $output->writeListEnd(); + } + $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 metastore_ThriftHiveMetastore_get_all_tables_args { + static $_TSPEC; + + public $db_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_tables_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::STRING) { + $xfer += $input->readString($this->db_name); + } 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_get_all_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_all_tables_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::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 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_get_all_tables_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::LST) { + $this->success = array(); + $_size235 = 0; + $_etype238 = 0; + $xfer += $input->readListBegin($_etype238, $_size235); + for ($_i239 = 0; $_i239 < $_size235; ++$_i239) + { + $elem240 = null; + $xfer += $input->readString($elem240); + $this->success []= $elem240; + } + $xfer += $input->readListEnd(); + } 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_get_all_tables_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter241) + { + $xfer += $output->writeString($iter241); + } + } + $output->writeListEnd(); + } + $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 metastore_ThriftHiveMetastore_get_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_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::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } 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_get_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_table_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_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_Table(); + $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; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->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_get_table_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(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + public $new_tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_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::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_tbl = new metastore_Table(); + $xfer += $this->new_tbl->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_alter_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_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 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->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_alter_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_add_partition_args { + static $_TSPEC; + + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_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->new_part = new metastore_Partition(); + $xfer += $this->new_part->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_add_partition_args'); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_add_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + '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']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_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_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->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_add_partition_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(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_append_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_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::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size242 = 0; + $_etype245 = 0; + $xfer += $input->readListBegin($_etype245, $_size242); + for ($_i246 = 0; $_i246 < $_size242; ++$_i246) + { + $elem247 = null; + $xfer += $input->readString($elem247); + $this->part_vals []= $elem247; + } + $xfer += $input->readListEnd(); + } 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_append_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter248) + { + $xfer += $output->writeString($iter248); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_append_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + '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']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_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_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->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_append_partition_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(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_append_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_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::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } 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_append_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_append_partition_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + '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']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_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_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->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_append_partition_by_name_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(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_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::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size249 = 0; + $_etype252 = 0; + $xfer += $input->readListBegin($_etype252, $_size249); + for ($_i253 = 0; $_i253 < $_size249; ++$_i253) + { + $elem254 = null; + $xfer += $input->readString($elem254); + $this->part_vals []= $elem254; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter255) + { + $xfer += $output->writeString($iter255); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + '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']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->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_drop_partition_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; } } -class metastore_ThriftHiveMetastore_create_database_result { +class metastore_ThriftHiveMetastore_drop_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_by_name_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::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } 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_drop_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_partition_by_name_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - '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']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_database_result'; + return 'ThriftHiveMetastore_drop_partition_by_name_result'; } public function read($input) @@ -2446,26 +8299,25 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -2482,7 +8334,12 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -2493,11 +8350,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -2505,29 +8357,49 @@ } -class metastore_ThriftHiveMetastore_get_database_args { +class metastore_ThriftHiveMetastore_get_partition_args { static $_TSPEC; - public $name = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } } } public function getName() { - return 'ThriftHiveMetastore_get_database_args'; + return 'ThriftHiveMetastore_get_partition_args'; } public function read($input) @@ -2547,7 +8419,31 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size256 = 0; + $_etype259 = 0; + $xfer += $input->readListBegin($_etype259, $_size256); + for ($_i260 = 0; $_i260 < $_size256; ++$_i260) + { + $elem261 = null; + $xfer += $input->readString($elem261); + $this->part_vals []= $elem261; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -2564,10 +8460,32 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter262) + { + $xfer += $output->writeString($iter262); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2577,7 +8495,7 @@ } -class metastore_ThriftHiveMetastore_get_database_result { +class metastore_ThriftHiveMetastore_get_partition_result { static $_TSPEC; public $success = null; @@ -2590,17 +8508,17 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Database', + 'class' => 'metastore_Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), ); } @@ -2618,7 +8536,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_database_result'; + return 'ThriftHiveMetastore_get_partition_result'; } public function read($input) @@ -2638,7 +8556,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Database(); + $this->success = new metastore_Partition(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -2646,7 +8564,7 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -2654,7 +8572,7 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); + $this->o2 = new metastore_NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -2672,7 +8590,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -2698,37 +8616,69 @@ } -class metastore_ThriftHiveMetastore_drop_database_args { +class metastore_ThriftHiveMetastore_get_partition_with_auth_args { static $_TSPEC; - public $name = null; - public $deleteData = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_args'; + return 'ThriftHiveMetastore_get_partition_with_auth_args'; } public function read($input) @@ -2748,14 +8698,55 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size263 = 0; + $_etype266 = 0; + $xfer += $input->readListBegin($_etype266, $_size263); + for ($_i267 = 0; $_i267 < $_size263; ++$_i267) + { + $elem268 = null; + $xfer += $input->readString($elem268); + $this->part_vals []= $elem268; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size269 = 0; + $_etype272 = 0; + $xfer += $input->readListBegin($_etype272, $_size269); + for ($_i273 = 0; $_i273 < $_size269; ++$_i273) + { + $elem274 = null; + $xfer += $input->readString($elem274); + $this->group_names []= $elem274; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -2772,15 +8763,54 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); - $xfer += $output->writeBool($this->deleteData); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter275) + { + $xfer += $output->writeString($iter275); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter276) + { + $xfer += $output->writeString($iter276); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2790,48 +8820,48 @@ } -class metastore_ThriftHiveMetastore_drop_database_result { +class metastore_ThriftHiveMetastore_get_partition_with_auth_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_result'; + return 'ThriftHiveMetastore_get_partition_with_auth_result'; } public function read($input) @@ -2849,26 +8879,26 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidOperationException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -2885,7 +8915,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_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); @@ -2896,11 +8934,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -2908,29 +8941,45 @@ } -class metastore_ThriftHiveMetastore_get_databases_args { +class metastore_ThriftHiveMetastore_get_partition_by_name_args { static $_TSPEC; - public $pattern = null; + public $db_name = null; + public $tbl_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'pattern', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_args'; + return 'ThriftHiveMetastore_get_partition_by_name_args'; } public function read($input) @@ -2950,7 +8999,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -2967,10 +9030,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args'); - if ($this->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1); - $xfer += $output->writeString($this->pattern); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2980,28 +9053,31 @@ } -class metastore_ThriftHiveMetastore_get_databases_result { +class metastore_ThriftHiveMetastore_get_partition_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), ); } if (is_array($vals)) { @@ -3011,11 +9087,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_result'; + return 'ThriftHiveMetastore_get_partition_by_name_result'; } public function read($input) @@ -3034,18 +9113,9 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size112 = 0; - $_etype115 = 0; - $xfer += $input->readListBegin($_etype115, $_size112); - for ($_i116 = 0; $_i116 < $_size112; ++$_i116) - { - $elem117 = null; - $xfer += $input->readString($elem117); - $this->success []= $elem117; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -3058,6 +9128,14 @@ $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -3070,22 +9148,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter118) - { - $xfer += $output->writeString($iter118); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3093,6 +9162,11 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3100,19 +9174,45 @@ } -class metastore_ThriftHiveMetastore_get_all_databases_args { +class metastore_ThriftHiveMetastore_get_partitions_args { static $_TSPEC; + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; - public function __construct() { + public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } } public function getName() { - return 'ThriftHiveMetastore_get_all_databases_args'; + return 'ThriftHiveMetastore_get_partitions_args'; } public function read($input) @@ -3130,6 +9230,27 @@ } switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -3142,7 +9263,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3150,11 +9286,12 @@ } -class metastore_ThriftHiveMetastore_get_all_databases_result { +class metastore_ThriftHiveMetastore_get_partitions_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -3162,14 +9299,20 @@ 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -3181,11 +9324,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_all_databases_result'; + return 'ThriftHiveMetastore_get_partitions_result'; } public function read($input) @@ -3206,14 +9352,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size119 = 0; - $_etype122 = 0; - $xfer += $input->readListBegin($_etype122, $_size119); - for ($_i123 = 0; $_i123 < $_size119; ++$_i123) + $_size277 = 0; + $_etype280 = 0; + $xfer += $input->readListBegin($_etype280, $_size277); + for ($_i281 = 0; $_i281 < $_size277; ++$_i281) { - $elem124 = null; - $xfer += $input->readString($elem124); - $this->success []= $elem124; + $elem282 = null; + $elem282 = new metastore_Partition(); + $xfer += $elem282->read($input); + $this->success []= $elem282; } $xfer += $input->readListEnd(); } else { @@ -3222,12 +9369,20 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -3240,18 +9395,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter125) + foreach ($this->success as $iter283) { - $xfer += $output->writeString($iter125); + $xfer += $iter283->write($output); } } $output->writeListEnd(); @@ -3263,6 +9418,11 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3270,29 +9430,65 @@ } -class metastore_ThriftHiveMetastore_get_type_args { +class metastore_ThriftHiveMetastore_get_partitions_with_auth_args { static $_TSPEC; - public $name = null; + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 4 => array( + 'var' => 'user_name', 'type' => TType::STRING, ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_args'; + return 'ThriftHiveMetastore_get_partitions_with_auth_args'; } public function read($input) @@ -3312,7 +9508,45 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size284 = 0; + $_etype287 = 0; + $xfer += $input->readListBegin($_etype287, $_size284); + for ($_i288 = 0; $_i288 < $_size284; ++$_i288) + { + $elem289 = null; + $xfer += $input->readString($elem289); + $this->group_names []= $elem289; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -3329,10 +9563,42 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter290) + { + $xfer += $output->writeString($iter290); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3342,7 +9608,7 @@ } -class metastore_ThriftHiveMetastore_get_type_result { +class metastore_ThriftHiveMetastore_get_partitions_with_auth_result { static $_TSPEC; public $success = null; @@ -3354,18 +9620,22 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), ); } @@ -3383,7 +9653,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_type_result'; + return 'ThriftHiveMetastore_get_partitions_with_auth_result'; } public function read($input) @@ -3402,16 +9672,26 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Type(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size291 = 0; + $_etype294 = 0; + $xfer += $input->readListBegin($_etype294, $_size291); + for ($_i295 = 0; $_i295 < $_size291; ++$_i295) + { + $elem296 = null; + $elem296 = new metastore_Partition(); + $xfer += $elem296->read($input); + $this->success []= $elem296; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -3419,7 +9699,7 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -3437,13 +9717,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($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->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter297) + { + $xfer += $iter297->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3463,30 +9752,45 @@ } -class metastore_ThriftHiveMetastore_create_type_args { +class metastore_ThriftHiveMetastore_get_partition_names_args { static $_TSPEC; - public $type = null; + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', - 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_create_type_args'; + return 'ThriftHiveMetastore_get_partition_names_args'; } public function read($input) @@ -3505,9 +9809,22 @@ switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->type = new metastore_Type(); - $xfer += $this->type->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -3524,13 +9841,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args'); - if ($this->type !== null) { - if (!is_object($this->type)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1); - $xfer += $this->type->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3540,34 +9864,26 @@ } -class metastore_ThriftHiveMetastore_create_type_result { +class metastore_ThriftHiveMetastore_get_partition_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -3576,20 +9892,14 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_type_result'; + return 'ThriftHiveMetastore_get_partition_names_result'; } public function read($input) @@ -3608,32 +9918,26 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); - $xfer += $this->o2->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size298 = 0; + $_etype301 = 0; + $xfer += $input->readListBegin($_etype301, $_size298); + for ($_i302 = 0; $_i302 < $_size298; ++$_i302) + { + $elem303 = null; + $xfer += $input->readString($elem303); + $this->success []= $elem303; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 1: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -3650,27 +9954,29 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter304) + { + $xfer += $output->writeString($iter304); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3678,29 +9984,57 @@ } -class metastore_ThriftHiveMetastore_drop_type_args { +class metastore_ThriftHiveMetastore_get_partitions_ps_args { static $_TSPEC; - public $type = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_type_args'; + return 'ThriftHiveMetastore_get_partitions_ps_args'; } public function read($input) @@ -3720,7 +10054,38 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size305 = 0; + $_etype308 = 0; + $xfer += $input->readListBegin($_etype308, $_size305); + for ($_i309 = 0; $_i309 < $_size305; ++$_i309) + { + $elem310 = null; + $xfer += $input->readString($elem310); + $this->part_vals []= $elem310; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -3737,10 +10102,37 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_args'); - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 1); - $xfer += $output->writeString($this->type); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter311) + { + $xfer += $output->writeString($iter311); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3750,30 +10142,29 @@ } -class metastore_ThriftHiveMetastore_drop_type_result { +class metastore_ThriftHiveMetastore_get_partitions_ps_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -3783,14 +10174,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_type_result'; + return 'ThriftHiveMetastore_get_partitions_ps_result'; } public function read($input) @@ -3809,8 +10197,19 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size312 = 0; + $_etype315 = 0; + $xfer += $input->readListBegin($_etype315, $_size312); + for ($_i316 = 0; $_i316 < $_size312; ++$_i316) + { + $elem317 = null; + $elem317 = new metastore_Partition(); + $xfer += $elem317->read($input); + $this->success []= $elem317; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -3823,14 +10222,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -3843,10 +10234,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter318) + { + $xfer += $iter318->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3854,11 +10257,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3866,29 +10264,77 @@ } -class metastore_ThriftHiveMetastore_get_type_all_args { +class metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_args { static $_TSPEC; - public $name = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 5 => array( + 'var' => 'user_name', 'type' => TType::STRING, ), + 6 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_all_args'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; } public function read($input) @@ -3908,7 +10354,62 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size319 = 0; + $_etype322 = 0; + $xfer += $input->readListBegin($_etype322, $_size319); + for ($_i323 = 0; $_i323 < $_size319; ++$_i323) + { + $elem324 = null; + $xfer += $input->readString($elem324); + $this->part_vals []= $elem324; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size325 = 0; + $_etype328 = 0; + $xfer += $input->readListBegin($_etype328, $_size325); + for ($_i329 = 0; $_i329 < $_size325; ++$_i329) + { + $elem330 = null; + $xfer += $input->readString($elem330); + $this->group_names []= $elem330; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -3925,10 +10426,59 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter331) + { + $xfer += $output->writeString($iter331); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter332) + { + $xfer += $output->writeString($iter332); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3938,10 +10488,11 @@ } -class metastore_ThriftHiveMetastore_get_type_all_result { +class metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_result { static $_TSPEC; public $success = null; + public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -3949,18 +10500,19 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRUCT, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'class' => 'metastore_Partition', ), ), 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', @@ -3971,6 +10523,9 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } @@ -3978,7 +10533,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_type_all_result'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_result'; } public function read($input) @@ -3997,28 +10552,33 @@ switch ($fid) { case 0: - if ($ftype == TType::MAP) { + if ($ftype == TType::LST) { $this->success = array(); - $_size126 = 0; - $_ktype127 = 0; - $_vtype128 = 0; - $xfer += $input->readMapBegin($_ktype127, $_vtype128, $_size126); - for ($_i130 = 0; $_i130 < $_size126; ++$_i130) + $_size333 = 0; + $_etype336 = 0; + $xfer += $input->readListBegin($_etype336, $_size333); + for ($_i337 = 0; $_i337 < $_size333; ++$_i337) { - $key131 = ''; - $val132 = new metastore_Type(); - $xfer += $input->readString($key131); - $val132 = new metastore_Type(); - $xfer += $val132->read($input); - $this->success[$key131] = $val132; + $elem338 = null; + $elem338 = new metastore_Partition(); + $xfer += $elem338->read($input); + $this->success []= $elem338; } - $xfer += $input->readMapEnd(); + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { @@ -4037,27 +10597,31 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $kiter133 => $viter134) + foreach ($this->success as $iter339) { - $xfer += $output->writeString($kiter133); - $xfer += $viter134->write($output); + $xfer += $iter339->write($output); } } - $output->writeMapEnd(); + $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -4068,11 +10632,13 @@ } -class metastore_ThriftHiveMetastore_get_fields_args { +class metastore_ThriftHiveMetastore_get_partition_names_ps_args { static $_TSPEC; public $db_name = null; - public $table_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4082,23 +10648,41 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'table_name', + 'var' => 'tbl_name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_fields_args'; + return 'ThriftHiveMetastore_get_partition_names_ps_args'; } public function read($input) @@ -4125,7 +10709,31 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size340 = 0; + $_etype343 = 0; + $xfer += $input->readListBegin($_etype343, $_size340); + for ($_i344 = 0; $_i344 < $_size340; ++$_i344) + { + $elem345 = null; + $xfer += $input->readString($elem345); + $this->part_vals []= $elem345; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -4142,15 +10750,37 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter346) + { + $xfer += $output->writeString($iter346); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4160,13 +10790,11 @@ } -class metastore_ThriftHiveMetastore_get_fields_result { +class metastore_ThriftHiveMetastore_get_partition_names_ps_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4174,10 +10802,9 @@ 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', + 'type' => TType::STRING, ), ), 1 => array( @@ -4185,16 +10812,6 @@ 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownDBException', - ), ); } if (is_array($vals)) { @@ -4204,17 +10821,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_fields_result'; + return 'ThriftHiveMetastore_get_partition_names_ps_result'; } public function read($input) @@ -4235,15 +10846,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size135 = 0; - $_etype138 = 0; - $xfer += $input->readListBegin($_etype138, $_size135); - for ($_i139 = 0; $_i139 < $_size135; ++$_i139) + $_size347 = 0; + $_etype350 = 0; + $xfer += $input->readListBegin($_etype350, $_size347); + for ($_i351 = 0; $_i351 < $_size347; ++$_i351) { - $elem140 = null; - $elem140 = new metastore_FieldSchema(); - $xfer += $elem140->read($input); - $this->success []= $elem140; + $elem352 = null; + $xfer += $input->readString($elem352); + $this->success []= $elem352; } $xfer += $input->readListEnd(); } else { @@ -4258,22 +10868,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_UnknownTableException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_UnknownDBException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -4286,18 +10880,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter141) + foreach ($this->success as $iter353) { - $xfer += $iter141->write($output); + $xfer += $output->writeString($iter353); } } $output->writeListEnd(); @@ -4309,16 +10903,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4326,11 +10910,13 @@ } -class metastore_ThriftHiveMetastore_get_schema_args { +class metastore_ThriftHiveMetastore_get_partitions_by_filter_args { static $_TSPEC; public $db_name = null; - public $table_name = null; + public $tbl_name = null; + public $filter = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4340,23 +10926,37 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'table_name', + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'filter', 'type' => TType::STRING, ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_schema_args'; + return 'ThriftHiveMetastore_get_partitions_by_filter_args'; } public function read($input) @@ -4383,7 +10983,21 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -4400,15 +11014,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); + $xfer += $output->writeString($this->filter); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4418,13 +11042,12 @@ } -class metastore_ThriftHiveMetastore_get_schema_result { +class metastore_ThriftHiveMetastore_get_partitions_by_filter_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4435,7 +11058,7 @@ 'etype' => TType::STRUCT, 'elem' => array( 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', + 'class' => 'metastore_Partition', ), ), 1 => array( @@ -4446,12 +11069,7 @@ 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownDBException', + 'class' => 'metastore_NoSuchObjectException', ), ); } @@ -4465,14 +11083,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_schema_result'; + return 'ThriftHiveMetastore_get_partitions_by_filter_result'; } public function read($input) @@ -4493,15 +11108,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size142 = 0; - $_etype145 = 0; - $xfer += $input->readListBegin($_etype145, $_size142); - for ($_i146 = 0; $_i146 < $_size142; ++$_i146) + $_size354 = 0; + $_etype357 = 0; + $xfer += $input->readListBegin($_etype357, $_size354); + for ($_i358 = 0; $_i358 < $_size354; ++$_i358) { - $elem147 = null; - $elem147 = new metastore_FieldSchema(); - $xfer += $elem147->read($input); - $this->success []= $elem147; + $elem359 = null; + $elem359 = new metastore_Partition(); + $xfer += $elem359->read($input); + $this->success []= $elem359; } $xfer += $input->readListEnd(); } else { @@ -4518,20 +11133,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_UnknownTableException(); + $this->o2 = new metastore_NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_UnknownDBException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -4544,7 +11151,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -4553,9 +11160,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter148) + foreach ($this->success as $iter360) { - $xfer += $iter148->write($output); + $xfer += $iter360->write($output); } } $output->writeListEnd(); @@ -4572,11 +11179,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4584,30 +11186,46 @@ } -class metastore_ThriftHiveMetastore_create_table_args { +class metastore_ThriftHiveMetastore_alter_partition_args { static $_TSPEC; - public $tbl = null; + public $db_name = null; + public $tbl_name = null; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'tbl', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_part', 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'class' => 'metastore_Partition', ), ); } if (is_array($vals)) { - if (isset($vals['tbl'])) { - $this->tbl = $vals['tbl']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_args'; + return 'ThriftHiveMetastore_alter_partition_args'; } public function read($input) @@ -4626,9 +11244,23 @@ switch ($fid) { case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: if ($ftype == TType::STRUCT) { - $this->tbl = new metastore_Table(); - $xfer += $this->tbl->read($input); + $this->new_part = new metastore_Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -4645,13 +11277,23 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_args'); - if ($this->tbl !== null) { - if (!is_object($this->tbl)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); - $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4661,13 +11303,11 @@ } -class metastore_ThriftHiveMetastore_create_table_result { +class metastore_ThriftHiveMetastore_alter_partition_result { static $_TSPEC; public $o1 = null; public $o2 = null; - public $o3 = null; - public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4675,23 +11315,13 @@ 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', + 'class' => 'metastore_InvalidOperationException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -4701,17 +11331,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_table_result'; + return 'ThriftHiveMetastore_alter_partition_result'; } public function read($input) @@ -4731,7 +11355,7 @@ { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); + $this->o1 = new metastore_InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -4739,28 +11363,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new metastore_NoSuchObjectException(); - $xfer += $this->o4->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -4773,7 +11381,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -4784,16 +11392,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o4 !== null) { - $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); - $xfer += $this->o4->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4801,45 +11399,37 @@ } -class metastore_ThriftHiveMetastore_drop_table_args { +class metastore_ThriftHiveMetastore_get_config_value_args { static $_TSPEC; - public $dbname = null; public $name = null; - public $deleteData = null; + public $defaultValue = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'name', + 'var' => 'defaultValue', 'type' => TType::STRING, ), - 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } if (isset($vals['name'])) { $this->name = $vals['name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['defaultValue'])) { + $this->defaultValue = $vals['defaultValue']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_args'; + return 'ThriftHiveMetastore_get_config_value_args'; } public function read($input) @@ -4859,21 +11449,14 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + $xfer += $input->readString($this->defaultValue); } else { $xfer += $input->skip($ftype); } @@ -4890,20 +11473,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_args'); if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); - $xfer += $output->writeBool($this->deleteData); + if ($this->defaultValue !== null) { + $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); + $xfer += $output->writeString($this->defaultValue); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4913,39 +11491,38 @@ } -class metastore_ThriftHiveMetastore_drop_table_result { +class metastore_ThriftHiveMetastore_get_config_value_result { static $_TSPEC; + public $success = null; public $o1 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_ConfigValSecurityException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_result'; + return 'ThriftHiveMetastore_get_config_value_result'; } public function read($input) @@ -4963,18 +11540,17 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o1 = new metastore_ConfigValSecurityException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -4991,17 +11567,17 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5009,37 +11585,29 @@ } -class metastore_ThriftHiveMetastore_get_tables_args { +class metastore_ThriftHiveMetastore_partition_name_to_vals_args { static $_TSPEC; - public $db_name = null; - public $pattern = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'pattern', + 'var' => 'part_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_tables_args'; + return 'ThriftHiveMetastore_partition_name_to_vals_args'; } public function read($input) @@ -5059,14 +11627,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -5083,15 +11644,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); - $xfer += $output->writeString($this->pattern); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5101,7 +11657,7 @@ } -class metastore_ThriftHiveMetastore_get_tables_result { +class metastore_ThriftHiveMetastore_partition_name_to_vals_result { static $_TSPEC; public $success = null; @@ -5136,7 +11692,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_tables_result'; + return 'ThriftHiveMetastore_partition_name_to_vals_result'; } public function read($input) @@ -5157,14 +11713,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size149 = 0; - $_etype152 = 0; - $xfer += $input->readListBegin($_etype152, $_size149); - for ($_i153 = 0; $_i153 < $_size149; ++$_i153) + $_size361 = 0; + $_etype364 = 0; + $xfer += $input->readListBegin($_etype364, $_size361); + for ($_i365 = 0; $_i365 < $_size361; ++$_i365) { - $elem154 = null; - $xfer += $input->readString($elem154); - $this->success []= $elem154; + $elem366 = null; + $xfer += $input->readString($elem366); + $this->success []= $elem366; } $xfer += $input->readListEnd(); } else { @@ -5191,7 +11747,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -5200,9 +11756,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter155) + foreach ($this->success as $iter367) { - $xfer += $output->writeString($iter155); + $xfer += $output->writeString($iter367); } } $output->writeListEnd(); @@ -5221,29 +11777,29 @@ } -class metastore_ThriftHiveMetastore_get_all_tables_args { +class metastore_ThriftHiveMetastore_partition_name_to_spec_args { static $_TSPEC; - public $db_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'part_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_args'; + return 'ThriftHiveMetastore_partition_name_to_spec_args'; } public function read($input) @@ -5263,7 +11819,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -5280,10 +11836,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5293,7 +11849,7 @@ } -class metastore_ThriftHiveMetastore_get_all_tables_result { +class metastore_ThriftHiveMetastore_partition_name_to_spec_result { static $_TSPEC; public $success = null; @@ -5304,9 +11860,13 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( 'type' => TType::STRING, ), ), @@ -5328,7 +11888,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_result'; + return 'ThriftHiveMetastore_partition_name_to_spec_result'; } public function read($input) @@ -5347,18 +11907,21 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { + if ($ftype == TType::MAP) { $this->success = array(); - $_size156 = 0; - $_etype159 = 0; - $xfer += $input->readListBegin($_etype159, $_size156); - for ($_i160 = 0; $_i160 < $_size156; ++$_i160) + $_size368 = 0; + $_ktype369 = 0; + $_vtype370 = 0; + $xfer += $input->readMapBegin($_ktype369, $_vtype370, $_size368); + for ($_i372 = 0; $_i372 < $_size368; ++$_i372) { - $elem161 = null; - $xfer += $input->readString($elem161); - $this->success []= $elem161; + $key373 = ''; + $val374 = ''; + $xfer += $input->readString($key373); + $xfer += $input->readString($val374); + $this->success[$key373] = $val374; } - $xfer += $input->readListEnd(); + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -5383,21 +11946,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); { - foreach ($this->success as $iter162) + foreach ($this->success as $kiter375 => $viter376) { - $xfer += $output->writeString($iter162); + $xfer += $output->writeString($kiter375); + $xfer += $output->writeString($viter376); } } - $output->writeListEnd(); + $output->writeMapEnd(); } $xfer += $output->writeFieldEnd(); } @@ -5413,37 +11977,39 @@ } -class metastore_ThriftHiveMetastore_get_table_args { +class metastore_ThriftHiveMetastore_add_index_args { static $_TSPEC; - public $dbname = null; - public $tbl_name = null; + public $new_index = null; + public $index_table = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'index_table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['new_index'])) { + $this->new_index = $vals['new_index']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_args'; + return 'ThriftHiveMetastore_add_index_args'; } public function read($input) @@ -5462,15 +12028,17 @@ switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + if ($ftype == TType::STRUCT) { + $this->new_index = new metastore_Index(); + $xfer += $this->new_index->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::STRUCT) { + $this->index_table = new metastore_Table(); + $xfer += $this->index_table->read($input); } else { $xfer += $input->skip($ftype); } @@ -5487,15 +12055,21 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_args'); + if ($this->new_index !== null) { + if (!is_object($this->new_index)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); + $xfer += $this->new_index->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->index_table !== null) { + if (!is_object($this->index_table)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); + $xfer += $this->index_table->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5505,12 +12079,13 @@ } -class metastore_ThriftHiveMetastore_get_table_result { +class metastore_ThriftHiveMetastore_add_index_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -5518,17 +12093,22 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'class' => 'metastore_Index', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', ), ); } @@ -5542,11 +12122,14 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_table_result'; + return 'ThriftHiveMetastore_add_index_result'; } public function read($input) @@ -5566,7 +12149,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Table(); + $this->success = new metastore_Index(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -5574,7 +12157,7 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -5582,12 +12165,20 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); + $this->o2 = new metastore_AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -5600,7 +12191,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -5619,6 +12210,11 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5626,12 +12222,13 @@ } -class metastore_ThriftHiveMetastore_alter_table_args { +class metastore_ThriftHiveMetastore_alter_index_args { static $_TSPEC; public $dbname = null; - public $tbl_name = null; - public $new_tbl = null; + public $base_tbl_name = null; + public $idx_name = null; + public $new_idx = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -5641,13 +12238,17 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'base_tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_tbl', + 'var' => 'idx_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'new_idx', 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'class' => 'metastore_Index', ), ); } @@ -5655,17 +12256,20 @@ if (isset($vals['dbname'])) { $this->dbname = $vals['dbname']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['base_tbl_name'])) { + $this->base_tbl_name = $vals['base_tbl_name']; } - if (isset($vals['new_tbl'])) { - $this->new_tbl = $vals['new_tbl']; + if (isset($vals['idx_name'])) { + $this->idx_name = $vals['idx_name']; + } + if (isset($vals['new_idx'])) { + $this->new_idx = $vals['new_idx']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_args'; + return 'ThriftHiveMetastore_alter_index_args'; } public function read($input) @@ -5692,15 +12296,22 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->base_tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->idx_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: if ($ftype == TType::STRUCT) { - $this->new_tbl = new metastore_Table(); - $xfer += $this->new_tbl->read($input); + $this->new_idx = new metastore_Index(); + $xfer += $this->new_idx->read($input); } else { $xfer += $input->skip($ftype); } @@ -5717,23 +12328,28 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_args'); if ($this->dbname !== null) { $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); $xfer += $output->writeString($this->dbname); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->base_tbl_name !== null) { + $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->base_tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_tbl !== null) { - if (!is_object($this->new_tbl)) { + if ($this->idx_name !== null) { + $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); + $xfer += $output->writeString($this->idx_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_idx !== null) { + if (!is_object($this->new_idx)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); - $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); + $xfer += $this->new_idx->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5743,7 +12359,7 @@ } -class metastore_ThriftHiveMetastore_alter_table_result { +class metastore_ThriftHiveMetastore_alter_index_result { static $_TSPEC; public $o1 = null; @@ -5775,7 +12391,7 @@ } public function getName() { - return 'ThriftHiveMetastore_alter_table_result'; + return 'ThriftHiveMetastore_alter_index_result'; } public function read($input) @@ -5821,7 +12437,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -5839,30 +12455,53 @@ } -class metastore_ThriftHiveMetastore_add_partition_args { +class metastore_ThriftHiveMetastore_drop_index_by_name_args { static $_TSPEC; - public $new_part = null; + public $db_name = null; + public $tbl_name = null; + public $index_name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, ), ); } if (is_array($vals)) { - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_args'; + return 'ThriftHiveMetastore_drop_index_by_name_args'; } public function read($input) @@ -5881,9 +12520,29 @@ switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_part = new metastore_Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -5900,13 +12559,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args'); - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); - $xfer += $this->new_part->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5916,35 +12587,28 @@ } -class metastore_ThriftHiveMetastore_add_partition_result { +class metastore_ThriftHiveMetastore_drop_index_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -5959,14 +12623,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_result'; + return 'ThriftHiveMetastore_drop_index_by_name_result'; } public function read($input) @@ -5985,16 +12646,15 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6002,20 +12662,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6028,13 +12680,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_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->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6047,11 +12696,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6059,12 +12703,12 @@ } -class metastore_ThriftHiveMetastore_append_partition_args { +class metastore_ThriftHiveMetastore_get_index_by_name_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; + public $index_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6078,12 +12722,8 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'index_name', + 'type' => TType::STRING, ), ); } @@ -6094,14 +12734,14 @@ if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_args'; + return 'ThriftHiveMetastore_get_index_by_name_args'; } public function read($input) @@ -6134,18 +12774,8 @@ } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size163 = 0; - $_etype166 = 0; - $xfer += $input->readListBegin($_etype166, $_size163); - for ($_i167 = 0; $_i167 < $_size163; ++$_i167) - { - $elem168 = null; - $xfer += $input->readString($elem168); - $this->part_vals []= $elem168; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); } else { $xfer += $input->skip($ftype); } @@ -6162,7 +12792,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -6173,21 +12803,9 @@ $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter169) - { - $xfer += $output->writeString($iter169); - } - } - $output->writeListEnd(); - } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6197,13 +12815,12 @@ } -class metastore_ThriftHiveMetastore_append_partition_result { +class metastore_ThriftHiveMetastore_get_index_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6211,22 +12828,17 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'class' => 'metastore_Index', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', + 'class' => 'metastore_MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), ); } @@ -6240,14 +12852,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_result'; + return 'ThriftHiveMetastore_get_index_by_name_result'; } public function read($input) @@ -6267,7 +12876,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); + $this->success = new metastore_Index(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -6275,7 +12884,7 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6283,20 +12892,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); + $this->o2 = new metastore_NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6309,7 +12910,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -6328,11 +12929,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6340,12 +12936,12 @@ } -class metastore_ThriftHiveMetastore_append_partition_by_name_args { +class metastore_ThriftHiveMetastore_get_indexes_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6359,8 +12955,8 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -6371,14 +12967,14 @@ if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_args'; + return 'ThriftHiveMetastore_get_indexes_args'; } public function read($input) @@ -6411,8 +13007,8 @@ } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -6429,7 +13025,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -6440,9 +13036,9 @@ $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6452,35 +13048,33 @@ } -class metastore_ThriftHiveMetastore_append_partition_by_name_result { +class metastore_ThriftHiveMetastore_get_indexes_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -6495,14 +13089,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_result'; + return 'ThriftHiveMetastore_get_indexes_result'; } public function read($input) @@ -6521,16 +13112,26 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size377 = 0; + $_etype380 = 0; + $xfer += $input->readListBegin($_etype380, $_size377); + for ($_i381 = 0; $_i381 < $_size377; ++$_i381) + { + $elem382 = null; + $elem382 = new metastore_Index(); + $xfer += $elem382->read($input); + $this->success []= $elem382; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6538,20 +13139,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6564,13 +13157,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($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->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter383) + { + $xfer += $iter383->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6583,11 +13185,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6595,13 +13192,12 @@ } -class metastore_ThriftHiveMetastore_drop_partition_args { +class metastore_ThriftHiveMetastore_get_index_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $deleteData = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6615,16 +13211,8 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -6635,17 +13223,14 @@ if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_args'; + return 'ThriftHiveMetastore_get_index_names_args'; } public function read($input) @@ -6678,25 +13263,8 @@ } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size170 = 0; - $_etype173 = 0; - $xfer += $input->readListBegin($_etype173, $_size170); - for ($_i174 = 0; $_i174 < $_size170; ++$_i174) - { - $elem175 = null; - $xfer += $input->readString($elem175); - $this->part_vals []= $elem175; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -6713,7 +13281,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -6724,26 +13292,9 @@ $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter176) - { - $xfer += $output->writeString($iter176); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6753,11 +13304,10 @@ } -class metastore_ThriftHiveMetastore_drop_partition_result { +class metastore_ThriftHiveMetastore_get_index_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -6765,14 +13315,13 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', @@ -6783,9 +13332,6 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } @@ -6793,7 +13339,7 @@ } public function getName() { - return 'ThriftHiveMetastore_drop_partition_result'; + return 'ThriftHiveMetastore_get_index_names_result'; } public function read($input) @@ -6812,22 +13358,24 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size384 = 0; + $_etype387 = 0; + $xfer += $input->readListBegin($_etype387, $_size384); + for ($_i388 = 0; $_i388 < $_size384; ++$_i388) + { + $elem389 = null; + $xfer += $input->readString($elem389); + $this->success []= $elem389; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { @@ -6846,19 +13394,26 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter390) + { + $xfer += $output->writeString($iter390); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -6869,53 +13424,41 @@ } -class metastore_ThriftHiveMetastore_drop_partition_by_name_args { +class metastore_ThriftHiveMetastore_get_user_privilege_set_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_name = null; - public $deleteData = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_name', + public $user_name = null; + public $group_names = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'user_name', 'type' => TType::STRING, ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 2 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_args'; + return 'ThriftHiveMetastore_get_user_privilege_set_args'; } public function read($input) @@ -6935,28 +13478,24 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size391 = 0; + $_etype394 = 0; + $xfer += $input->readListBegin($_etype394, $_size391); + for ($_i395 = 0; $_i395 < $_size391; ++$_i395) + { + $elem396 = null; + $xfer += $input->readString($elem396); + $this->group_names []= $elem396; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -6973,25 +13512,27 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_user_privilege_set_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter397) + { + $xfer += $output->writeString($iter397); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7001,28 +13542,23 @@ } -class metastore_ThriftHiveMetastore_drop_partition_by_name_result { +class metastore_ThriftHiveMetastore_get_user_privilege_set_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -7034,14 +13570,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_result'; + return 'ThriftHiveMetastore_get_user_privilege_set_result'; } public function read($input) @@ -7060,28 +13593,21 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7094,10 +13620,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_user_privilege_set_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + 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) { @@ -7105,11 +13634,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7117,12 +13641,12 @@ } -class metastore_ThriftHiveMetastore_get_partition_args { +class metastore_ThriftHiveMetastore_get_db_privilege_set_args { static $_TSPEC; public $db_name = null; - public $tbl_name = null; - public $part_vals = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7132,11 +13656,11 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', + 'var' => 'group_names', 'type' => TType::LST, 'etype' => TType::STRING, 'elem' => array( @@ -7149,17 +13673,17 @@ if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_args'; + return 'ThriftHiveMetastore_get_db_privilege_set_args'; } public function read($input) @@ -7186,22 +13710,22 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size177 = 0; - $_etype180 = 0; - $xfer += $input->readListBegin($_etype180, $_size177); - for ($_i181 = 0; $_i181 < $_size177; ++$_i181) + $this->group_names = array(); + $_size398 = 0; + $_etype401 = 0; + $xfer += $input->readListBegin($_etype401, $_size398); + for ($_i402 = 0; $_i402 < $_size398; ++$_i402) { - $elem182 = null; - $xfer += $input->readString($elem182); - $this->part_vals []= $elem182; + $elem403 = null; + $xfer += $input->readString($elem403); + $this->group_names []= $elem403; } $xfer += $input->readListEnd(); } else { @@ -7220,28 +13744,28 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_db_privilege_set_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 2); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + $xfer += $output->writeFieldBegin('group_names', TType::LST, 3); { - $output->writeListBegin(TType::STRING, count($this->part_vals)); + $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->part_vals as $iter183) + foreach ($this->group_names as $iter404) { - $xfer += $output->writeString($iter183); + $xfer += $output->writeString($iter404); } } $output->writeListEnd(); @@ -7255,12 +13779,11 @@ } -class metastore_ThriftHiveMetastore_get_partition_result { +class metastore_ThriftHiveMetastore_get_db_privilege_set_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7268,18 +13791,13 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -7289,14 +13807,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_result'; + return 'ThriftHiveMetastore_get_db_privilege_set_result'; } public function read($input) @@ -7316,7 +13831,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); + $this->success = new metastore_PrincipalPrivilegeSet(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -7330,14 +13845,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7350,7 +13857,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_db_privilege_set_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -7364,11 +13871,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7376,12 +13878,13 @@ } -class metastore_ThriftHiveMetastore_get_partition_by_name_args { +class metastore_ThriftHiveMetastore_get_table_privilege_set_args { static $_TSPEC; public $db_name = null; - public $tbl_name = null; - public $part_name = null; + public $table_name = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7391,30 +13894,41 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'table_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', + 'var' => 'user_name', 'type' => TType::STRING, ), + 4 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_args'; + return 'ThriftHiveMetastore_get_table_privilege_set_args'; } public function read($input) @@ -7441,14 +13955,31 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size405 = 0; + $_etype408 = 0; + $xfer += $input->readListBegin($_etype408, $_size405); + for ($_i409 = 0; $_i409 < $_size405; ++$_i409) + { + $elem410 = null; + $xfer += $input->readString($elem410); + $this->group_names []= $elem410; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7465,20 +13996,37 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_privilege_set_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 3); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter411) + { + $xfer += $output->writeString($iter411); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7488,12 +14036,11 @@ } -class metastore_ThriftHiveMetastore_get_partition_by_name_result { +class metastore_ThriftHiveMetastore_get_table_privilege_set_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7501,18 +14048,13 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -7522,14 +14064,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_result'; + return 'ThriftHiveMetastore_get_table_privilege_set_result'; } public function read($input) @@ -7549,7 +14088,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); + $this->success = new metastore_PrincipalPrivilegeSet(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -7563,14 +14102,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7583,7 +14114,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_privilege_set_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -7597,11 +14128,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7609,12 +14135,14 @@ } -class metastore_ThriftHiveMetastore_get_partitions_args { +class metastore_ThriftHiveMetastore_get_partition_privilege_set_args { static $_TSPEC; public $db_name = null; - public $tbl_name = null; - public $max_parts = -1; + public $table_name = null; + public $part_name = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7624,12 +14152,24 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'table_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -7637,17 +14177,23 @@ if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_args'; + return 'ThriftHiveMetastore_get_partition_privilege_set_args'; } public function read($input) @@ -7674,14 +14220,38 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size412 = 0; + $_etype415 = 0; + $xfer += $input->readListBegin($_etype415, $_size412); + for ($_i416 = 0; $_i416 < $_size412; ++$_i416) + { + $elem417 = null; + $xfer += $input->readString($elem417); + $this->group_names []= $elem417; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7698,20 +14268,42 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_privilege_set_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter418) + { + $xfer += $output->writeString($iter418); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7721,33 +14313,23 @@ } -class metastore_ThriftHiveMetastore_get_partitions_result { +class metastore_ThriftHiveMetastore_get_partition_privilege_set_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -7759,14 +14341,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_result'; + return 'ThriftHiveMetastore_get_partition_privilege_set_result'; } public function read($input) @@ -7785,39 +14364,21 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size184 = 0; - $_etype187 = 0; - $xfer += $input->readListBegin($_etype187, $_size184); - for ($_i188 = 0; $_i188 < $_size184; ++$_i188) - { - $elem189 = null; - $elem189 = new metastore_Partition(); - $xfer += $elem189->read($input); - $this->success []= $elem189; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7830,22 +14391,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_privilege_set_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter190) - { - $xfer += $iter190->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -7853,11 +14405,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7865,12 +14412,15 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_args { +class metastore_ThriftHiveMetastore_get_column_privilege_set_args { static $_TSPEC; public $db_name = null; - public $tbl_name = null; - public $max_parts = -1; + public $table_name = null; + public $part_name = null; + public $column_name = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7880,12 +14430,28 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'table_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'column_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -7893,17 +14459,26 @@ if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['column_name'])) { + $this->column_name = $vals['column_name']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_args'; + return 'ThriftHiveMetastore_get_column_privilege_set_args'; } public function read($input) @@ -7930,14 +14505,45 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size419 = 0; + $_etype422 = 0; + $xfer += $input->readListBegin($_etype422, $_size419); + for ($_i423 = 0; $_i423 < $_size419; ++$_i423) + { + $elem424 = null; + $xfer += $input->readString($elem424); + $this->group_names []= $elem424; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7954,20 +14560,47 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_column_privilege_set_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->column_name !== null) { + $xfer += $output->writeFieldBegin('column_name', TType::STRING, 4); + $xfer += $output->writeString($this->column_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter425) + { + $xfer += $output->writeString($iter425); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7977,25 +14610,22 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_result { +class metastore_ThriftHiveMetastore_get_column_privilege_set_result { static $_TSPEC; public $success = null; - public $o2 = null; + public $o1 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( - 'var' => 'o2', + 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), @@ -8005,14 +14635,14 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_result'; + return 'ThriftHiveMetastore_get_column_privilege_set_result'; } public function read($input) @@ -8031,26 +14661,17 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size191 = 0; - $_etype194 = 0; - $xfer += $input->readListBegin($_etype194, $_size191); - for ($_i195 = 0; $_i195 < $_size191; ++$_i195) - { - $elem196 = null; - $xfer += $input->readString($elem196); - $this->success []= $elem196; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -8063,31 +14684,22 @@ } $xfer += $input->readStructEnd(); return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter197) - { - $xfer += $output->writeString($iter197); - } - } - $output->writeListEnd(); + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_column_privilege_set_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->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); - $xfer += $this->o2->write($output); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8097,57 +14709,45 @@ } -class metastore_ThriftHiveMetastore_get_partitions_ps_args { +class metastore_ThriftHiveMetastore_create_role_args { static $_TSPEC; + public $role_name = null; + public $owner_name = null; public $db_name = null; - public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'role_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'owner_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'db_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['owner_name'])) { + $this->owner_name = $vals['owner_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_args'; + return 'ThriftHiveMetastore_create_role_args'; } public function read($input) @@ -8167,38 +14767,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->owner_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size198 = 0; - $_etype201 = 0; - $xfer += $input->readListBegin($_etype201, $_size198); - for ($_i202 = 0; $_i202 < $_size198; ++$_i202) - { - $elem203 = null; - $xfer += $input->readString($elem203); - $this->part_vals []= $elem203; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -8215,37 +14798,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter204) - { - $xfer += $output->writeString($iter204); - } - } - $output->writeListEnd(); - } + if ($this->owner_name !== null) { + $xfer += $output->writeFieldBegin('owner_name', TType::STRING, 2); + $xfer += $output->writeString($this->owner_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 3); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8255,7 +14821,7 @@ } -class metastore_ThriftHiveMetastore_get_partitions_ps_result { +class metastore_ThriftHiveMetastore_create_role_result { static $_TSPEC; public $success = null; @@ -8266,12 +14832,7 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', @@ -8291,7 +14852,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_result'; + return 'ThriftHiveMetastore_create_role_result'; } public function read($input) @@ -8310,19 +14871,8 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size205 = 0; - $_etype208 = 0; - $xfer += $input->readListBegin($_etype208, $_size205); - for ($_i209 = 0; $_i209 < $_size205; ++$_i209) - { - $elem210 = null; - $elem210 = new metastore_Partition(); - $xfer += $elem210->read($input); - $this->success []= $elem210; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -8347,22 +14897,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter211) - { - $xfer += $iter211->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8377,57 +14915,37 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_ps_args { +class metastore_ThriftHiveMetastore_drop_role_args { static $_TSPEC; + public $role_name = null; public $db_name = null; - public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'role_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'db_name', 'type' => TType::STRING, ), - 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, - ), ); } if (is_array($vals)) { + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_args'; + return 'ThriftHiveMetastore_drop_role_args'; } public function read($input) @@ -8447,38 +14965,14 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size212 = 0; - $_etype215 = 0; - $xfer += $input->readListBegin($_etype215, $_size212); - for ($_i216 = 0; $_i216 < $_size212; ++$_i216) - { - $elem217 = null; - $xfer += $input->readString($elem217); - $this->part_vals []= $elem217; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -8495,37 +14989,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter218) - { - $xfer += $output->writeString($iter218); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 2); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8535,7 +15007,7 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_ps_result { +class metastore_ThriftHiveMetastore_drop_role_result { static $_TSPEC; public $success = null; @@ -8546,11 +15018,7 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', @@ -8570,7 +15038,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_result'; + return 'ThriftHiveMetastore_drop_role_result'; } public function read($input) @@ -8589,18 +15057,8 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size219 = 0; - $_etype222 = 0; - $xfer += $input->readListBegin($_etype222, $_size219); - for ($_i223 = 0; $_i223 < $_size219; ++$_i223) - { - $elem224 = null; - $xfer += $input->readString($elem224); - $this->success []= $elem224; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -8625,22 +15083,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_role_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter225) - { - $xfer += $output->writeString($iter225); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8655,53 +15101,61 @@ } -class metastore_ThriftHiveMetastore_get_partitions_by_filter_args { +class metastore_ThriftHiveMetastore_add_role_member_args { static $_TSPEC; + public $role_name = null; + public $user_name = null; + public $is_role = null; + public $is_group = null; public $db_name = null; - public $tbl_name = null; - public $filter = null; - public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'role_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'filter', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'db_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['filter'])) { - $this->filter = $vals['filter']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_args'; + return 'ThriftHiveMetastore_add_role_member_args'; } public function read($input) @@ -8721,28 +15175,35 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->filter); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -8759,25 +15220,30 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_role_member_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 2); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->filter !== null) { - $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); - $xfer += $output->writeString($this->filter); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 4); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 5); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8787,35 +15253,24 @@ } -class metastore_ThriftHiveMetastore_get_partitions_by_filter_result { +class metastore_ThriftHiveMetastore_add_role_member_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -8825,14 +15280,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_result'; + return 'ThriftHiveMetastore_add_role_member_result'; } public function read($input) @@ -8851,19 +15303,8 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size226 = 0; - $_etype229 = 0; - $xfer += $input->readListBegin($_etype229, $_size226); - for ($_i230 = 0; $_i230 < $_size226; ++$_i230) - { - $elem231 = null; - $elem231 = new metastore_Partition(); - $xfer += $elem231->read($input); - $this->success []= $elem231; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -8876,14 +15317,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -8896,22 +15329,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_role_member_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter232) - { - $xfer += $iter232->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8919,11 +15340,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -8931,46 +15347,61 @@ } -class metastore_ThriftHiveMetastore_alter_partition_args { +class metastore_ThriftHiveMetastore_remove_role_member_args { static $_TSPEC; + public $role_name = null; + public $user_name = null; + public $is_role = null; + public $is_group = null; public $db_name = null; - public $tbl_name = null; - public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'role_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'db_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_args'; + return 'ThriftHiveMetastore_remove_role_member_args'; } public function read($input) @@ -8990,22 +15421,35 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_part = new metastore_Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -9022,23 +15466,30 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_role_member_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 2); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); - $xfer += $this->new_part->write($output); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 4); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 5); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9048,39 +15499,38 @@ } -class metastore_ThriftHiveMetastore_alter_partition_result { +class metastore_ThriftHiveMetastore_remove_role_member_result { static $_TSPEC; + public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 2 => array( - 'var' => 'o2', - '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']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_result'; + return 'ThriftHiveMetastore_remove_role_member_result'; } public function read($input) @@ -9098,18 +15548,17 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidOperationException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -9126,17 +15575,17 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_role_member_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -9144,37 +15593,53 @@ } -class metastore_ThriftHiveMetastore_get_config_value_args { +class metastore_ThriftHiveMetastore_list_roles_args { static $_TSPEC; - public $name = null; - public $defaultValue = null; + public $principal_name = null; + public $is_role = null; + public $is_group = null; + public $db_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'principal_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'defaultValue', + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'db_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; } - if (isset($vals['defaultValue'])) { - $this->defaultValue = $vals['defaultValue']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_config_value_args'; + return 'ThriftHiveMetastore_list_roles_args'; } public function read($input) @@ -9194,14 +15659,28 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->principal_name); } else { $xfer += $input->skip($ftype); } break; case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->defaultValue); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -9218,15 +15697,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_roles_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); $xfer += $output->writeFieldEnd(); } - if ($this->defaultValue !== null) { - $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); - $xfer += $output->writeString($this->defaultValue); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9236,7 +15725,7 @@ } -class metastore_ThriftHiveMetastore_get_config_value_result { +class metastore_ThriftHiveMetastore_list_roles_result { static $_TSPEC; public $success = null; @@ -9247,12 +15736,17 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRING, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Role', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_ConfigValSecurityException', + 'class' => 'metastore_MetaException', ), ); } @@ -9267,7 +15761,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_config_value_result'; + return 'ThriftHiveMetastore_list_roles_result'; } public function read($input) @@ -9286,15 +15780,26 @@ switch ($fid) { case 0: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size426 = 0; + $_etype429 = 0; + $xfer += $input->readListBegin($_etype429, $_size426); + for ($_i430 = 0; $_i430 < $_size426; ++$_i430) + { + $elem431 = null; + $elem431 = new metastore_Role(); + $xfer += $elem431->read($input); + $this->success []= $elem431; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_ConfigValSecurityException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9312,10 +15817,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_roles_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::STRING, 0); - $xfer += $output->writeString($this->success); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter432) + { + $xfer += $iter432->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9330,29 +15847,45 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_vals_args { +class metastore_ThriftHiveMetastore_list_security_user_grant_args { static $_TSPEC; - public $part_name = null; + public $principla_name = null; + public $is_role = null; + public $is_group = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_name', + 'var' => 'principla_name', 'type' => TType::STRING, ), + 2 => array( + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, + ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['principla_name'])) { + $this->principla_name = $vals['principla_name']; + } + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_args'; + return 'ThriftHiveMetastore_list_security_user_grant_args'; } public function read($input) @@ -9372,7 +15905,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->principla_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); } else { $xfer += $input->skip($ftype); } @@ -9389,10 +15936,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args'); - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); - $xfer += $output->writeString($this->part_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_user_grant_args'); + if ($this->principla_name !== null) { + $xfer += $output->writeFieldBegin('principla_name', TType::STRING, 1); + $xfer += $output->writeString($this->principla_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9402,7 +15959,7 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_vals_result { +class metastore_ThriftHiveMetastore_list_security_user_grant_result { static $_TSPEC; public $success = null; @@ -9414,9 +15971,10 @@ 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityUser', ), ), 1 => array( @@ -9437,7 +15995,7 @@ } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_result'; + return 'ThriftHiveMetastore_list_security_user_grant_result'; } public function read($input) @@ -9458,14 +16016,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size233 = 0; - $_etype236 = 0; - $xfer += $input->readListBegin($_etype236, $_size233); - for ($_i237 = 0; $_i237 < $_size233; ++$_i237) + $_size433 = 0; + $_etype436 = 0; + $xfer += $input->readListBegin($_etype436, $_size433); + for ($_i437 = 0; $_i437 < $_size433; ++$_i437) { - $elem238 = null; - $xfer += $input->readString($elem238); - $this->success []= $elem238; + $elem438 = null; + $elem438 = new metastore_SecurityUser(); + $xfer += $elem438->read($input); + $this->success []= $elem438; } $xfer += $input->readListEnd(); } else { @@ -9492,18 +16051,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_user_grant_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter239) + foreach ($this->success as $iter439) { - $xfer += $output->writeString($iter239); + $xfer += $iter439->write($output); } } $output->writeListEnd(); @@ -9522,29 +16081,53 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_spec_args { +class metastore_ThriftHiveMetastore_list_security_db_grant_args { static $_TSPEC; - public $part_name = null; + public $principal_name = null; + public $is_group = null; + public $is_role = null; + public $db_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_name', + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'db_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_args'; + return 'ThriftHiveMetastore_list_security_db_grant_args'; } public function read($input) @@ -9564,7 +16147,28 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -9581,10 +16185,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args'); - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); - $xfer += $output->writeString($this->part_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_db_grant_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9594,7 +16213,7 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_spec_result { +class metastore_ThriftHiveMetastore_list_security_db_grant_result { static $_TSPEC; public $success = null; @@ -9605,14 +16224,11 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityDB', ), ), 1 => array( @@ -9633,7 +16249,7 @@ } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_result'; + return 'ThriftHiveMetastore_list_security_db_grant_result'; } public function read($input) @@ -9652,21 +16268,19 @@ switch ($fid) { case 0: - if ($ftype == TType::MAP) { + if ($ftype == TType::LST) { $this->success = array(); - $_size240 = 0; - $_ktype241 = 0; - $_vtype242 = 0; - $xfer += $input->readMapBegin($_ktype241, $_vtype242, $_size240); - for ($_i244 = 0; $_i244 < $_size240; ++$_i244) + $_size440 = 0; + $_etype443 = 0; + $xfer += $input->readListBegin($_etype443, $_size440); + for ($_i444 = 0; $_i444 < $_size440; ++$_i444) { - $key245 = ''; - $val246 = ''; - $xfer += $input->readString($key245); - $xfer += $input->readString($val246); - $this->success[$key245] = $val246; + $elem445 = null; + $elem445 = new metastore_SecurityDB(); + $xfer += $elem445->read($input); + $this->success []= $elem445; } - $xfer += $input->readMapEnd(); + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -9691,22 +16305,21 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_db_grant_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $kiter247 => $viter248) + foreach ($this->success as $iter446) { - $xfer += $output->writeString($kiter247); - $xfer += $output->writeString($viter248); + $xfer += $iter446->write($output); } } - $output->writeMapEnd(); + $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } @@ -9722,39 +16335,61 @@ } -class metastore_ThriftHiveMetastore_add_index_args { +class metastore_ThriftHiveMetastore_list_security_table_grant_args { static $_TSPEC; - public $new_index = null; - public $index_table = null; + public $principal_name = null; + public $is_group = null; + public $is_role = null; + public $db_name = null; + public $table_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_index', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', + 'var' => 'principal_name', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'index_table', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'table_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['new_index'])) { - $this->new_index = $vals['new_index']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; } - if (isset($vals['index_table'])) { - $this->index_table = $vals['index_table']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } } } public function getName() { - return 'ThriftHiveMetastore_add_index_args'; + return 'ThriftHiveMetastore_list_security_table_grant_args'; } public function read($input) @@ -9773,17 +16408,36 @@ switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_index = new metastore_Index(); - $xfer += $this->new_index->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRUCT) { - $this->index_table = new metastore_Table(); - $xfer += $this->index_table->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } @@ -9800,21 +16454,30 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_args'); - if ($this->new_index !== null) { - if (!is_object($this->new_index)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); - $xfer += $this->new_index->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_table_grant_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); $xfer += $output->writeFieldEnd(); } - if ($this->index_table !== null) { - if (!is_object($this->index_table)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); - $xfer += $this->index_table->write($output); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 5); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9824,34 +16487,26 @@ } -class metastore_ThriftHiveMetastore_add_index_result { +class metastore_ThriftHiveMetastore_list_security_table_grant_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityTablePartition', + ), ), - 3 => array( - 'var' => 'o3', + 1 => array( + 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), @@ -9864,17 +16519,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_index_result'; + return 'ThriftHiveMetastore_list_security_table_grant_result'; } public function read($input) @@ -9893,37 +16542,31 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Index(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size447 = 0; + $_etype450 = 0; + $xfer += $input->readListBegin($_etype450, $_size447); + for ($_i451 = 0; $_i451 < $_size447; ++$_i451) + { + $elem452 = null; + $elem452 = new metastore_SecurityTablePartition(); + $xfer += $elem452->read($input); + $this->success []= $elem452; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -9936,13 +16579,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_table_grant_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($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->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter453) + { + $xfer += $iter453->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9950,16 +16602,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -9967,54 +16609,69 @@ } -class metastore_ThriftHiveMetastore_alter_index_args { +class metastore_ThriftHiveMetastore_list_security_partition_grant_args { static $_TSPEC; - public $dbname = null; - public $base_tbl_name = null; - public $idx_name = null; - public $new_idx = null; + public $principal_name = null; + public $is_group = null; + public $is_role = null; + public $db_name = null; + public $table_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'principal_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'base_tbl_name', - 'type' => TType::STRING, + 'var' => 'is_group', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'idx_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 4 => array( - 'var' => 'new_idx', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'part_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; } - if (isset($vals['base_tbl_name'])) { - $this->base_tbl_name = $vals['base_tbl_name']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; } - if (isset($vals['idx_name'])) { - $this->idx_name = $vals['idx_name']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['new_idx'])) { - $this->new_idx = $vals['new_idx']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_args'; + return 'ThriftHiveMetastore_list_security_partition_grant_args'; } public function read($input) @@ -10034,29 +16691,42 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->principal_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->base_tbl_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->idx_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRUCT) { - $this->new_idx = new metastore_Index(); - $xfer += $this->new_idx->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -10073,28 +16743,35 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_partition_grant_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); $xfer += $output->writeFieldEnd(); } - if ($this->base_tbl_name !== null) { - $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->base_tbl_name); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_group); $xfer += $output->writeFieldEnd(); } - if ($this->idx_name !== null) { - $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); - $xfer += $output->writeString($this->idx_name); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->new_idx !== null) { - if (!is_object($this->new_idx)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); - $xfer += $this->new_idx->write($output); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 5); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 6); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10104,39 +16781,43 @@ } -class metastore_ThriftHiveMetastore_alter_index_result { +class metastore_ThriftHiveMetastore_list_security_partition_grant_result { static $_TSPEC; + public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityTablePartition', + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 2 => array( - 'var' => 'o2', - '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']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_result'; + return 'ThriftHiveMetastore_list_security_partition_grant_result'; } public function read($input) @@ -10154,18 +16835,28 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidOperationException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size454 = 0; + $_etype457 = 0; + $xfer += $input->readListBegin($_etype457, $_size454); + for ($_i458 = 0; $_i458 < $_size454; ++$_i458) + { + $elem459 = null; + $elem459 = new metastore_SecurityTablePartition(); + $xfer += $elem459->read($input); + $this->success []= $elem459; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -10182,17 +16873,29 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_partition_grant_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter460) + { + $xfer += $iter460->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10200,53 +16903,77 @@ } -class metastore_ThriftHiveMetastore_drop_index_by_name_args { +class metastore_ThriftHiveMetastore_list_security_column_grant_args { static $_TSPEC; + public $principal_name = null; + public $is_group = null; + public $is_role = null; public $db_name = null; - public $tbl_name = null; - public $index_name = null; - public $deleteData = null; + public $table_name = null; + public $part_name = null; + public $column_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'principal_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'is_group', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'index_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'column_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_name']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['column_name'])) { + $this->column_name = $vals['column_name']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_index_by_name_args'; + return 'ThriftHiveMetastore_list_security_column_grant_args'; } public function read($input) @@ -10266,28 +16993,49 @@ { case 1: if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 5: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 6: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->index_name); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column_name); } else { $xfer += $input->skip($ftype); } @@ -10304,25 +17052,40 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_column_grant_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 5); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_name); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 6); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->column_name !== null) { + $xfer += $output->writeFieldBegin('column_name', TType::STRING, 7); + $xfer += $output->writeString($this->column_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10332,28 +17095,27 @@ } -class metastore_ThriftHiveMetastore_drop_index_by_name_result { +class metastore_ThriftHiveMetastore_list_security_column_grant_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityColumn', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -10365,14 +17127,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_index_by_name_result'; + return 'ThriftHiveMetastore_list_security_column_grant_result'; } public function read($input) @@ -10391,28 +17150,31 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size461 = 0; + $_etype464 = 0; + $xfer += $input->readListBegin($_etype464, $_size461); + for ($_i465 = 0; $_i465 < $_size461; ++$_i465) + { + $elem466 = null; + $elem466 = new metastore_SecurityColumn(); + $xfer += $elem466->read($input); + $this->success []= $elem466; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -10425,10 +17187,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_column_grant_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter467) + { + $xfer += $iter467->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10436,11 +17210,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10448,45 +17217,62 @@ } -class metastore_ThriftHiveMetastore_get_index_by_name_args { +class metastore_ThriftHiveMetastore_grant_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $index_name = null; + public $user_name = null; + public $is_role = null; + public $is_group = null; + public $privileges = null; + public $grantor = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'index_name', + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrivilegeBag', + ), + 5 => array( + 'var' => 'grantor', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_name']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_args'; + return 'ThriftHiveMetastore_grant_privileges_args'; } public function read($input) @@ -10506,21 +17292,36 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrivilegeBag(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->index_name); + $xfer += $input->readString($this->grantor); } else { $xfer += $input->skip($ftype); } @@ -10537,20 +17338,33 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_privileges_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_name); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); + $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, 4); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 5); + $xfer += $output->writeString($this->grantor); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10560,31 +17374,24 @@ } -class metastore_ThriftHiveMetastore_get_index_by_name_result { +class metastore_ThriftHiveMetastore_grant_privileges_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -10594,14 +17401,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_result'; + return 'ThriftHiveMetastore_grant_privileges_result'; } public function read($input) @@ -10620,9 +17424,8 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Index(); - $xfer += $this->success->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -10635,14 +17438,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -10655,13 +17450,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_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->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10669,11 +17461,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10681,45 +17468,54 @@ } -class metastore_ThriftHiveMetastore_get_indexes_args { +class metastore_ThriftHiveMetastore_revoke_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_indexes = -1; + public $user_name = null; + public $is_role = null; + public $is_group = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrivilegeBag', ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; } } } public function getName() { - return 'ThriftHiveMetastore_get_indexes_args'; + return 'ThriftHiveMetastore_revoke_privileges_args'; } public function read($input) @@ -10739,21 +17535,29 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_indexes); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrivilegeBag(); + $xfer += $this->privileges->read($input); } else { $xfer += $input->skip($ftype); } @@ -10770,20 +17574,28 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_privileges_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->max_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); + $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, 4); + $xfer += $this->privileges->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10793,33 +17605,22 @@ } -class metastore_ThriftHiveMetastore_get_indexes_result { +class metastore_ThriftHiveMetastore_revoke_privileges_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -10831,14 +17632,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_indexes_result'; + return 'ThriftHiveMetastore_revoke_privileges_result'; } public function read($input) @@ -10857,39 +17655,20 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size249 = 0; - $_etype252 = 0; - $xfer += $input->readListBegin($_etype252, $_size249); - for ($_i253 = 0; $_i253 < $_size249; ++$_i253) - { - $elem254 = null; - $elem254 = new metastore_Index(); - $xfer += $elem254->read($input); - $this->success []= $elem254; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -10902,22 +17681,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_privileges_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter255) - { - $xfer += $iter255->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10925,11 +17692,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10937,45 +17699,113 @@ } -class metastore_ThriftHiveMetastore_get_index_names_args { +class metastore_ThriftHiveMetastore_revoke_all_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_indexes = -1; + public $user_name = null; + public $is_role = null; + public $is_group = null; + public $remove_user_priv = null; + public $dbs = null; + public $tables = null; + public $parts = null; + public $columns = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'remove_user_priv', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'dbs', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + ), + 6 => array( + 'var' => 'tables', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ), + 7 => array( + 'var' => 'parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ), + 8 => array( + 'var' => 'columns', + 'type' => TType::MAP, + 'ktype' => TType::STRUCT, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['remove_user_priv'])) { + $this->remove_user_priv = $vals['remove_user_priv']; + } + if (isset($vals['dbs'])) { + $this->dbs = $vals['dbs']; + } + if (isset($vals['tables'])) { + $this->tables = $vals['tables']; + } + if (isset($vals['parts'])) { + $this->parts = $vals['parts']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_names_args'; + return 'ThriftHiveMetastore_revoke_all_privileges_args'; } public function read($input) @@ -10995,21 +17825,113 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_indexes); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->remove_user_priv); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->dbs = array(); + $_size468 = 0; + $_etype471 = 0; + $xfer += $input->readListBegin($_etype471, $_size468); + for ($_i472 = 0; $_i472 < $_size468; ++$_i472) + { + $elem473 = null; + $elem473 = new metastore_Database(); + $xfer += $elem473->read($input); + $this->dbs []= $elem473; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->tables = array(); + $_size474 = 0; + $_etype477 = 0; + $xfer += $input->readListBegin($_etype477, $_size474); + for ($_i478 = 0; $_i478 < $_size474; ++$_i478) + { + $elem479 = null; + $elem479 = new metastore_Table(); + $xfer += $elem479->read($input); + $this->tables []= $elem479; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::LST) { + $this->parts = array(); + $_size480 = 0; + $_etype483 = 0; + $xfer += $input->readListBegin($_etype483, $_size480); + for ($_i484 = 0; $_i484 < $_size480; ++$_i484) + { + $elem485 = null; + $elem485 = new metastore_Partition(); + $xfer += $elem485->read($input); + $this->parts []= $elem485; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::MAP) { + $this->columns = array(); + $_size486 = 0; + $_ktype487 = 0; + $_vtype488 = 0; + $xfer += $input->readMapBegin($_ktype487, $_vtype488, $_size486); + for ($_i490 = 0; $_i490 < $_size486; ++$_i490) + { + $key491 = new metastore_Table(); + $val492 = array(); + $key491 = new metastore_Table(); + $xfer += $key491->read($input); + $val492 = array(); + $_size493 = 0; + $_etype496 = 0; + $xfer += $input->readListBegin($_etype496, $_size493); + for ($_i497 = 0; $_i497 < $_size493; ++$_i497) + { + $elem498 = null; + $xfer += $input->readString($elem498); + $val492 []= $elem498; + } + $xfer += $input->readListEnd(); + $this->columns[$key491] = $val492; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -11026,20 +17948,103 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_all_privileges_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->max_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->remove_user_priv !== null) { + $xfer += $output->writeFieldBegin('remove_user_priv', TType::BOOL, 4); + $xfer += $output->writeBool($this->remove_user_priv); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbs !== null) { + if (!is_array($this->dbs)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('dbs', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->dbs)); + { + foreach ($this->dbs as $iter499) + { + $xfer += $iter499->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->tables !== null) { + if (!is_array($this->tables)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tables', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->tables)); + { + foreach ($this->tables as $iter500) + { + $xfer += $iter500->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->parts !== null) { + if (!is_array($this->parts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parts', TType::LST, 7); + { + $output->writeListBegin(TType::STRUCT, count($this->parts)); + { + foreach ($this->parts as $iter501) + { + $xfer += $iter501->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::MAP, 8); + { + $output->writeMapBegin(TType::STRUCT, TType::LST, count($this->columns)); + { + foreach ($this->columns as $kiter502 => $viter503) + { + $xfer += $kiter502->write($output); + { + $output->writeListBegin(TType::STRING, count($viter503)); + { + foreach ($viter503 as $iter504) + { + $xfer += $output->writeString($iter504); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -11049,25 +18054,21 @@ } -class metastore_ThriftHiveMetastore_get_index_names_result { +class metastore_ThriftHiveMetastore_revoke_all_privileges_result { static $_TSPEC; public $success = null; - public $o2 = null; + public $o1 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::BOOL, ), 1 => array( - 'var' => 'o2', + 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), @@ -11077,14 +18078,14 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_names_result'; + return 'ThriftHiveMetastore_revoke_all_privileges_result'; } public function read($input) @@ -11103,26 +18104,16 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size256 = 0; - $_etype259 = 0; - $xfer += $input->readListBegin($_etype259, $_size256); - for ($_i260 = 0; $_i260 < $_size256; ++$_i260) - { - $elem261 = null; - $xfer += $input->readString($elem261); - $this->success []= $elem261; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -11139,27 +18130,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_all_privileges_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter262) - { - $xfer += $output->writeString($iter262); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); - $xfer += $this->o2->write($output); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); Index: metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php =================================================================== --- metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php (revision 1044070) +++ metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php (working copy) @@ -372,31 +372,42 @@ } -class metastore_Database { +class metastore_PrincipalPrivilegeSet { static $_TSPEC; - public $name = null; - public $description = null; - public $locationUri = null; - public $parameters = null; + public $userPrivileges = null; + public $groupPrivileges = null; + public $rolePrivileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, + 'var' => 'userPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), ), 2 => array( - 'var' => 'description', - 'type' => TType::STRING, + 'var' => 'groupPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, ), - 3 => array( - 'var' => 'locationUri', - 'type' => TType::STRING, + 'val' => array( + 'type' => TType::STRING, + ), ), - 4 => array( - 'var' => 'parameters', + 3 => array( + 'var' => 'rolePrivileges', 'type' => TType::MAP, 'ktype' => TType::STRING, 'vtype' => TType::STRING, @@ -410,23 +421,20 @@ ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['description'])) { - $this->description = $vals['description']; + if (isset($vals['userPrivileges'])) { + $this->userPrivileges = $vals['userPrivileges']; } - if (isset($vals['locationUri'])) { - $this->locationUri = $vals['locationUri']; + if (isset($vals['groupPrivileges'])) { + $this->groupPrivileges = $vals['groupPrivileges']; } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; + if (isset($vals['rolePrivileges'])) { + $this->rolePrivileges = $vals['rolePrivileges']; } } } public function getName() { - return 'Database'; + return 'PrincipalPrivilegeSet'; } public function read($input) @@ -445,40 +453,59 @@ switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + if ($ftype == TType::MAP) { + $this->userPrivileges = array(); + $_size7 = 0; + $_ktype8 = 0; + $_vtype9 = 0; + $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $key12 = ''; + $val13 = ''; + $xfer += $input->readString($key12); + $xfer += $input->readString($val13); + $this->userPrivileges[$key12] = $val13; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->description); + if ($ftype == TType::MAP) { + $this->groupPrivileges = array(); + $_size14 = 0; + $_ktype15 = 0; + $_vtype16 = 0; + $xfer += $input->readMapBegin($_ktype15, $_vtype16, $_size14); + for ($_i18 = 0; $_i18 < $_size14; ++$_i18) + { + $key19 = ''; + $val20 = ''; + $xfer += $input->readString($key19); + $xfer += $input->readString($val20); + $this->groupPrivileges[$key19] = $val20; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->locationUri); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size7 = 0; - $_ktype8 = 0; - $_vtype9 = 0; - $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7); - for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + $this->rolePrivileges = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) { - $key12 = ''; - $val13 = ''; - $xfer += $input->readString($key12); - $xfer += $input->readString($val13); - $this->parameters[$key12] = $val13; + $key26 = ''; + $val27 = ''; + $xfer += $input->readString($key26); + $xfer += $input->readString($val27); + $this->rolePrivileges[$key26] = $val27; } $xfer += $input->readMapEnd(); } else { @@ -497,34 +524,55 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Database'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->description !== null) { - $xfer += $output->writeFieldBegin('description', TType::STRING, 2); - $xfer += $output->writeString($this->description); + $xfer += $output->writeStructBegin('PrincipalPrivilegeSet'); + if ($this->userPrivileges !== null) { + if (!is_array($this->userPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('userPrivileges', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->userPrivileges)); + { + foreach ($this->userPrivileges as $kiter28 => $viter29) + { + $xfer += $output->writeString($kiter28); + $xfer += $output->writeString($viter29); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->locationUri !== null) { - $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); - $xfer += $output->writeString($this->locationUri); + if ($this->groupPrivileges !== null) { + if (!is_array($this->groupPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('groupPrivileges', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->groupPrivileges)); + { + foreach ($this->groupPrivileges as $kiter30 => $viter31) + { + $xfer += $output->writeString($kiter30); + $xfer += $output->writeString($viter31); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { + if ($this->rolePrivileges !== null) { + if (!is_array($this->rolePrivileges)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 4); + $xfer += $output->writeFieldBegin('rolePrivileges', TType::MAP, 3); { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->rolePrivileges)); { - foreach ($this->parameters as $kiter14 => $viter15) + foreach ($this->rolePrivileges as $kiter32 => $viter33) { - $xfer += $output->writeString($kiter14); - $xfer += $output->writeString($viter15); + $xfer += $output->writeString($kiter32); + $xfer += $output->writeString($viter33); } } $output->writeMapEnd(); @@ -538,12 +586,14 @@ } -class metastore_SerDeInfo { +class metastore_Database { static $_TSPEC; public $name = null; - public $serializationLib = null; + public $description = null; + public $locationUri = null; public $parameters = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -553,10 +603,14 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'serializationLib', + 'var' => 'description', 'type' => TType::STRING, ), 3 => array( + 'var' => 'locationUri', + 'type' => TType::STRING, + ), + 4 => array( 'var' => 'parameters', 'type' => TType::MAP, 'ktype' => TType::STRING, @@ -568,23 +622,34 @@ 'type' => TType::STRING, ), ), + 5 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { if (isset($vals['name'])) { $this->name = $vals['name']; } - if (isset($vals['serializationLib'])) { - $this->serializationLib = $vals['serializationLib']; + if (isset($vals['description'])) { + $this->description = $vals['description']; + } + if (isset($vals['locationUri'])) { + $this->locationUri = $vals['locationUri']; } if (isset($vals['parameters'])) { $this->parameters = $vals['parameters']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } public function getName() { - return 'SerDeInfo'; + return 'Database'; } public function read($input) @@ -611,31 +676,46 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serializationLib); + $xfer += $input->readString($this->description); } else { $xfer += $input->skip($ftype); } break; case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->locationUri); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: if ($ftype == TType::MAP) { $this->parameters = array(); - $_size16 = 0; - $_ktype17 = 0; - $_vtype18 = 0; - $xfer += $input->readMapBegin($_ktype17, $_vtype18, $_size16); - for ($_i20 = 0; $_i20 < $_size16; ++$_i20) + $_size34 = 0; + $_ktype35 = 0; + $_vtype36 = 0; + $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34); + for ($_i38 = 0; $_i38 < $_size34; ++$_i38) { - $key21 = ''; - $val22 = ''; - $xfer += $input->readString($key21); - $xfer += $input->readString($val22); - $this->parameters[$key21] = $val22; + $key39 = ''; + $val40 = ''; + $xfer += $input->readString($key39); + $xfer += $input->readString($val40); + $this->parameters[$key39] = $val40; } $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; + case 5: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -648,35 +728,48 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('SerDeInfo'); + $xfer += $output->writeStructBegin('Database'); if ($this->name !== null) { $xfer += $output->writeFieldBegin('name', TType::STRING, 1); $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } - if ($this->serializationLib !== null) { - $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); - $xfer += $output->writeString($this->serializationLib); + if ($this->description !== null) { + $xfer += $output->writeFieldBegin('description', TType::STRING, 2); + $xfer += $output->writeString($this->description); + $xfer += $output->writeFieldEnd(); + } + if ($this->locationUri !== null) { + $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); + $xfer += $output->writeString($this->locationUri); $xfer += $output->writeFieldEnd(); } if ($this->parameters !== null) { if (!is_array($this->parameters)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 3); + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 4); { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter23 => $viter24) + foreach ($this->parameters as $kiter41 => $viter42) { - $xfer += $output->writeString($kiter23); - $xfer += $output->writeString($viter24); + $xfer += $output->writeString($kiter41); + $xfer += $output->writeString($viter42); } } $output->writeMapEnd(); } $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, 5); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -684,37 +777,70 @@ } -class metastore_Order { +class metastore_Role { static $_TSPEC; - public $col = null; - public $order = null; + public $roleName = null; + public $database = null; + public $createTime = null; + public $ownerName = null; + public $parameters = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'col', + 'var' => 'roleName', 'type' => TType::STRING, ), 2 => array( - 'var' => 'order', + 'var' => 'database', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + 3 => array( + 'var' => 'createTime', 'type' => TType::I32, ), + 4 => array( + 'var' => 'ownerName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { - if (isset($vals['col'])) { - $this->col = $vals['col']; + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; } - if (isset($vals['order'])) { - $this->order = $vals['order']; + if (isset($vals['database'])) { + $this->database = $vals['database']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['ownerName'])) { + $this->ownerName = $vals['ownerName']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; } } } public function getName() { - return 'Order'; + return 'Role'; } public function read($input) @@ -734,14 +860,49 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->col); + $xfer += $input->readString($this->roleName); } else { $xfer += $input->skip($ftype); } break; case 2: + if ($ftype == TType::STRUCT) { + $this->database = new metastore_Database(); + $xfer += $this->database->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: if ($ftype == TType::I32) { - $xfer += $input->readI32($this->order); + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->ownerName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size43 = 0; + $_ktype44 = 0; + $_vtype45 = 0; + $xfer += $input->readMapBegin($_ktype44, $_vtype45, $_size43); + for ($_i47 = 0; $_i47 < $_size43; ++$_i47) + { + $key48 = ''; + $val49 = ''; + $xfer += $input->readString($key48); + $xfer += $input->readString($val49); + $this->parameters[$key48] = $val49; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -758,15 +919,284 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Order'); - if ($this->col !== null) { - $xfer += $output->writeFieldBegin('col', TType::STRING, 1); - $xfer += $output->writeString($this->col); + $xfer += $output->writeStructBegin('Role'); + if ($this->roleName !== null) { + $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); + $xfer += $output->writeString($this->roleName); $xfer += $output->writeFieldEnd(); } - if ($this->order !== null) { - $xfer += $output->writeFieldBegin('order', TType::I32, 2); - $xfer += $output->writeI32($this->order); + if ($this->database !== null) { + if (!is_object($this->database)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('database', TType::STRUCT, 2); + $xfer += $this->database->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 3); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->ownerName !== null) { + $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 4); + $xfer += $output->writeString($this->ownerName); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter50 => $viter51) + { + $xfer += $output->writeString($kiter50); + $xfer += $output->writeString($viter51); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SerDeInfo { + static $_TSPEC; + + public $name = null; + public $serializationLib = null; + public $parameters = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'serializationLib', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['serializationLib'])) { + $this->serializationLib = $vals['serializationLib']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + } + } + + public function getName() { + return 'SerDeInfo'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->serializationLib); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size52 = 0; + $_ktype53 = 0; + $_vtype54 = 0; + $xfer += $input->readMapBegin($_ktype53, $_vtype54, $_size52); + for ($_i56 = 0; $_i56 < $_size52; ++$_i56) + { + $key57 = ''; + $val58 = ''; + $xfer += $input->readString($key57); + $xfer += $input->readString($val58); + $this->parameters[$key57] = $val58; + } + $xfer += $input->readMapEnd(); + } 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('SerDeInfo'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->serializationLib !== null) { + $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); + $xfer += $output->writeString($this->serializationLib); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter59 => $viter60) + { + $xfer += $output->writeString($kiter59); + $xfer += $output->writeString($viter60); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Order { + static $_TSPEC; + + public $col = null; + public $order = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'col', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'order', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['col'])) { + $this->col = $vals['col']; + } + if (isset($vals['order'])) { + $this->order = $vals['order']; + } + } + } + + public function getName() { + return 'Order'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->order); + } 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('Order'); + if ($this->col !== null) { + $xfer += $output->writeFieldBegin('col', TType::STRING, 1); + $xfer += $output->writeString($this->col); + $xfer += $output->writeFieldEnd(); + } + if ($this->order !== null) { + $xfer += $output->writeFieldBegin('order', TType::I32, 2); + $xfer += $output->writeI32($this->order); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -914,15 +1344,15 @@ case 1: if ($ftype == TType::LST) { $this->cols = array(); - $_size25 = 0; - $_etype28 = 0; - $xfer += $input->readListBegin($_etype28, $_size25); - for ($_i29 = 0; $_i29 < $_size25; ++$_i29) + $_size61 = 0; + $_etype64 = 0; + $xfer += $input->readListBegin($_etype64, $_size61); + for ($_i65 = 0; $_i65 < $_size61; ++$_i65) { - $elem30 = null; - $elem30 = new metastore_FieldSchema(); - $xfer += $elem30->read($input); - $this->cols []= $elem30; + $elem66 = null; + $elem66 = new metastore_FieldSchema(); + $xfer += $elem66->read($input); + $this->cols []= $elem66; } $xfer += $input->readListEnd(); } else { @@ -975,14 +1405,14 @@ case 8: if ($ftype == TType::LST) { $this->bucketCols = array(); - $_size31 = 0; - $_etype34 = 0; - $xfer += $input->readListBegin($_etype34, $_size31); - for ($_i35 = 0; $_i35 < $_size31; ++$_i35) + $_size67 = 0; + $_etype70 = 0; + $xfer += $input->readListBegin($_etype70, $_size67); + for ($_i71 = 0; $_i71 < $_size67; ++$_i71) { - $elem36 = null; - $xfer += $input->readString($elem36); - $this->bucketCols []= $elem36; + $elem72 = null; + $xfer += $input->readString($elem72); + $this->bucketCols []= $elem72; } $xfer += $input->readListEnd(); } else { @@ -992,15 +1422,15 @@ case 9: if ($ftype == TType::LST) { $this->sortCols = array(); - $_size37 = 0; - $_etype40 = 0; - $xfer += $input->readListBegin($_etype40, $_size37); - for ($_i41 = 0; $_i41 < $_size37; ++$_i41) + $_size73 = 0; + $_etype76 = 0; + $xfer += $input->readListBegin($_etype76, $_size73); + for ($_i77 = 0; $_i77 < $_size73; ++$_i77) { - $elem42 = null; - $elem42 = new metastore_Order(); - $xfer += $elem42->read($input); - $this->sortCols []= $elem42; + $elem78 = null; + $elem78 = new metastore_Order(); + $xfer += $elem78->read($input); + $this->sortCols []= $elem78; } $xfer += $input->readListEnd(); } else { @@ -1010,17 +1440,17 @@ case 10: if ($ftype == TType::MAP) { $this->parameters = array(); - $_size43 = 0; - $_ktype44 = 0; - $_vtype45 = 0; - $xfer += $input->readMapBegin($_ktype44, $_vtype45, $_size43); - for ($_i47 = 0; $_i47 < $_size43; ++$_i47) + $_size79 = 0; + $_ktype80 = 0; + $_vtype81 = 0; + $xfer += $input->readMapBegin($_ktype80, $_vtype81, $_size79); + for ($_i83 = 0; $_i83 < $_size79; ++$_i83) { - $key48 = ''; - $val49 = ''; - $xfer += $input->readString($key48); - $xfer += $input->readString($val49); - $this->parameters[$key48] = $val49; + $key84 = ''; + $val85 = ''; + $xfer += $input->readString($key84); + $xfer += $input->readString($val85); + $this->parameters[$key84] = $val85; } $xfer += $input->readMapEnd(); } else { @@ -1048,9 +1478,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->cols)); { - foreach ($this->cols as $iter50) + foreach ($this->cols as $iter86) { - $xfer += $iter50->write($output); + $xfer += $iter86->write($output); } } $output->writeListEnd(); @@ -1098,9 +1528,9 @@ { $output->writeListBegin(TType::STRING, count($this->bucketCols)); { - foreach ($this->bucketCols as $iter51) + foreach ($this->bucketCols as $iter87) { - $xfer += $output->writeString($iter51); + $xfer += $output->writeString($iter87); } } $output->writeListEnd(); @@ -1115,9 +1545,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->sortCols)); { - foreach ($this->sortCols as $iter52) + foreach ($this->sortCols as $iter88) { - $xfer += $iter52->write($output); + $xfer += $iter88->write($output); } } $output->writeListEnd(); @@ -1132,10 +1562,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter53 => $viter54) + foreach ($this->parameters as $kiter89 => $viter90) { - $xfer += $output->writeString($kiter53); - $xfer += $output->writeString($viter54); + $xfer += $output->writeString($kiter89); + $xfer += $output->writeString($viter90); } } $output->writeMapEnd(); @@ -1164,6 +1594,7 @@ public $viewOriginalText = null; public $viewExpandedText = null; public $tableType = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1230,6 +1661,11 @@ 'var' => 'tableType', 'type' => TType::STRING, ), + 13 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -1269,6 +1705,9 @@ if (isset($vals['tableType'])) { $this->tableType = $vals['tableType']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -1344,15 +1783,15 @@ case 8: if ($ftype == TType::LST) { $this->partitionKeys = array(); - $_size55 = 0; - $_etype58 = 0; - $xfer += $input->readListBegin($_etype58, $_size55); - for ($_i59 = 0; $_i59 < $_size55; ++$_i59) + $_size91 = 0; + $_etype94 = 0; + $xfer += $input->readListBegin($_etype94, $_size91); + for ($_i95 = 0; $_i95 < $_size91; ++$_i95) { - $elem60 = null; - $elem60 = new metastore_FieldSchema(); - $xfer += $elem60->read($input); - $this->partitionKeys []= $elem60; + $elem96 = null; + $elem96 = new metastore_FieldSchema(); + $xfer += $elem96->read($input); + $this->partitionKeys []= $elem96; } $xfer += $input->readListEnd(); } else { @@ -1362,17 +1801,17 @@ case 9: if ($ftype == TType::MAP) { $this->parameters = array(); - $_size61 = 0; - $_ktype62 = 0; - $_vtype63 = 0; - $xfer += $input->readMapBegin($_ktype62, $_vtype63, $_size61); - for ($_i65 = 0; $_i65 < $_size61; ++$_i65) + $_size97 = 0; + $_ktype98 = 0; + $_vtype99 = 0; + $xfer += $input->readMapBegin($_ktype98, $_vtype99, $_size97); + for ($_i101 = 0; $_i101 < $_size97; ++$_i101) { - $key66 = ''; - $val67 = ''; - $xfer += $input->readString($key66); - $xfer += $input->readString($val67); - $this->parameters[$key66] = $val67; + $key102 = ''; + $val103 = ''; + $xfer += $input->readString($key102); + $xfer += $input->readString($val103); + $this->parameters[$key102] = $val103; } $xfer += $input->readMapEnd(); } else { @@ -1400,6 +1839,14 @@ $xfer += $input->skip($ftype); } break; + case 13: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -1459,9 +1906,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->partitionKeys)); { - foreach ($this->partitionKeys as $iter68) + foreach ($this->partitionKeys as $iter104) { - $xfer += $iter68->write($output); + $xfer += $iter104->write($output); } } $output->writeListEnd(); @@ -1476,10 +1923,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter69 => $viter70) + foreach ($this->parameters as $kiter105 => $viter106) { - $xfer += $output->writeString($kiter69); - $xfer += $output->writeString($viter70); + $xfer += $output->writeString($kiter105); + $xfer += $output->writeString($viter106); } } $output->writeMapEnd(); @@ -1501,6 +1948,14 @@ $xfer += $output->writeString($this->tableType); $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, 13); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -1518,6 +1973,7 @@ public $lastAccessTime = null; public $sd = null; public $parameters = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1563,6 +2019,11 @@ 'type' => TType::STRING, ), ), + 8 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -1587,6 +2048,9 @@ if (isset($vals['parameters'])) { $this->parameters = $vals['parameters']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -1612,14 +2076,14 @@ case 1: if ($ftype == TType::LST) { $this->values = array(); - $_size71 = 0; - $_etype74 = 0; - $xfer += $input->readListBegin($_etype74, $_size71); - for ($_i75 = 0; $_i75 < $_size71; ++$_i75) + $_size107 = 0; + $_etype110 = 0; + $xfer += $input->readListBegin($_etype110, $_size107); + for ($_i111 = 0; $_i111 < $_size107; ++$_i111) { - $elem76 = null; - $xfer += $input->readString($elem76); - $this->values []= $elem76; + $elem112 = null; + $xfer += $input->readString($elem112); + $this->values []= $elem112; } $xfer += $input->readListEnd(); } else { @@ -1665,23 +2129,31 @@ case 7: if ($ftype == TType::MAP) { $this->parameters = array(); - $_size77 = 0; - $_ktype78 = 0; - $_vtype79 = 0; - $xfer += $input->readMapBegin($_ktype78, $_vtype79, $_size77); - for ($_i81 = 0; $_i81 < $_size77; ++$_i81) + $_size113 = 0; + $_ktype114 = 0; + $_vtype115 = 0; + $xfer += $input->readMapBegin($_ktype114, $_vtype115, $_size113); + for ($_i117 = 0; $_i117 < $_size113; ++$_i117) { - $key82 = ''; - $val83 = ''; - $xfer += $input->readString($key82); - $xfer += $input->readString($val83); - $this->parameters[$key82] = $val83; + $key118 = ''; + $val119 = ''; + $xfer += $input->readString($key118); + $xfer += $input->readString($val119); + $this->parameters[$key118] = $val119; } $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; + case 8: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -1703,9 +2175,9 @@ { $output->writeListBegin(TType::STRING, count($this->values)); { - foreach ($this->values as $iter84) + foreach ($this->values as $iter120) { - $xfer += $output->writeString($iter84); + $xfer += $output->writeString($iter120); } } $output->writeListEnd(); @@ -1748,16 +2220,24 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter85 => $viter86) + foreach ($this->parameters as $kiter121 => $viter122) { - $xfer += $output->writeString($kiter85); - $xfer += $output->writeString($viter86); + $xfer += $output->writeString($kiter121); + $xfer += $output->writeString($viter122); } } $output->writeMapEnd(); } $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, 8); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -1827,48 +2307,1293 @@ 'type' => TType::STRING, ), ), - 10 => array( - 'var' => 'deferredRebuild', - 'type' => TType::BOOL, + 10 => array( + 'var' => 'deferredRebuild', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['indexName'])) { + $this->indexName = $vals['indexName']; + } + if (isset($vals['indexHandlerClass'])) { + $this->indexHandlerClass = $vals['indexHandlerClass']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['origTableName'])) { + $this->origTableName = $vals['origTableName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['indexTableName'])) { + $this->indexTableName = $vals['indexTableName']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['deferredRebuild'])) { + $this->deferredRebuild = $vals['deferredRebuild']; + } + } + } + + public function getName() { + return 'Index'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexHandlerClass); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->origTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->sd = new metastore_StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size123 = 0; + $_ktype124 = 0; + $_vtype125 = 0; + $xfer += $input->readMapBegin($_ktype124, $_vtype125, $_size123); + for ($_i127 = 0; $_i127 < $_size123; ++$_i127) + { + $key128 = ''; + $val129 = ''; + $xfer += $input->readString($key128); + $xfer += $input->readString($val129); + $this->parameters[$key128] = $val129; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deferredRebuild); + } 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('Index'); + if ($this->indexName !== null) { + $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1); + $xfer += $output->writeString($this->indexName); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexHandlerClass !== null) { + $xfer += $output->writeFieldBegin('indexHandlerClass', TType::STRING, 2); + $xfer += $output->writeString($this->indexHandlerClass); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->origTableName !== null) { + $xfer += $output->writeFieldBegin('origTableName', TType::STRING, 4); + $xfer += $output->writeString($this->origTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexTableName !== null) { + $xfer += $output->writeFieldBegin('indexTableName', TType::STRING, 7); + $xfer += $output->writeString($this->indexTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter130 => $viter131) + { + $xfer += $output->writeString($kiter130); + $xfer += $output->writeString($viter131); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deferredRebuild !== null) { + $xfer += $output->writeFieldBegin('deferredRebuild', TType::BOOL, 10); + $xfer += $output->writeBool($this->deferredRebuild); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Schema { + static $_TSPEC; + + public $fieldSchemas = null; + public $properties = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fieldSchemas', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 2 => array( + 'var' => 'properties', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fieldSchemas'])) { + $this->fieldSchemas = $vals['fieldSchemas']; + } + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + } + } + + public function getName() { + return 'Schema'; + } + + 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::LST) { + $this->fieldSchemas = array(); + $_size132 = 0; + $_etype135 = 0; + $xfer += $input->readListBegin($_etype135, $_size132); + for ($_i136 = 0; $_i136 < $_size132; ++$_i136) + { + $elem137 = null; + $elem137 = new metastore_FieldSchema(); + $xfer += $elem137->read($input); + $this->fieldSchemas []= $elem137; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->properties = array(); + $_size138 = 0; + $_ktype139 = 0; + $_vtype140 = 0; + $xfer += $input->readMapBegin($_ktype139, $_vtype140, $_size138); + for ($_i142 = 0; $_i142 < $_size138; ++$_i142) + { + $key143 = ''; + $val144 = ''; + $xfer += $input->readString($key143); + $xfer += $input->readString($val144); + $this->properties[$key143] = $val144; + } + $xfer += $input->readMapEnd(); + } 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('Schema'); + if ($this->fieldSchemas !== null) { + if (!is_array($this->fieldSchemas)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); + { + foreach ($this->fieldSchemas as $iter145) + { + $xfer += $iter145->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->properties !== null) { + if (!is_array($this->properties)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('properties', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); + { + foreach ($this->properties as $kiter146 => $viter147) + { + $xfer += $output->writeString($kiter146); + $xfer += $output->writeString($viter147); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ColumnPrivilegeBag { + static $_TSPEC; + + public $dbName = null; + public $tableName = null; + public $partitionName = null; + public $columnPrivileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'partitionName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'columnPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['partitionName'])) { + $this->partitionName = $vals['partitionName']; + } + if (isset($vals['columnPrivileges'])) { + $this->columnPrivileges = $vals['columnPrivileges']; + } + } + } + + public function getName() { + return 'ColumnPrivilegeBag'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partitionName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->columnPrivileges = array(); + $_size148 = 0; + $_ktype149 = 0; + $_vtype150 = 0; + $xfer += $input->readMapBegin($_ktype149, $_vtype150, $_size148); + for ($_i152 = 0; $_i152 < $_size148; ++$_i152) + { + $key153 = ''; + $val154 = ''; + $xfer += $input->readString($key153); + $xfer += $input->readString($val154); + $this->columnPrivileges[$key153] = $val154; + } + $xfer += $input->readMapEnd(); + } 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('ColumnPrivilegeBag'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionName !== null) { + $xfer += $output->writeFieldBegin('partitionName', TType::STRING, 3); + $xfer += $output->writeString($this->partitionName); + $xfer += $output->writeFieldEnd(); + } + if ($this->columnPrivileges !== null) { + if (!is_array($this->columnPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columnPrivileges', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->columnPrivileges)); + { + foreach ($this->columnPrivileges as $kiter155 => $viter156) + { + $xfer += $output->writeString($kiter155); + $xfer += $output->writeString($viter156); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_PrivilegeBag { + static $_TSPEC; + + public $userPrivileges = null; + public $dbPrivileges = null; + public $tablePrivileges = null; + public $partitionPrivileges = null; + public $columnPrivileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'userPrivileges', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'dbPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRUCT, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'tablePrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRUCT, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'partitionPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRUCT, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'columnPrivileges', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_ColumnPrivilegeBag', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['userPrivileges'])) { + $this->userPrivileges = $vals['userPrivileges']; + } + if (isset($vals['dbPrivileges'])) { + $this->dbPrivileges = $vals['dbPrivileges']; + } + if (isset($vals['tablePrivileges'])) { + $this->tablePrivileges = $vals['tablePrivileges']; + } + if (isset($vals['partitionPrivileges'])) { + $this->partitionPrivileges = $vals['partitionPrivileges']; + } + if (isset($vals['columnPrivileges'])) { + $this->columnPrivileges = $vals['columnPrivileges']; + } + } + } + + public function getName() { + return 'PrivilegeBag'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->userPrivileges); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->dbPrivileges = array(); + $_size157 = 0; + $_ktype158 = 0; + $_vtype159 = 0; + $xfer += $input->readMapBegin($_ktype158, $_vtype159, $_size157); + for ($_i161 = 0; $_i161 < $_size157; ++$_i161) + { + $key162 = new metastore_Database(); + $val163 = ''; + $key162 = new metastore_Database(); + $xfer += $key162->read($input); + $xfer += $input->readString($val163); + $this->dbPrivileges[$key162] = $val163; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->tablePrivileges = array(); + $_size164 = 0; + $_ktype165 = 0; + $_vtype166 = 0; + $xfer += $input->readMapBegin($_ktype165, $_vtype166, $_size164); + for ($_i168 = 0; $_i168 < $_size164; ++$_i168) + { + $key169 = new metastore_Table(); + $val170 = ''; + $key169 = new metastore_Table(); + $xfer += $key169->read($input); + $xfer += $input->readString($val170); + $this->tablePrivileges[$key169] = $val170; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->partitionPrivileges = array(); + $_size171 = 0; + $_ktype172 = 0; + $_vtype173 = 0; + $xfer += $input->readMapBegin($_ktype172, $_vtype173, $_size171); + for ($_i175 = 0; $_i175 < $_size171; ++$_i175) + { + $key176 = new metastore_Partition(); + $val177 = ''; + $key176 = new metastore_Partition(); + $xfer += $key176->read($input); + $xfer += $input->readString($val177); + $this->partitionPrivileges[$key176] = $val177; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->columnPrivileges = array(); + $_size178 = 0; + $_etype181 = 0; + $xfer += $input->readListBegin($_etype181, $_size178); + for ($_i182 = 0; $_i182 < $_size178; ++$_i182) + { + $elem183 = null; + $elem183 = new metastore_ColumnPrivilegeBag(); + $xfer += $elem183->read($input); + $this->columnPrivileges []= $elem183; + } + $xfer += $input->readListEnd(); + } 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('PrivilegeBag'); + if ($this->userPrivileges !== null) { + $xfer += $output->writeFieldBegin('userPrivileges', TType::STRING, 1); + $xfer += $output->writeString($this->userPrivileges); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbPrivileges !== null) { + if (!is_array($this->dbPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('dbPrivileges', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRUCT, TType::STRING, count($this->dbPrivileges)); + { + foreach ($this->dbPrivileges as $kiter184 => $viter185) + { + $xfer += $kiter184->write($output); + $xfer += $output->writeString($viter185); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->tablePrivileges !== null) { + if (!is_array($this->tablePrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tablePrivileges', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRUCT, TType::STRING, count($this->tablePrivileges)); + { + foreach ($this->tablePrivileges as $kiter186 => $viter187) + { + $xfer += $kiter186->write($output); + $xfer += $output->writeString($viter187); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionPrivileges !== null) { + if (!is_array($this->partitionPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionPrivileges', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRUCT, TType::STRING, count($this->partitionPrivileges)); + { + foreach ($this->partitionPrivileges as $kiter188 => $viter189) + { + $xfer += $kiter188->write($output); + $xfer += $output->writeString($viter189); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columnPrivileges !== null) { + if (!is_array($this->columnPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columnPrivileges', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->columnPrivileges)); + { + foreach ($this->columnPrivileges as $iter190) + { + $xfer += $iter190->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SecurityUser { + static $_TSPEC; + + public $principalName = null; + public $isRole = null; + public $isGroup = null; + public $privileges = null; + public $createTime = null; + public $grantor = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'isRole', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'isGroup', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['isRole'])) { + $this->isRole = $vals['isRole']; + } + if (isset($vals['isGroup'])) { + $this->isGroup = $vals['isGroup']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + } + } + + public function getName() { + return 'SecurityUser'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isRole); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isGroup); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->privileges); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } 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('SecurityUser'); + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 1); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->isRole !== null) { + $xfer += $output->writeFieldBegin('isRole', TType::BOOL, 2); + $xfer += $output->writeBool($this->isRole); + $xfer += $output->writeFieldEnd(); + } + if ($this->isGroup !== null) { + $xfer += $output->writeFieldBegin('isGroup', TType::BOOL, 3); + $xfer += $output->writeBool($this->isGroup); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + $xfer += $output->writeFieldBegin('privileges', TType::STRING, 4); + $xfer += $output->writeString($this->privileges); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 6); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SecurityDB { + static $_TSPEC; + + public $principalName = null; + public $isRole = null; + public $isGroup = null; + public $privileges = null; + public $createTime = null; + public $grantor = null; + public $db = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'isRole', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'isGroup', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'db', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['isRole'])) { + $this->isRole = $vals['isRole']; + } + if (isset($vals['isGroup'])) { + $this->isGroup = $vals['isGroup']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['db'])) { + $this->db = $vals['db']; + } + } + } + + public function getName() { + return 'SecurityDB'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isRole); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isGroup); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->privileges); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->db = new metastore_Database(); + $xfer += $this->db->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('SecurityDB'); + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 1); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->isRole !== null) { + $xfer += $output->writeFieldBegin('isRole', TType::BOOL, 2); + $xfer += $output->writeBool($this->isRole); + $xfer += $output->writeFieldEnd(); + } + if ($this->isGroup !== null) { + $xfer += $output->writeFieldBegin('isGroup', TType::BOOL, 3); + $xfer += $output->writeBool($this->isGroup); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + $xfer += $output->writeFieldBegin('privileges', TType::STRING, 4); + $xfer += $output->writeString($this->privileges); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 6); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->db !== null) { + if (!is_object($this->db)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('db', TType::STRUCT, 7); + $xfer += $this->db->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SecurityTablePartition { + static $_TSPEC; + + public $principalName = null; + public $isRole = null; + public $isGroup = null; + public $privileges = null; + public $createTime = null; + public $grantor = null; + public $table = null; + public $part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'isRole', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'isGroup', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 8 => array( + 'var' => 'part', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), ); } if (is_array($vals)) { - if (isset($vals['indexName'])) { - $this->indexName = $vals['indexName']; + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; } - if (isset($vals['indexHandlerClass'])) { - $this->indexHandlerClass = $vals['indexHandlerClass']; + if (isset($vals['isRole'])) { + $this->isRole = $vals['isRole']; } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; + if (isset($vals['isGroup'])) { + $this->isGroup = $vals['isGroup']; } - if (isset($vals['origTableName'])) { - $this->origTableName = $vals['origTableName']; + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; } if (isset($vals['createTime'])) { $this->createTime = $vals['createTime']; } - if (isset($vals['lastAccessTime'])) { - $this->lastAccessTime = $vals['lastAccessTime']; - } - if (isset($vals['indexTableName'])) { - $this->indexTableName = $vals['indexTableName']; - } - if (isset($vals['sd'])) { - $this->sd = $vals['sd']; + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; + if (isset($vals['table'])) { + $this->table = $vals['table']; } - if (isset($vals['deferredRebuild'])) { - $this->deferredRebuild = $vals['deferredRebuild']; + if (isset($vals['part'])) { + $this->part = $vals['part']; } } } public function getName() { - return 'Index'; + return 'SecurityTablePartition'; } public function read($input) @@ -1888,28 +3613,28 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->indexName); + $xfer += $input->readString($this->principalName); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->indexHandlerClass); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isRole); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbName); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isGroup); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->origTableName); + $xfer += $input->readString($this->privileges); } else { $xfer += $input->skip($ftype); } @@ -1922,50 +3647,24 @@ } break; case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->lastAccessTime); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); } else { $xfer += $input->skip($ftype); } break; case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->indexTableName); + if ($ftype == TType::STRUCT) { + $this->table = new metastore_Table(); + $xfer += $this->table->read($input); } else { $xfer += $input->skip($ftype); } break; case 8: if ($ftype == TType::STRUCT) { - $this->sd = new metastore_StorageDescriptor(); - $xfer += $this->sd->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size87 = 0; - $_ktype88 = 0; - $_vtype89 = 0; - $xfer += $input->readMapBegin($_ktype88, $_vtype89, $_size87); - for ($_i91 = 0; $_i91 < $_size87; ++$_i91) - { - $key92 = ''; - $val93 = ''; - $xfer += $input->readString($key92); - $xfer += $input->readString($val93); - $this->parameters[$key92] = $val93; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deferredRebuild); + $this->part = new metastore_Partition(); + $xfer += $this->part->read($input); } else { $xfer += $input->skip($ftype); } @@ -1982,25 +3681,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Index'); - if ($this->indexName !== null) { - $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1); - $xfer += $output->writeString($this->indexName); + $xfer += $output->writeStructBegin('SecurityTablePartition'); + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 1); + $xfer += $output->writeString($this->principalName); $xfer += $output->writeFieldEnd(); } - if ($this->indexHandlerClass !== null) { - $xfer += $output->writeFieldBegin('indexHandlerClass', TType::STRING, 2); - $xfer += $output->writeString($this->indexHandlerClass); + if ($this->isRole !== null) { + $xfer += $output->writeFieldBegin('isRole', TType::BOOL, 2); + $xfer += $output->writeBool($this->isRole); $xfer += $output->writeFieldEnd(); } - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); - $xfer += $output->writeString($this->dbName); + if ($this->isGroup !== null) { + $xfer += $output->writeFieldBegin('isGroup', TType::BOOL, 3); + $xfer += $output->writeBool($this->isGroup); $xfer += $output->writeFieldEnd(); } - if ($this->origTableName !== null) { - $xfer += $output->writeFieldBegin('origTableName', TType::STRING, 4); - $xfer += $output->writeString($this->origTableName); + if ($this->privileges !== null) { + $xfer += $output->writeFieldBegin('privileges', TType::STRING, 4); + $xfer += $output->writeString($this->privileges); $xfer += $output->writeFieldEnd(); } if ($this->createTime !== null) { @@ -2008,45 +3707,25 @@ $xfer += $output->writeI32($this->createTime); $xfer += $output->writeFieldEnd(); } - if ($this->lastAccessTime !== null) { - $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); - $xfer += $output->writeI32($this->lastAccessTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->indexTableName !== null) { - $xfer += $output->writeFieldBegin('indexTableName', TType::STRING, 7); - $xfer += $output->writeString($this->indexTableName); + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 6); + $xfer += $output->writeString($this->grantor); $xfer += $output->writeFieldEnd(); } - if ($this->sd !== null) { - if (!is_object($this->sd)) { + if ($this->table !== null) { + if (!is_object($this->table)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); - $xfer += $this->sd->write($output); + $xfer += $output->writeFieldBegin('table', TType::STRUCT, 7); + $xfer += $this->table->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { + if ($this->part !== null) { + if (!is_object($this->part)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter94 => $viter95) - { - $xfer += $output->writeString($kiter94); - $xfer += $output->writeString($viter95); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->deferredRebuild !== null) { - $xfer += $output->writeFieldBegin('deferredRebuild', TType::BOOL, 10); - $xfer += $output->writeBool($this->deferredRebuild); + $xfer += $output->writeFieldBegin('part', TType::STRUCT, 8); + $xfer += $this->part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2056,50 +3735,95 @@ } -class metastore_Schema { +class metastore_SecurityColumn { static $_TSPEC; - public $fieldSchemas = null; - public $properties = null; + public $principalName = null; + public $isRole = null; + public $isGroup = null; + public $privileges = null; + public $createTime = null; + public $grantor = null; + public $table = null; + public $partition = null; + public $column = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'fieldSchemas', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), + 'var' => 'principalName', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'properties', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, + 'var' => 'isRole', + 'type' => TType::BOOL, ), - 'val' => array( - 'type' => TType::STRING, - ), + 3 => array( + 'var' => 'isGroup', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 8 => array( + 'var' => 'partition', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 9 => array( + 'var' => 'column', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['fieldSchemas'])) { - $this->fieldSchemas = $vals['fieldSchemas']; + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; } - if (isset($vals['properties'])) { - $this->properties = $vals['properties']; + if (isset($vals['isRole'])) { + $this->isRole = $vals['isRole']; + } + if (isset($vals['isGroup'])) { + $this->isGroup = $vals['isGroup']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['table'])) { + $this->table = $vals['table']; + } + if (isset($vals['partition'])) { + $this->partition = $vals['partition']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; } } } public function getName() { - return 'Schema'; + return 'SecurityColumn'; } public function read($input) @@ -2118,39 +3842,66 @@ switch ($fid) { case 1: - if ($ftype == TType::LST) { - $this->fieldSchemas = array(); - $_size96 = 0; - $_etype99 = 0; - $xfer += $input->readListBegin($_etype99, $_size96); - for ($_i100 = 0; $_i100 < $_size96; ++$_i100) - { - $elem101 = null; - $elem101 = new metastore_FieldSchema(); - $xfer += $elem101->read($input); - $this->fieldSchemas []= $elem101; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::MAP) { - $this->properties = array(); - $_size102 = 0; - $_ktype103 = 0; - $_vtype104 = 0; - $xfer += $input->readMapBegin($_ktype103, $_vtype104, $_size102); - for ($_i106 = 0; $_i106 < $_size102; ++$_i106) - { - $key107 = ''; - $val108 = ''; - $xfer += $input->readString($key107); - $xfer += $input->readString($val108); - $this->properties[$key107] = $val108; - } - $xfer += $input->readMapEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isRole); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isGroup); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->privileges); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->table = new metastore_Table(); + $xfer += $this->table->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->partition = new metastore_Partition(); + $xfer += $this->partition->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); } else { $xfer += $input->skip($ftype); } @@ -2167,40 +3918,56 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Schema'); - if ($this->fieldSchemas !== null) { - if (!is_array($this->fieldSchemas)) { + $xfer += $output->writeStructBegin('SecurityColumn'); + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 1); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->isRole !== null) { + $xfer += $output->writeFieldBegin('isRole', TType::BOOL, 2); + $xfer += $output->writeBool($this->isRole); + $xfer += $output->writeFieldEnd(); + } + if ($this->isGroup !== null) { + $xfer += $output->writeFieldBegin('isGroup', TType::BOOL, 3); + $xfer += $output->writeBool($this->isGroup); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + $xfer += $output->writeFieldBegin('privileges', TType::STRING, 4); + $xfer += $output->writeString($this->privileges); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 6); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->table !== null) { + if (!is_object($this->table)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); - { - foreach ($this->fieldSchemas as $iter109) - { - $xfer += $iter109->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('table', TType::STRUCT, 7); + $xfer += $this->table->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->properties !== null) { - if (!is_array($this->properties)) { + if ($this->partition !== null) { + if (!is_object($this->partition)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('properties', TType::MAP, 2); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); - { - foreach ($this->properties as $kiter110 => $viter111) - { - $xfer += $output->writeString($kiter110); - $xfer += $output->writeString($viter111); - } - } - $output->writeMapEnd(); - } + $xfer += $output->writeFieldBegin('partition', TType::STRUCT, 8); + $xfer += $this->partition->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 9); + $xfer += $output->writeString($this->column); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (revision 1044070) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -44,10 +44,13 @@ print ' bool drop_partition(string db_name, string tbl_name, part_vals, bool deleteData)' print ' bool drop_partition_by_name(string db_name, string tbl_name, string part_name, bool deleteData)' print ' Partition get_partition(string db_name, string tbl_name, part_vals)' + print ' Partition get_partition_with_auth(string db_name, string tbl_name, part_vals, string user_name, group_names)' print ' Partition get_partition_by_name(string db_name, string tbl_name, string part_name)' print ' get_partitions(string db_name, string tbl_name, i16 max_parts)' + print ' get_partitions_with_auth(string db_name, string tbl_name, i16 max_parts, string user_name, group_names)' print ' get_partition_names(string db_name, string tbl_name, i16 max_parts)' print ' get_partitions_ps(string db_name, string tbl_name, part_vals, i16 max_parts)' + print ' get_partitions_ps_with_auth(string db_name, string tbl_name, part_vals, i16 max_parts, string user_name, group_names)' print ' get_partition_names_ps(string db_name, string tbl_name, part_vals, i16 max_parts)' print ' get_partitions_by_filter(string db_name, string tbl_name, string filter, i16 max_parts)' print ' void alter_partition(string db_name, string tbl_name, Partition new_part)' @@ -60,6 +63,24 @@ print ' Index get_index_by_name(string db_name, string tbl_name, string index_name)' print ' get_indexes(string db_name, string tbl_name, i16 max_indexes)' print ' get_index_names(string db_name, string tbl_name, i16 max_indexes)' + print ' PrincipalPrivilegeSet get_user_privilege_set(string user_name, group_names)' + print ' PrincipalPrivilegeSet get_db_privilege_set(string db_name, string user_name, group_names)' + print ' PrincipalPrivilegeSet get_table_privilege_set(string db_name, string table_name, string user_name, group_names)' + print ' PrincipalPrivilegeSet get_partition_privilege_set(string db_name, string table_name, string part_name, string user_name, group_names)' + print ' PrincipalPrivilegeSet get_column_privilege_set(string db_name, string table_name, string part_name, string column_name, string user_name, group_names)' + print ' bool create_role(string role_name, string owner_name, string db_name)' + print ' bool drop_role(string role_name, string db_name)' + print ' bool add_role_member(string role_name, string user_name, bool is_role, bool is_group, string db_name)' + print ' bool remove_role_member(string role_name, string user_name, bool is_role, bool is_group, string db_name)' + print ' list_roles(string principal_name, bool is_role, bool is_group, string db_name)' + print ' list_security_user_grant(string principla_name, bool is_role, bool is_group)' + print ' list_security_db_grant(string principal_name, bool is_group, bool is_role, string db_name)' + print ' list_security_table_grant(string principal_name, bool is_group, bool is_role, string db_name, string table_name)' + print ' list_security_partition_grant(string principal_name, bool is_group, bool is_role, string db_name, string table_name, string part_name)' + print ' list_security_column_grant(string principal_name, bool is_group, bool is_role, string db_name, string table_name, string part_name, string column_name)' + print ' bool grant_privileges(string user_name, bool is_role, bool is_group, PrivilegeBag privileges, string grantor)' + print ' bool revoke_privileges(string user_name, bool is_role, bool is_group, PrivilegeBag privileges)' + print ' bool revoke_all_privileges(string user_name, bool is_role, bool is_group, bool remove_user_priv, dbs, tables, parts, columns)' print '' sys.exit(0) @@ -248,6 +269,12 @@ sys.exit(1) pp.pprint(client.get_partition(args[0],args[1],eval(args[2]),)) +elif cmd == 'get_partition_with_auth': + if len(args) != 5: + print 'get_partition_with_auth requires 5 args' + sys.exit(1) + pp.pprint(client.get_partition_with_auth(args[0],args[1],eval(args[2]),args[3],eval(args[4]),)) + elif cmd == 'get_partition_by_name': if len(args) != 3: print 'get_partition_by_name requires 3 args' @@ -260,6 +287,12 @@ sys.exit(1) pp.pprint(client.get_partitions(args[0],args[1],eval(args[2]),)) +elif cmd == 'get_partitions_with_auth': + if len(args) != 5: + print 'get_partitions_with_auth requires 5 args' + sys.exit(1) + pp.pprint(client.get_partitions_with_auth(args[0],args[1],eval(args[2]),args[3],eval(args[4]),)) + elif cmd == 'get_partition_names': if len(args) != 3: print 'get_partition_names requires 3 args' @@ -272,6 +305,12 @@ sys.exit(1) pp.pprint(client.get_partitions_ps(args[0],args[1],eval(args[2]),eval(args[3]),)) +elif cmd == 'get_partitions_ps_with_auth': + if len(args) != 6: + print 'get_partitions_ps_with_auth requires 6 args' + sys.exit(1) + pp.pprint(client.get_partitions_ps_with_auth(args[0],args[1],eval(args[2]),eval(args[3]),args[4],eval(args[5]),)) + elif cmd == 'get_partition_names_ps': if len(args) != 4: print 'get_partition_names_ps requires 4 args' @@ -344,6 +383,114 @@ sys.exit(1) pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) +elif cmd == 'get_user_privilege_set': + if len(args) != 2: + print 'get_user_privilege_set requires 2 args' + sys.exit(1) + pp.pprint(client.get_user_privilege_set(args[0],eval(args[1]),)) + +elif cmd == 'get_db_privilege_set': + if len(args) != 3: + print 'get_db_privilege_set requires 3 args' + sys.exit(1) + pp.pprint(client.get_db_privilege_set(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_table_privilege_set': + if len(args) != 4: + print 'get_table_privilege_set requires 4 args' + sys.exit(1) + pp.pprint(client.get_table_privilege_set(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'get_partition_privilege_set': + if len(args) != 5: + print 'get_partition_privilege_set requires 5 args' + sys.exit(1) + pp.pprint(client.get_partition_privilege_set(args[0],args[1],args[2],args[3],eval(args[4]),)) + +elif cmd == 'get_column_privilege_set': + if len(args) != 6: + print 'get_column_privilege_set requires 6 args' + sys.exit(1) + pp.pprint(client.get_column_privilege_set(args[0],args[1],args[2],args[3],args[4],eval(args[5]),)) + +elif cmd == 'create_role': + if len(args) != 3: + print 'create_role requires 3 args' + sys.exit(1) + pp.pprint(client.create_role(args[0],args[1],args[2],)) + +elif cmd == 'drop_role': + if len(args) != 2: + print 'drop_role requires 2 args' + sys.exit(1) + pp.pprint(client.drop_role(args[0],args[1],)) + +elif cmd == 'add_role_member': + if len(args) != 5: + print 'add_role_member requires 5 args' + sys.exit(1) + pp.pprint(client.add_role_member(args[0],args[1],eval(args[2]),eval(args[3]),args[4],)) + +elif cmd == 'remove_role_member': + if len(args) != 5: + print 'remove_role_member requires 5 args' + sys.exit(1) + pp.pprint(client.remove_role_member(args[0],args[1],eval(args[2]),eval(args[3]),args[4],)) + +elif cmd == 'list_roles': + if len(args) != 4: + print 'list_roles requires 4 args' + sys.exit(1) + pp.pprint(client.list_roles(args[0],eval(args[1]),eval(args[2]),args[3],)) + +elif cmd == 'list_security_user_grant': + if len(args) != 3: + print 'list_security_user_grant requires 3 args' + sys.exit(1) + pp.pprint(client.list_security_user_grant(args[0],eval(args[1]),eval(args[2]),)) + +elif cmd == 'list_security_db_grant': + if len(args) != 4: + print 'list_security_db_grant requires 4 args' + sys.exit(1) + pp.pprint(client.list_security_db_grant(args[0],eval(args[1]),eval(args[2]),args[3],)) + +elif cmd == 'list_security_table_grant': + if len(args) != 5: + print 'list_security_table_grant requires 5 args' + sys.exit(1) + pp.pprint(client.list_security_table_grant(args[0],eval(args[1]),eval(args[2]),args[3],args[4],)) + +elif cmd == 'list_security_partition_grant': + if len(args) != 6: + print 'list_security_partition_grant requires 6 args' + sys.exit(1) + pp.pprint(client.list_security_partition_grant(args[0],eval(args[1]),eval(args[2]),args[3],args[4],args[5],)) + +elif cmd == 'list_security_column_grant': + if len(args) != 7: + print 'list_security_column_grant requires 7 args' + sys.exit(1) + pp.pprint(client.list_security_column_grant(args[0],eval(args[1]),eval(args[2]),args[3],args[4],args[5],args[6],)) + +elif cmd == 'grant_privileges': + if len(args) != 5: + print 'grant_privileges requires 5 args' + sys.exit(1) + pp.pprint(client.grant_privileges(args[0],eval(args[1]),eval(args[2]),eval(args[3]),args[4],)) + +elif cmd == 'revoke_privileges': + if len(args) != 4: + print 'revoke_privileges requires 4 args' + sys.exit(1) + pp.pprint(client.revoke_privileges(args[0],eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'revoke_all_privileges': + if len(args) != 8: + print 'revoke_all_privileges requires 8 args' + sys.exit(1) + pp.pprint(client.revoke_all_privileges(args[0],eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),eval(args[6]),eval(args[7]),)) + else: print 'Unrecognized method %s' % cmd sys.exit(1) Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (revision 1044070) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -198,6 +198,17 @@ """ pass + def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + """ + pass + def get_partition_by_name(self, db_name, tbl_name, part_name): """ Parameters: @@ -216,6 +227,17 @@ """ pass + def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + """ + pass + def get_partition_names(self, db_name, tbl_name, max_parts): """ Parameters: @@ -235,6 +257,18 @@ """ pass + def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + """ + pass + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): """ Parameters: @@ -341,6 +375,195 @@ """ pass + def get_user_privilege_set(self, user_name, group_names): + """ + Parameters: + - user_name + - group_names + """ + pass + + def get_db_privilege_set(self, db_name, user_name, group_names): + """ + Parameters: + - db_name + - user_name + - group_names + """ + pass + + def get_table_privilege_set(self, db_name, table_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - user_name + - group_names + """ + pass + + def get_partition_privilege_set(self, db_name, table_name, part_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - part_name + - user_name + - group_names + """ + pass + + def get_column_privilege_set(self, db_name, table_name, part_name, column_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - part_name + - column_name + - user_name + - group_names + """ + pass + + def create_role(self, role_name, owner_name, db_name): + """ + Parameters: + - role_name + - owner_name + - db_name + """ + pass + + def drop_role(self, role_name, db_name): + """ + Parameters: + - role_name + - db_name + """ + pass + + def add_role_member(self, role_name, user_name, is_role, is_group, db_name): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + - db_name + """ + pass + + def remove_role_member(self, role_name, user_name, is_role, is_group, db_name): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + - db_name + """ + pass + + def list_roles(self, principal_name, is_role, is_group, db_name): + """ + Parameters: + - principal_name + - is_role + - is_group + - db_name + """ + pass + + def list_security_user_grant(self, principla_name, is_role, is_group): + """ + Parameters: + - principla_name + - is_role + - is_group + """ + pass + + def list_security_db_grant(self, principal_name, is_group, is_role, db_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + """ + pass + + def list_security_table_grant(self, principal_name, is_group, is_role, db_name, table_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + """ + pass + + def list_security_partition_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + """ + pass + + def list_security_column_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name, column_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + - column_name + """ + pass + + def grant_privileges(self, user_name, is_role, is_group, privileges, grantor): + """ + Parameters: + - user_name + - is_role + - is_group + - privileges + - grantor + """ + pass + + def revoke_privileges(self, user_name, is_role, is_group, privileges): + """ + Parameters: + - user_name + - is_role + - is_group + - privileges + """ + pass + + def revoke_all_privileges(self, user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns): + """ + Parameters: + - user_name + - is_role + - is_group + - remove_user_priv + - dbs + - tables + - parts + - columns + """ + pass + class Client(fb303.FacebookService.Client, Iface): """ @@ -1168,6 +1391,48 @@ raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); + def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + """ + self.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + return self.recv_get_partition_with_auth() + + def send_get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + self._oprot.writeMessageBegin('get_partition_with_auth', TMessageType.CALL, self._seqid) + args = get_partition_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_with_auth(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_with_auth_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result"); + def get_partition_by_name(self, db_name, tbl_name, part_name): """ Parameters: @@ -1244,6 +1509,48 @@ raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); + def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + """ + self.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + return self.recv_get_partitions_with_auth() + + def send_get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + self._oprot.writeMessageBegin('get_partitions_with_auth', TMessageType.CALL, self._seqid) + args = get_partitions_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_with_auth(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partitions_with_auth_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); + def get_partition_names(self, db_name, tbl_name, max_parts): """ Parameters: @@ -1318,6 +1625,50 @@ raise result.o1 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); + def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + """ + self.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + return self.recv_get_partitions_ps_with_auth() + + def send_get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + self._oprot.writeMessageBegin('get_partitions_ps_with_auth', TMessageType.CALL, self._seqid) + args = get_partitions_ps_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.max_parts = max_parts + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_ps_with_auth(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partitions_ps_with_auth_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): """ Parameters: @@ -1758,6 +2109,708 @@ raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); + def get_user_privilege_set(self, user_name, group_names): + """ + Parameters: + - user_name + - group_names + """ + self.send_get_user_privilege_set(user_name, group_names) + return self.recv_get_user_privilege_set() + + def send_get_user_privilege_set(self, user_name, group_names): + self._oprot.writeMessageBegin('get_user_privilege_set', TMessageType.CALL, self._seqid) + args = get_user_privilege_set_args() + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_user_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_user_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_user_privilege_set failed: unknown result"); + + def get_db_privilege_set(self, db_name, user_name, group_names): + """ + Parameters: + - db_name + - user_name + - group_names + """ + self.send_get_db_privilege_set(db_name, user_name, group_names) + return self.recv_get_db_privilege_set() + + def send_get_db_privilege_set(self, db_name, user_name, group_names): + self._oprot.writeMessageBegin('get_db_privilege_set', TMessageType.CALL, self._seqid) + args = get_db_privilege_set_args() + args.db_name = db_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_db_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_db_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_db_privilege_set failed: unknown result"); + + def get_table_privilege_set(self, db_name, table_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - user_name + - group_names + """ + self.send_get_table_privilege_set(db_name, table_name, user_name, group_names) + return self.recv_get_table_privilege_set() + + def send_get_table_privilege_set(self, db_name, table_name, user_name, group_names): + self._oprot.writeMessageBegin('get_table_privilege_set', TMessageType.CALL, self._seqid) + args = get_table_privilege_set_args() + args.db_name = db_name + args.table_name = table_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_table_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_privilege_set failed: unknown result"); + + def get_partition_privilege_set(self, db_name, table_name, part_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - part_name + - user_name + - group_names + """ + self.send_get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names) + return self.recv_get_partition_privilege_set() + + def send_get_partition_privilege_set(self, db_name, table_name, part_name, user_name, group_names): + self._oprot.writeMessageBegin('get_partition_privilege_set', TMessageType.CALL, self._seqid) + args = get_partition_privilege_set_args() + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_privilege_set failed: unknown result"); + + def get_column_privilege_set(self, db_name, table_name, part_name, column_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - part_name + - column_name + - user_name + - group_names + """ + self.send_get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names) + return self.recv_get_column_privilege_set() + + def send_get_column_privilege_set(self, db_name, table_name, part_name, column_name, user_name, group_names): + self._oprot.writeMessageBegin('get_column_privilege_set', TMessageType.CALL, self._seqid) + args = get_column_privilege_set_args() + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.column_name = column_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_column_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_column_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_column_privilege_set failed: unknown result"); + + def create_role(self, role_name, owner_name, db_name): + """ + Parameters: + - role_name + - owner_name + - db_name + """ + self.send_create_role(role_name, owner_name, db_name) + return self.recv_create_role() + + def send_create_role(self, role_name, owner_name, db_name): + self._oprot.writeMessageBegin('create_role', TMessageType.CALL, self._seqid) + args = create_role_args() + args.role_name = role_name + args.owner_name = owner_name + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_role(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = create_role_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "create_role failed: unknown result"); + + def drop_role(self, role_name, db_name): + """ + Parameters: + - role_name + - db_name + """ + self.send_drop_role(role_name, db_name) + return self.recv_drop_role() + + def send_drop_role(self, role_name, db_name): + self._oprot.writeMessageBegin('drop_role', TMessageType.CALL, self._seqid) + args = drop_role_args() + args.role_name = role_name + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_role(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_role_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_role failed: unknown result"); + + def add_role_member(self, role_name, user_name, is_role, is_group, db_name): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + - db_name + """ + self.send_add_role_member(role_name, user_name, is_role, is_group, db_name) + return self.recv_add_role_member() + + def send_add_role_member(self, role_name, user_name, is_role, is_group, db_name): + self._oprot.writeMessageBegin('add_role_member', TMessageType.CALL, self._seqid) + args = add_role_member_args() + args.role_name = role_name + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_role_member(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = add_role_member_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_role_member failed: unknown result"); + + def remove_role_member(self, role_name, user_name, is_role, is_group, db_name): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + - db_name + """ + self.send_remove_role_member(role_name, user_name, is_role, is_group, db_name) + return self.recv_remove_role_member() + + def send_remove_role_member(self, role_name, user_name, is_role, is_group, db_name): + self._oprot.writeMessageBegin('remove_role_member', TMessageType.CALL, self._seqid) + args = remove_role_member_args() + args.role_name = role_name + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_remove_role_member(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = remove_role_member_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_role_member failed: unknown result"); + + def list_roles(self, principal_name, is_role, is_group, db_name): + """ + Parameters: + - principal_name + - is_role + - is_group + - db_name + """ + self.send_list_roles(principal_name, is_role, is_group, db_name) + return self.recv_list_roles() + + def send_list_roles(self, principal_name, is_role, is_group, db_name): + self._oprot.writeMessageBegin('list_roles', TMessageType.CALL, self._seqid) + args = list_roles_args() + args.principal_name = principal_name + args.is_role = is_role + args.is_group = is_group + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_roles(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_roles_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_roles failed: unknown result"); + + def list_security_user_grant(self, principla_name, is_role, is_group): + """ + Parameters: + - principla_name + - is_role + - is_group + """ + self.send_list_security_user_grant(principla_name, is_role, is_group) + return self.recv_list_security_user_grant() + + def send_list_security_user_grant(self, principla_name, is_role, is_group): + self._oprot.writeMessageBegin('list_security_user_grant', TMessageType.CALL, self._seqid) + args = list_security_user_grant_args() + args.principla_name = principla_name + args.is_role = is_role + args.is_group = is_group + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_user_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_user_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_user_grant failed: unknown result"); + + def list_security_db_grant(self, principal_name, is_group, is_role, db_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + """ + self.send_list_security_db_grant(principal_name, is_group, is_role, db_name) + return self.recv_list_security_db_grant() + + def send_list_security_db_grant(self, principal_name, is_group, is_role, db_name): + self._oprot.writeMessageBegin('list_security_db_grant', TMessageType.CALL, self._seqid) + args = list_security_db_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_db_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_db_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_db_grant failed: unknown result"); + + def list_security_table_grant(self, principal_name, is_group, is_role, db_name, table_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + """ + self.send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name) + return self.recv_list_security_table_grant() + + def send_list_security_table_grant(self, principal_name, is_group, is_role, db_name, table_name): + self._oprot.writeMessageBegin('list_security_table_grant', TMessageType.CALL, self._seqid) + args = list_security_table_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_table_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_table_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_table_grant failed: unknown result"); + + def list_security_partition_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + """ + self.send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name) + return self.recv_list_security_partition_grant() + + def send_list_security_partition_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name): + self._oprot.writeMessageBegin('list_security_partition_grant', TMessageType.CALL, self._seqid) + args = list_security_partition_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_partition_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_partition_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_partition_grant failed: unknown result"); + + def list_security_column_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name, column_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + - column_name + """ + self.send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name) + return self.recv_list_security_column_grant() + + def send_list_security_column_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name, column_name): + self._oprot.writeMessageBegin('list_security_column_grant', TMessageType.CALL, self._seqid) + args = list_security_column_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.column_name = column_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_column_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_column_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_column_grant failed: unknown result"); + + def grant_privileges(self, user_name, is_role, is_group, privileges, grantor): + """ + Parameters: + - user_name + - is_role + - is_group + - privileges + - grantor + """ + self.send_grant_privileges(user_name, is_role, is_group, privileges, grantor) + return self.recv_grant_privileges() + + def send_grant_privileges(self, user_name, is_role, is_group, privileges, grantor): + self._oprot.writeMessageBegin('grant_privileges', TMessageType.CALL, self._seqid) + args = grant_privileges_args() + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.privileges = privileges + args.grantor = grantor + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_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_privileges_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result"); + + def revoke_privileges(self, user_name, is_role, is_group, privileges): + """ + Parameters: + - user_name + - is_role + - is_group + - privileges + """ + self.send_revoke_privileges(user_name, is_role, is_group, privileges) + return self.recv_revoke_privileges() + + def send_revoke_privileges(self, user_name, is_role, is_group, privileges): + self._oprot.writeMessageBegin('revoke_privileges', TMessageType.CALL, self._seqid) + args = revoke_privileges_args() + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.privileges = privileges + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_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 = revoke_privileges_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result"); + + def revoke_all_privileges(self, user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns): + """ + Parameters: + - user_name + - is_role + - is_group + - remove_user_priv + - dbs + - tables + - parts + - columns + """ + self.send_revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns) + return self.recv_revoke_all_privileges() + + def send_revoke_all_privileges(self, user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns): + self._oprot.writeMessageBegin('revoke_all_privileges', TMessageType.CALL, self._seqid) + args = revoke_all_privileges_args() + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.remove_user_priv = remove_user_priv + args.dbs = dbs + args.tables = tables + args.parts = parts + args.columns = columns + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_revoke_all_privileges(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = revoke_all_privileges_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_all_privileges failed: unknown result"); + class Processor(fb303.FacebookService.Processor, Iface, TProcessor): def __init__(self, handler): @@ -1785,10 +2838,13 @@ self._processMap["drop_partition"] = Processor.process_drop_partition self._processMap["drop_partition_by_name"] = Processor.process_drop_partition_by_name self._processMap["get_partition"] = Processor.process_get_partition + self._processMap["get_partition_with_auth"] = Processor.process_get_partition_with_auth self._processMap["get_partition_by_name"] = Processor.process_get_partition_by_name self._processMap["get_partitions"] = Processor.process_get_partitions + self._processMap["get_partitions_with_auth"] = Processor.process_get_partitions_with_auth self._processMap["get_partition_names"] = Processor.process_get_partition_names self._processMap["get_partitions_ps"] = Processor.process_get_partitions_ps + self._processMap["get_partitions_ps_with_auth"] = Processor.process_get_partitions_ps_with_auth self._processMap["get_partition_names_ps"] = Processor.process_get_partition_names_ps self._processMap["get_partitions_by_filter"] = Processor.process_get_partitions_by_filter self._processMap["alter_partition"] = Processor.process_alter_partition @@ -1801,660 +2857,4262 @@ self._processMap["get_index_by_name"] = Processor.process_get_index_by_name self._processMap["get_indexes"] = Processor.process_get_indexes self._processMap["get_index_names"] = Processor.process_get_index_names + self._processMap["get_user_privilege_set"] = Processor.process_get_user_privilege_set + self._processMap["get_db_privilege_set"] = Processor.process_get_db_privilege_set + self._processMap["get_table_privilege_set"] = Processor.process_get_table_privilege_set + self._processMap["get_partition_privilege_set"] = Processor.process_get_partition_privilege_set + self._processMap["get_column_privilege_set"] = Processor.process_get_column_privilege_set + self._processMap["create_role"] = Processor.process_create_role + self._processMap["drop_role"] = Processor.process_drop_role + self._processMap["add_role_member"] = Processor.process_add_role_member + self._processMap["remove_role_member"] = Processor.process_remove_role_member + self._processMap["list_roles"] = Processor.process_list_roles + self._processMap["list_security_user_grant"] = Processor.process_list_security_user_grant + self._processMap["list_security_db_grant"] = Processor.process_list_security_db_grant + self._processMap["list_security_table_grant"] = Processor.process_list_security_table_grant + self._processMap["list_security_partition_grant"] = Processor.process_list_security_partition_grant + self._processMap["list_security_column_grant"] = Processor.process_list_security_column_grant + self._processMap["grant_privileges"] = Processor.process_grant_privileges + self._processMap["revoke_privileges"] = Processor.process_revoke_privileges + self._processMap["revoke_all_privileges"] = Processor.process_revoke_all_privileges + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_create_database(self, seqid, iprot, oprot): + args = create_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_database_result() + try: + self._handler.create_database(args.database) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_database(self, seqid, iprot, oprot): + args = get_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_database_result() + try: + result.success = self._handler.get_database(args.name) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_database(self, seqid, iprot, oprot): + args = drop_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_database_result() + try: + self._handler.drop_database(args.name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except InvalidOperationException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_databases(self, seqid, iprot, oprot): + args = get_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_databases_result() + try: + result.success = self._handler.get_databases(args.pattern) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_databases(self, seqid, iprot, oprot): + args = get_all_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_databases_result() + try: + result.success = self._handler.get_all_databases() + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type(self, seqid, iprot, oprot): + args = get_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_result() + try: + result.success = self._handler.get_type(args.name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_type(self, seqid, iprot, oprot): + args = create_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_type_result() + try: + result.success = self._handler.create_type(args.type) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_type(self, seqid, iprot, oprot): + args = drop_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_type_result() + try: + result.success = self._handler.drop_type(args.type) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type_all(self, seqid, iprot, oprot): + args = get_type_all_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_all_result() + try: + result.success = self._handler.get_type_all(args.name) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields(self, seqid, iprot, oprot): + args = get_fields_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_result() + try: + result.success = self._handler.get_fields(args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + except UnknownTableException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema(self, seqid, iprot, oprot): + args = get_schema_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_result() + try: + result.success = self._handler.get_schema(args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + except UnknownTableException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table(self, seqid, iprot, oprot): + args = create_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_result() + try: + self._handler.create_table(args.tbl) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + except NoSuchObjectException, o4: + result.o4 = o4 + oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table(self, seqid, iprot, oprot): + args = drop_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_result() + try: + self._handler.drop_table(args.dbname, args.name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables(self, seqid, iprot, oprot): + args = get_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_result() + try: + result.success = self._handler.get_tables(args.db_name, args.pattern) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_tables(self, seqid, iprot, oprot): + args = get_all_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_tables_result() + try: + result.success = self._handler.get_all_tables(args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table(self, seqid, iprot, oprot): + args = get_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_result() + try: + result.success = self._handler.get_table(args.dbname, args.tbl_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table(self, seqid, iprot, oprot): + args = alter_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_result() + try: + self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partition(self, seqid, iprot, oprot): + args = add_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partition_result() + try: + result.success = self._handler.add_partition(args.new_part) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition(self, seqid, iprot, oprot): + args = append_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_result() + try: + result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_by_name(self, seqid, iprot, oprot): + args = append_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_by_name_result() + try: + result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition(self, seqid, iprot, oprot): + args = drop_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_result() + try: + result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_by_name(self, seqid, iprot, oprot): + args = drop_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_by_name_result() + try: + result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition(self, seqid, iprot, oprot): + args = get_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_result() + try: + result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_with_auth(self, seqid, iprot, oprot): + args = get_partition_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_with_auth_result() + try: + result.success = self._handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition_with_auth", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_by_name(self, seqid, iprot, oprot): + args = get_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_by_name_result() + try: + result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions(self, seqid, iprot, oprot): + args = get_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_result() + try: + result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_with_auth(self, seqid, iprot, oprot): + args = get_partitions_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_with_auth_result() + try: + result.success = self._handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions_with_auth", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names(self, seqid, iprot, oprot): + args = get_partition_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_result() + try: + result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps(self, seqid, iprot, oprot): + args = get_partitions_ps_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_ps_result() + try: + result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps_with_auth(self, seqid, iprot, oprot): + args = get_partitions_ps_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_ps_with_auth_result() + try: + result.success = self._handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions_ps_with_auth", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names_ps(self, seqid, iprot, oprot): + args = get_partition_names_ps_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_ps_result() + try: + result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_filter(self, seqid, iprot, oprot): + args = get_partitions_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_filter_result() + try: + result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partition(self, seqid, iprot, oprot): + args = alter_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partition_result() + try: + self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_config_value(self, seqid, iprot, oprot): + args = get_config_value_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_config_value_result() + try: + result.success = self._handler.get_config_value(args.name, args.defaultValue) + except ConfigValSecurityException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_vals(self, seqid, iprot, oprot): + args = partition_name_to_vals_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_vals_result() + try: + result.success = self._handler.partition_name_to_vals(args.part_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_spec(self, seqid, iprot, oprot): + args = partition_name_to_spec_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_spec_result() + try: + result.success = self._handler.partition_name_to_spec(args.part_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_index(self, seqid, iprot, oprot): + args = add_index_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_index_result() + try: + result.success = self._handler.add_index(args.new_index, args.index_table) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_index(self, seqid, iprot, oprot): + args = alter_index_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_index_result() + try: + self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_index_by_name(self, seqid, iprot, oprot): + args = drop_index_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_index_by_name_result() + try: + result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_index_by_name(self, seqid, iprot, oprot): + args = get_index_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_index_by_name_result() + try: + result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_indexes(self, seqid, iprot, oprot): + args = get_indexes_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_indexes_result() + try: + result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_index_names(self, seqid, iprot, oprot): + args = get_index_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_index_names_result() + try: + result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_user_privilege_set(self, seqid, iprot, oprot): + args = get_user_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_user_privilege_set_result() + try: + result.success = self._handler.get_user_privilege_set(args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_user_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_db_privilege_set(self, seqid, iprot, oprot): + args = get_db_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_db_privilege_set_result() + try: + result.success = self._handler.get_db_privilege_set(args.db_name, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_db_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_privilege_set(self, seqid, iprot, oprot): + args = get_table_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_privilege_set_result() + try: + result.success = self._handler.get_table_privilege_set(args.db_name, args.table_name, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_table_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_privilege_set(self, seqid, iprot, oprot): + args = get_partition_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_privilege_set_result() + try: + result.success = self._handler.get_partition_privilege_set(args.db_name, args.table_name, args.part_name, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_partition_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_column_privilege_set(self, seqid, iprot, oprot): + args = get_column_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_column_privilege_set_result() + try: + result.success = self._handler.get_column_privilege_set(args.db_name, args.table_name, args.part_name, args.column_name, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_column_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_role(self, seqid, iprot, oprot): + args = create_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_role_result() + try: + result.success = self._handler.create_role(args.role_name, args.owner_name, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("create_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_role(self, seqid, iprot, oprot): + args = drop_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_role_result() + try: + result.success = self._handler.drop_role(args.role_name, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_role_member(self, seqid, iprot, oprot): + args = add_role_member_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_role_member_result() + try: + result.success = self._handler.add_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("add_role_member", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_remove_role_member(self, seqid, iprot, oprot): + args = remove_role_member_args() + args.read(iprot) + iprot.readMessageEnd() + result = remove_role_member_result() + try: + result.success = self._handler.remove_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("remove_role_member", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_roles(self, seqid, iprot, oprot): + args = list_roles_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_roles_result() + try: + result.success = self._handler.list_roles(args.principal_name, args.is_role, args.is_group, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_roles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_user_grant(self, seqid, iprot, oprot): + args = list_security_user_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_user_grant_result() + try: + result.success = self._handler.list_security_user_grant(args.principla_name, args.is_role, args.is_group) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_user_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_db_grant(self, seqid, iprot, oprot): + args = list_security_db_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_db_grant_result() + try: + result.success = self._handler.list_security_db_grant(args.principal_name, args.is_group, args.is_role, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_db_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_table_grant(self, seqid, iprot, oprot): + args = list_security_table_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_table_grant_result() + try: + result.success = self._handler.list_security_table_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_table_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_partition_grant(self, seqid, iprot, oprot): + args = list_security_partition_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_partition_grant_result() + try: + result.success = self._handler.list_security_partition_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_partition_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_column_grant(self, seqid, iprot, oprot): + args = list_security_column_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_column_grant_result() + try: + result.success = self._handler.list_security_column_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name, args.column_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_column_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_privileges(self, seqid, iprot, oprot): + args = grant_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_privileges_result() + try: + result.success = self._handler.grant_privileges(args.user_name, args.is_role, args.is_group, args.privileges, args.grantor) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("grant_privileges", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_privileges(self, seqid, iprot, oprot): + args = revoke_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_privileges_result() + try: + result.success = self._handler.revoke_privileges(args.user_name, args.is_role, args.is_group, args.privileges) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("revoke_privileges", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_all_privileges(self, seqid, iprot, oprot): + args = revoke_all_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_all_privileges_result() + try: + result.success = self._handler.revoke_all_privileges(args.user_name, args.is_role, args.is_group, args.remove_user_priv, args.dbs, args.tables, args.parts, args.columns) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("revoke_all_privileges", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + +# HELPER FUNCTIONS AND STRUCTURES + +class create_database_args: + """ + Attributes: + - database + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 + ) + + def __init__(self, database=None,): + self.database = database + + 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.database = Database() + self.database.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('create_database_args') + if self.database != None: + oprot.writeFieldBegin('database', TType.STRUCT, 1) + self.database.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 create_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.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('create_database_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.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 get_database_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_database_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + 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 get_database_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + 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 = Database() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.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('get_database_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.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 drop_database_args: + """ + Attributes: + - name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleteData', None, None, ), # 2 + ) + + def __init__(self, name=None, deleteData=None,): + self.name = name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.deleteData = 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('drop_database_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 2) + oprot.writeBool(self.deleteData) + 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 drop_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.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('drop_database_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.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 get_databases_args: + """ + Attributes: + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'pattern', None, None, ), # 1 + ) + + def __init__(self, pattern=None,): + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.pattern = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_databases_args') + if self.pattern != None: + oprot.writeFieldBegin('pattern', TType.STRING, 1) + oprot.writeString(self.pattern) + 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 get_databases_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), 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.LIST: + self.success = [] + (_etype194, _size191) = iprot.readListBegin() + for _i195 in xrange(_size191): + _elem196 = iprot.readString(); + self.success.append(_elem196) + iprot.readListEnd() + 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('get_databases_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter197 in self.success: + oprot.writeString(iter197) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != 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 get_all_databases_args: + + thrift_spec = ( + ) + + 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 + 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('get_all_databases_args') + 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 get_all_databases_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), 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.LIST: + self.success = [] + (_etype201, _size198) = iprot.readListBegin() + for _i202 in xrange(_size198): + _elem203 = iprot.readString(); + self.success.append(_elem203) + iprot.readListEnd() + 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('get_all_databases_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter204 in self.success: + oprot.writeString(iter204) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != 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 get_type_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + 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 get_type_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + 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 = Type() + 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) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.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('get_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.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 create_type_args: + """ + Attributes: + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1 + ) + + def __init__(self, type=None,): + self.type = type + + 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.type = Type() + self.type.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('create_type_args') + if self.type != None: + oprot.writeFieldBegin('type', TType.STRUCT, 1) + self.type.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 create_type_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.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('create_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.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 drop_type_args: + """ + Attributes: + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'type', None, None, ), # 1 + ) + + def __init__(self, type=None,): + self.type = type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.type = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_type_args') + if self.type != None: + oprot.writeFieldBegin('type', TType.STRING, 1) + oprot.writeString(self.type) + 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 drop_type_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + 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.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.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('drop_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.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 get_type_all_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_all_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + 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 get_type_all_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o2=None,): + self.success = success + self.o2 = o2 + + 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.MAP: + self.success = {} + (_ktype206, _vtype207, _size205 ) = iprot.readMapBegin() + for _i209 in xrange(_size205): + _key210 = iprot.readString(); + _val211 = Type() + _val211.read(iprot) + self.success[_key210] = _val211 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.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('get_type_all_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) + for kiter212,viter213 in self.success.items(): + oprot.writeString(kiter212) + viter213.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 1) + self.o2.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 get_fields_args: + """ + Attributes: + - db_name + - table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, table_name=None,): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + 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 get_fields_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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.LIST: + self.success = [] + (_etype217, _size214) = iprot.readListBegin() + for _i218 in xrange(_size214): + _elem219 = FieldSchema() + _elem219.read(iprot) + self.success.append(_elem219) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.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('get_fields_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter220 in self.success: + iter220.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.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 get_schema_args: + """ + Attributes: + - db_name + - table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, table_name=None,): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + 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 get_schema_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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.LIST: + self.success = [] + (_etype224, _size221) = iprot.readListBegin() + for _i225 in xrange(_size221): + _elem226 = FieldSchema() + _elem226.read(iprot) + self.success.append(_elem226) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.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('get_schema_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter227 in self.success: + iter227.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.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 create_table_args: + """ + Attributes: + - tbl + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 + ) + + def __init__(self, tbl=None,): + self.tbl = tbl + + 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.tbl = Table() + self.tbl.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('create_table_args') + if self.tbl != None: + oprot.writeFieldBegin('tbl', TType.STRUCT, 1) + self.tbl.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 create_table_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, o1=None, o2=None, o3=None, o4=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + 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.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException() + self.o4.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('create_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 != None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.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 drop_table_args: + """ + Attributes: + - dbname + - name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.BOOL, 'deleteData', None, None, ), # 3 + ) + + def __init__(self, dbname=None, name=None, deleteData=None,): + self.dbname = dbname + self.name = name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.deleteData = 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('drop_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 3) + oprot.writeBool(self.deleteData) + 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 drop_table_result: + """ + Attributes: + - o1 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o3=None,): + self.o1 = o1 + self.o3 = o3 + + 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.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.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('drop_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 2) + self.o3.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 get_tables_args: + """ + Attributes: + - db_name + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'pattern', None, None, ), # 2 + ) + + def __init__(self, db_name=None, pattern=None,): + self.db_name = db_name + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.pattern != None: + oprot.writeFieldBegin('pattern', TType.STRING, 2) + oprot.writeString(self.pattern) + 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 get_tables_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), 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.LIST: + self.success = [] + (_etype231, _size228) = iprot.readListBegin() + for _i232 in xrange(_size228): + _elem233 = iprot.readString(); + self.success.append(_elem233) + iprot.readListEnd() + 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('get_tables_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter234 in self.success: + oprot.writeString(iter234) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != 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 get_all_tables_args: + """ + Attributes: + - db_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + ) + + def __init__(self, db_name=None,): + self.db_name = db_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_tables_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + 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 get_all_tables_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), 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.LIST: + self.success = [] + (_etype238, _size235) = iprot.readListBegin() + for _i239 in xrange(_size235): + _elem240 = iprot.readString(); + self.success.append(_elem240) + iprot.readListEnd() + 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('get_all_tables_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter241 in self.success: + oprot.writeString(iter241) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != 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 get_table_args: + """ + Attributes: + - dbname + - tbl_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + ) + + def __init__(self, dbname=None, tbl_name=None,): + self.dbname = dbname + self.tbl_name = tbl_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + 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 get_table_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + 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 = Table() + 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) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.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('get_table_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.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 alter_table_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 + ) + + def __init__(self, dbname=None, tbl_name=None, new_tbl=None,): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.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('alter_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl != None: + oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) + self.new_tbl.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 alter_table_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + 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.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.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('alter_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.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 add_partition_args: + """ + Attributes: + - new_part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 + ) + + def __init__(self, new_part=None,): + self.new_part = new_part + + 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.new_part = Partition() + self.new_part.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('add_partition_args') + if self.new_part != None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 1) + self.new_part.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 add_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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 = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.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('add_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.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 append_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype245, _size242) = iprot.readListBegin() + for _i246 in xrange(_size242): + _elem247 = iprot.readString(); + self.part_vals.append(_elem247) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) - iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + 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 - else: - self._processMap[name](self, seqid, iprot, oprot) - return True + oprot.writeStructBegin('append_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter248 in self.part_vals: + oprot.writeString(iter248) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return - def process_create_database(self, seqid, iprot, oprot): - args = create_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_database_result() - try: - self._handler.create_database(args.database) - except AlreadyExistsException, o1: - result.o1 = o1 - except InvalidObjectException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_get_database(self, seqid, iprot, oprot): - args = get_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_database_result() - try: - result.success = self._handler.get_database(args.name) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - def process_drop_database(self, seqid, iprot, oprot): - args = drop_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_database_result() - try: - self._handler.drop_database(args.name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except InvalidOperationException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - def process_get_databases(self, seqid, iprot, oprot): - args = get_databases_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_databases_result() - try: - result.success = self._handler.get_databases(args.pattern) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __ne__(self, other): + return not (self == other) - def process_get_all_databases(self, seqid, iprot, oprot): - args = get_all_databases_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_databases_result() - try: - result.success = self._handler.get_all_databases() - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class append_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ - def process_get_type(self, seqid, iprot, oprot): - args = get_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_type_result() - try: - result.success = self._handler.get_type(args.name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) - def process_create_type(self, seqid, iprot, oprot): - args = create_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_type_result() - try: - result.success = self._handler.create_type(args.type) - except AlreadyExistsException, o1: - result.o1 = o1 - except InvalidObjectException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + 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 = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.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('append_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.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 append_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + """ - def process_drop_type(self, seqid, iprot, oprot): - args = drop_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_type_result() - try: - result.success = self._handler.drop_type(args.type) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + ) - def process_get_type_all(self, seqid, iprot, oprot): - args = get_type_all_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_type_all_result() - try: - result.success = self._handler.get_type_all(args.name) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, db_name=None, tbl_name=None, part_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name - def process_get_fields(self, seqid, iprot, oprot): - args = get_fields_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_fields_result() - try: - result.success = self._handler.get_fields(args.db_name, args.table_name) - except MetaException, o1: - result.o1 = o1 - except UnknownTableException, o2: - result.o2 = o2 - except UnknownDBException, o3: - result.o3 = o3 - oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def process_get_schema(self, seqid, iprot, oprot): - args = get_schema_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_schema_result() - try: - result.success = self._handler.get_schema(args.db_name, args.table_name) - except MetaException, o1: - result.o1 = o1 - except UnknownTableException, o2: - result.o2 = o2 - except UnknownDBException, o3: - result.o3 = o3 - oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + 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('append_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return - def process_create_table(self, seqid, iprot, oprot): - args = create_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_table_result() - try: - self._handler.create_table(args.tbl) - except AlreadyExistsException, o1: - result.o1 = o1 - except InvalidObjectException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - except NoSuchObjectException, o4: - result.o4 = o4 - oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_drop_table(self, seqid, iprot, oprot): - args = drop_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_table_result() - try: - self._handler.drop_table(args.dbname, args.name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - def process_get_tables(self, seqid, iprot, oprot): - args = get_tables_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_tables_result() - try: - result.success = self._handler.get_tables(args.db_name, args.pattern) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - def process_get_all_tables(self, seqid, iprot, oprot): - args = get_all_tables_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_tables_result() - try: - result.success = self._handler.get_all_tables(args.db_name) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __ne__(self, other): + return not (self == other) - def process_get_table(self, seqid, iprot, oprot): - args = get_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_result() - try: - result.success = self._handler.get_table(args.dbname, args.tbl_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class append_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ - def process_alter_table(self, seqid, iprot, oprot): - args = alter_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_table_result() - try: - self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - except InvalidOperationException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) - def process_add_partition(self, seqid, iprot, oprot): - args = add_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_partition_result() - try: - result.success = self._handler.add_partition(args.new_part) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 - def process_append_partition(self, seqid, iprot, oprot): - args = append_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_result() - try: - result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + 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 = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def process_append_partition_by_name(self, seqid, iprot, oprot): - args = append_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_by_name_result() - try: - result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + 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('append_partition_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return - def process_drop_partition(self, seqid, iprot, oprot): - args = drop_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_result() - try: - result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_drop_partition_by_name(self, seqid, iprot, oprot): - args = drop_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_by_name_result() - try: - result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - def process_get_partition(self, seqid, iprot, oprot): - args = get_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_result() - try: - result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - def process_get_partition_by_name(self, seqid, iprot, oprot): - args = get_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_by_name_result() - try: - result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __ne__(self, other): + return not (self == other) - def process_get_partitions(self, seqid, iprot, oprot): - args = get_partitions_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_result() - try: - result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class drop_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - deleteData + """ - def process_get_partition_names(self, seqid, iprot, oprot): - args = get_partition_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_names_result() - try: - result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + ) - def process_get_partitions_ps(self, seqid, iprot, oprot): - args = get_partitions_ps_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_ps_result() - try: - result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.deleteData = deleteData - def process_get_partition_names_ps(self, seqid, iprot, oprot): - args = get_partition_names_ps_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_names_ps_result() - try: - result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype252, _size249) = iprot.readListBegin() + for _i253 in xrange(_size249): + _elem254 = iprot.readString(); + self.part_vals.append(_elem254) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def process_get_partitions_by_filter(self, seqid, iprot, oprot): - args = get_partitions_by_filter_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_by_filter_result() - try: - result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + 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('drop_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter255 in self.part_vals: + oprot.writeString(iter255) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return - def process_alter_partition(self, seqid, iprot, oprot): - args = alter_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_partition_result() - try: - self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - except InvalidOperationException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_get_config_value(self, seqid, iprot, oprot): - args = get_config_value_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_config_value_result() - try: - result.success = self._handler.get_config_value(args.name, args.defaultValue) - except ConfigValSecurityException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - def process_partition_name_to_vals(self, seqid, iprot, oprot): - args = partition_name_to_vals_args() - args.read(iprot) - iprot.readMessageEnd() - result = partition_name_to_vals_result() - try: - result.success = self._handler.partition_name_to_vals(args.part_name) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - def process_partition_name_to_spec(self, seqid, iprot, oprot): - args = partition_name_to_spec_args() - args.read(iprot) - iprot.readMessageEnd() - result = partition_name_to_spec_result() - try: - result.success = self._handler.partition_name_to_spec(args.part_name) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __ne__(self, other): + return not (self == other) - def process_add_index(self, seqid, iprot, oprot): - args = add_index_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_index_result() - try: - result.success = self._handler.add_index(args.new_index, args.index_table) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class drop_partition_result: + """ + Attributes: + - success + - o1 + - o2 + """ - def process_alter_index(self, seqid, iprot, oprot): - args = alter_index_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_index_result() - try: - self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - except InvalidOperationException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) - def process_drop_index_by_name(self, seqid, iprot, oprot): - args = drop_index_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_index_by_name_result() - try: - result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 - def process_get_index_by_name(self, seqid, iprot, oprot): - args = get_index_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_index_by_name_result() - try: - result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + 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.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def process_get_indexes(self, seqid, iprot, oprot): - args = get_indexes_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_indexes_result() - try: - result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + 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('drop_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return - def process_get_index_names(self, seqid, iprot, oprot): - args = get_index_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_index_names_result() - try: - result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) -# HELPER FUNCTIONS AND STRUCTURES + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ -class create_database_args: + def __ne__(self, other): + return not (self == other) + +class drop_partition_by_name_args: """ Attributes: - - database + - db_name + - tbl_name + - part_name + - deleteData """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 ) - def __init__(self, database=None,): - self.database = database + def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.deleteData = deleteData 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: @@ -2466,9 +7124,23 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.database = Database() - self.database.read(iprot) + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); else: iprot.skip(ftype) else: @@ -2480,10 +7152,22 @@ 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('create_database_args') - if self.database != None: - oprot.writeFieldBegin('database', TType.STRUCT, 1) - self.database.write(oprot) + oprot.writeStructBegin('drop_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2502,25 +7186,24 @@ def __ne__(self, other): return not (self == other) -class create_database_result: +class drop_partition_by_name_result: """ Attributes: + - success - o1 - o2 - - o3 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): + self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 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: @@ -2531,24 +7214,23 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2558,7 +7240,11 @@ 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('create_database_result') + oprot.writeStructBegin('drop_partition_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -2567,10 +7253,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -2588,19 +7270,25 @@ def __ne__(self, other): return not (self == other) -class get_database_args: +class get_partition_args: """ Attributes: - - name + - db_name + - tbl_name + - part_vals """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 ) - def __init__(self, name=None,): - self.name = name + def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals 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: @@ -2613,7 +7301,22 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype259, _size256) = iprot.readListBegin() + for _i260 in xrange(_size256): + _elem261 = iprot.readString(); + self.part_vals.append(_elem261) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -2625,10 +7328,21 @@ 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('get_database_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('get_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter262 in self.part_vals: + oprot.writeString(iter262) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2647,7 +7361,7 @@ def __ne__(self, other): return not (self == other) -class get_database_result: +class get_partition_result: """ Attributes: - success @@ -2656,9 +7370,9 @@ """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) def __init__(self, success=None, o1=None, o2=None,): @@ -2677,19 +7391,19 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Database() + self.success = Partition() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = MetaException() + self.o2 = NoSuchObjectException() self.o2.read(iprot) else: iprot.skip(ftype) @@ -2702,7 +7416,7 @@ 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('get_database_result') + oprot.writeStructBegin('get_partition_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -2732,22 +7446,31 @@ def __ne__(self, other): return not (self == other) -class drop_database_args: +class get_partition_with_auth_args: """ Attributes: - - name - - deleteData + - db_name + - tbl_name + - part_vals + - user_name + - group_names """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.BOOL, 'deleteData', None, None, ), # 2 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.STRING, 'user_name', None, None, ), # 4 + (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 ) - def __init__(self, name=None, deleteData=None,): - self.name = name - self.deleteData = deleteData + def __init__(self, db_name=None, tbl_name=None, part_vals=None, user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.user_name = user_name + self.group_names = group_names 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: @@ -2760,12 +7483,37 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.db_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype266, _size263) = iprot.readListBegin() + for _i267 in xrange(_size263): + _elem268 = iprot.readString(); + self.part_vals.append(_elem268) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype272, _size269) = iprot.readListBegin() + for _i273 in xrange(_size269): + _elem274 = iprot.readString(); + self.group_names.append(_elem274) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -2777,14 +7525,32 @@ 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('drop_database_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('get_partition_with_auth_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter275 in self.part_vals: + oprot.writeString(iter275) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 4) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 2) - oprot.writeBool(self.deleteData) + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter276 in self.group_names: + oprot.writeString(iter276) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2803,25 +7569,24 @@ def __ne__(self, other): return not (self == other) -class drop_database_result: +class get_partition_with_auth_result: """ Attributes: + - success - o1 - o2 - - o3 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): + self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 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: @@ -2832,22 +7597,22 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) + self.success = Partition() + self.success.read(iprot) else: iprot.skip(ftype) - elif fid == 2: + elif fid == 1: if ftype == TType.STRUCT: - self.o2 = InvalidOperationException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 3: + elif fid == 2: if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) + self.o2 = NoSuchObjectException() + self.o2.read(iprot) else: iprot.skip(ftype) else: @@ -2859,7 +7624,11 @@ 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('drop_database_result') + oprot.writeStructBegin('get_partition_with_auth_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -2868,10 +7637,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -2889,19 +7654,25 @@ def __ne__(self, other): return not (self == other) -class get_databases_args: +class get_partition_by_name_args: """ Attributes: - - pattern + - db_name + - tbl_name + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'pattern', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 ) - def __init__(self, pattern=None,): - self.pattern = pattern + def __init__(self, db_name=None, tbl_name=None, part_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name 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: @@ -2914,7 +7685,17 @@ break if fid == 1: if ftype == TType.STRING: - self.pattern = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -2926,10 +7707,18 @@ 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('get_databases_args') - if self.pattern != None: - oprot.writeFieldBegin('pattern', TType.STRING, 1) - oprot.writeString(self.pattern) + oprot.writeStructBegin('get_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2948,21 +7737,24 @@ def __ne__(self, other): return not (self == other) -class get_databases_result: +class get_partition_by_name_result: """ Attributes: - success - o1 + - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 + self.o2 = o2 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: @@ -2974,13 +7766,9 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype115, _size112) = iprot.readListBegin() - for _i116 in xrange(_size112): - _elem117 = iprot.readString(); - self.success.append(_elem117) - iprot.readListEnd() + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: @@ -2989,6 +7777,12 @@ self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2998,18 +7792,19 @@ 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('get_databases_result') + oprot.writeStructBegin('get_partition_by_name_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter118 in self.success: - oprot.writeString(iter118) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -3027,11 +7822,26 @@ def __ne__(self, other): return not (self == other) -class get_all_databases_args: +class get_partitions_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + """ thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 ) + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + 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)) @@ -3041,6 +7851,21 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3050,7 +7875,19 @@ 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('get_all_databases_args') + oprot.writeStructBegin('get_partitions_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -3068,21 +7905,24 @@ def __ne__(self, other): return not (self == other) -class get_all_databases_result: +class get_partitions_result: """ Attributes: - success - o1 + - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 + self.o2 = o2 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: @@ -3096,19 +7936,26 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype122, _size119) = iprot.readListBegin() - for _i123 in xrange(_size119): - _elem124 = iprot.readString(); - self.success.append(_elem124) + (_etype280, _size277) = iprot.readListBegin() + for _i281 in xrange(_size277): + _elem282 = Partition() + _elem282.read(iprot) + self.success.append(_elem282) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3118,18 +7965,22 @@ 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('get_all_databases_result') + oprot.writeStructBegin('get_partitions_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter125 in self.success: - oprot.writeString(iter125) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter283 in self.success: + iter283.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -3147,19 +7998,31 @@ def __ne__(self, other): return not (self == other) -class get_type_args: +class get_partitions_with_auth_args: """ Attributes: - - name + - db_name + - tbl_name + - max_parts + - user_name + - group_names """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 + (4, TType.STRING, 'user_name', None, None, ), # 4 + (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 ) - def __init__(self, name=None,): - self.name = name + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4], user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + self.user_name = user_name + self.group_names = group_names 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: @@ -3172,7 +8035,32 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype287, _size284) = iprot.readListBegin() + for _i288 in xrange(_size284): + _elem289 = iprot.readString(); + self.group_names.append(_elem289) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -3184,10 +8072,29 @@ 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('get_type_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('get_partitions_with_auth_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 4) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter290 in self.group_names: + oprot.writeString(iter290) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3206,7 +8113,7 @@ def __ne__(self, other): return not (self == other) -class get_type_result: +class get_partitions_with_auth_result: """ Attributes: - success @@ -3215,9 +8122,9 @@ """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) def __init__(self, success=None, o1=None, o2=None,): @@ -3235,20 +8142,25 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Type() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype294, _size291) = iprot.readListBegin() + for _i295 in xrange(_size291): + _elem296 = Partition() + _elem296.read(iprot) + self.success.append(_elem296) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) @@ -3261,10 +8173,13 @@ 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('get_type_result') + oprot.writeStructBegin('get_partitions_with_auth_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter297 in self.success: + iter297.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -3291,19 +8206,25 @@ def __ne__(self, other): return not (self == other) -class create_type_args: +class get_partition_names_args: """ Attributes: - - type + - db_name + - tbl_name + - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 ) - def __init__(self, type=None,): - self.type = type + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts 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: @@ -3315,9 +8236,18 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.type = Type() - self.type.read(iprot) + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3329,10 +8259,18 @@ 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('create_type_args') - if self.type != None: - oprot.writeFieldBegin('type', TType.STRUCT, 1) - self.type.write(oprot) + oprot.writeStructBegin('get_partition_names_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3351,27 +8289,21 @@ def __ne__(self, other): return not (self == other) -class create_type_result: +class get_partition_names_result: """ Attributes: - success - - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o2=None,): self.success = success - self.o1 = o1 self.o2 = o2 - self.o3 = o3 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: @@ -3383,28 +8315,21 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype301, _size298) = iprot.readListBegin() + for _i302 in xrange(_size298): + _elem303 = iprot.readString(); + self.success.append(_elem303) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3414,23 +8339,18 @@ 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('create_type_result') + oprot.writeStructBegin('get_partition_names_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter304 in self.success: + oprot.writeString(iter304) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) + oprot.writeFieldBegin('o2', TType.STRUCT, 1) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -3448,19 +8368,28 @@ def __ne__(self, other): return not (self == other) -class drop_type_args: +class get_partitions_ps_args: """ Attributes: - - type + - db_name + - tbl_name + - part_vals + - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'type', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 ) - def __init__(self, type=None,): - self.type = type + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts 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: @@ -3473,7 +8402,27 @@ break if fid == 1: if ftype == TType.STRING: - self.type = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype308, _size305) = iprot.readListBegin() + for _i309 in xrange(_size305): + _elem310 = iprot.readString(); + self.part_vals.append(_elem310) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3485,10 +8434,25 @@ 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('drop_type_args') - if self.type != None: - oprot.writeFieldBegin('type', TType.STRING, 1) - oprot.writeString(self.type) + oprot.writeStructBegin('get_partitions_ps_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter311 in self.part_vals: + oprot.writeString(iter311) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3507,24 +8471,21 @@ def __ne__(self, other): return not (self == other) -class drop_type_result: +class get_partitions_ps_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -3536,8 +8497,14 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype315, _size312) = iprot.readListBegin() + for _i316 in xrange(_size312): + _elem317 = Partition() + _elem317.read(iprot) + self.success.append(_elem317) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -3546,12 +8513,6 @@ self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3561,19 +8522,18 @@ 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('drop_type_result') + oprot.writeStructBegin('get_partitions_ps_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter318 in self.success: + iter318.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -3591,19 +8551,34 @@ def __ne__(self, other): return not (self == other) -class get_type_all_args: +class get_partitions_ps_with_auth_args: """ Attributes: - - name + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + (5, TType.STRING, 'user_name', None, None, ), # 5 + (6, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 6 ) - def __init__(self, name=None,): - self.name = name + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4], user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + self.user_name = user_name + self.group_names = group_names 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: @@ -3616,7 +8591,42 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype322, _size319) = iprot.readListBegin() + for _i323 in xrange(_size319): + _elem324 = iprot.readString(); + self.part_vals.append(_elem324) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.group_names = [] + (_etype328, _size325) = iprot.readListBegin() + for _i329 in xrange(_size325): + _elem330 = iprot.readString(); + self.group_names.append(_elem330) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -3628,10 +8638,36 @@ 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('get_type_all_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('get_partitions_ps_with_auth_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter331 in self.part_vals: + oprot.writeString(iter331) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 5) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter332 in self.group_names: + oprot.writeString(iter332) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3650,20 +8686,23 @@ def __ne__(self, other): return not (self == other) -class get_type_all_result: +class get_partitions_ps_with_auth_result: """ Attributes: - success + - o1 - o2 """ thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o2=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success + self.o1 = o1 self.o2 = o2 def read(self, iprot): @@ -3676,19 +8715,24 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype127, _vtype128, _size126 ) = iprot.readMapBegin() - for _i130 in xrange(_size126): - _key131 = iprot.readString(); - _val132 = Type() - _val132.read(iprot) - self.success[_key131] = _val132 - iprot.readMapEnd() + if ftype == TType.LIST: + self.success = [] + (_etype336, _size333) = iprot.readListBegin() + for _i337 in xrange(_size333): + _elem338 = Partition() + _elem338.read(iprot) + self.success.append(_elem338) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: self.o2 = MetaException() self.o2.read(iprot) else: @@ -3702,17 +8746,20 @@ 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('get_type_all_result') + oprot.writeStructBegin('get_partitions_ps_with_auth_result') if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) - for kiter133,viter134 in self.success.items(): - oprot.writeString(kiter133) - viter134.write(oprot) - oprot.writeMapEnd() + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter339 in self.success: + iter339.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) oprot.writeFieldEnd() if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) + oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -3732,22 +8779,28 @@ def __ne__(self, other): return not (self == other) -class get_fields_args: +class get_partition_names_ps_args: """ Attributes: - db_name - - table_name + - tbl_name + - part_vals + - max_parts """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 ) - def __init__(self, db_name=None, table_name=None,): + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): self.db_name = db_name - self.table_name = table_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts 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: @@ -3765,7 +8818,22 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.table_name = iprot.readString(); + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype343, _size340) = iprot.readListBegin() + for _i344 in xrange(_size340): + _elem345 = iprot.readString(); + self.part_vals.append(_elem345) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3777,14 +8845,25 @@ 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('get_fields_args') + oprot.writeStructBegin('get_partition_names_ps_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.table_name != None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter346 in self.part_vals: + oprot.writeString(iter346) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3803,27 +8882,21 @@ def __ne__(self, other): return not (self == other) -class get_fields_result: +class get_partition_names_ps_result: """ Attributes: - success - o1 - - o2 - - o3 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 - self.o3 = o3 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: @@ -3837,11 +8910,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype138, _size135) = iprot.readListBegin() - for _i139 in xrange(_size135): - _elem140 = FieldSchema() - _elem140.read(iprot) - self.success.append(_elem140) + (_etype350, _size347) = iprot.readListBegin() + for _i351 in xrange(_size347): + _elem352 = iprot.readString(); + self.success.append(_elem352) iprot.readListEnd() else: iprot.skip(ftype) @@ -3851,18 +8923,6 @@ self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = UnknownTableException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3872,26 +8932,18 @@ 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('get_fields_result') + oprot.writeStructBegin('get_partition_names_ps_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter141 in self.success: - iter141.write(oprot) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter353 in self.success: + oprot.writeString(iter353) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -3909,22 +8961,28 @@ def __ne__(self, other): return not (self == other) -class get_schema_args: +class get_partitions_by_filter_args: """ Attributes: - db_name - - table_name + - tbl_name + - filter + - max_parts """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'filter', None, None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 ) - def __init__(self, db_name=None, table_name=None,): + def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): self.db_name = db_name - self.table_name = table_name + self.tbl_name = tbl_name + self.filter = filter + self.max_parts = max_parts 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: @@ -3942,7 +9000,17 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.table_name = iprot.readString(); + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3954,14 +9022,22 @@ 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('get_schema_args') + oprot.writeStructBegin('get_partitions_by_filter_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.table_name != None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.filter != None: + oprot.writeFieldBegin('filter', TType.STRING, 3) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3980,27 +9056,24 @@ def __ne__(self, other): return not (self == other) -class get_schema_result: +class get_partitions_by_filter_result: """ Attributes: - success - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 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: @@ -4014,11 +9087,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype145, _size142) = iprot.readListBegin() - for _i146 in xrange(_size142): - _elem147 = FieldSchema() - _elem147.read(iprot) - self.success.append(_elem147) + (_etype357, _size354) = iprot.readListBegin() + for _i358 in xrange(_size354): + _elem359 = Partition() + _elem359.read(iprot) + self.success.append(_elem359) iprot.readListEnd() else: iprot.skip(ftype) @@ -4030,16 +9103,10 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = UnknownTableException() + self.o2 = NoSuchObjectException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -4049,12 +9116,12 @@ 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('get_schema_result') + oprot.writeStructBegin('get_partitions_by_filter_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter148 in self.success: - iter148.write(oprot) + for iter360 in self.success: + iter360.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -4065,10 +9132,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -4086,19 +9149,25 @@ def __ne__(self, other): return not (self == other) -class create_table_args: +class alter_partition_args: """ Attributes: - - tbl + - db_name + - tbl_name + - new_part """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 ) - def __init__(self, tbl=None,): - self.tbl = tbl + def __init__(self, db_name=None, tbl_name=None, new_part=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_part = new_part 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: @@ -4110,9 +9179,19 @@ if ftype == TType.STOP: break if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: if ftype == TType.STRUCT: - self.tbl = Table() - self.tbl.read(iprot) + self.new_part = Partition() + self.new_part.read(iprot) else: iprot.skip(ftype) else: @@ -4124,10 +9203,18 @@ 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('create_table_args') - if self.tbl != None: - oprot.writeFieldBegin('tbl', TType.STRUCT, 1) - self.tbl.write(oprot) + oprot.writeStructBegin('alter_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_part != None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 3) + self.new_part.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4146,28 +9233,22 @@ def __ne__(self, other): return not (self == other) -class create_table_result: +class alter_partition_result: """ Attributes: - o1 - o2 - - o3 - - o4 """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, o1=None, o2=None, o3=None, o4=None,): + def __init__(self, o1=None, o2=None,): self.o1 = o1 self.o2 = o2 - self.o3 = o3 - self.o4 = o4 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: @@ -4180,28 +9261,16 @@ break if fid == 1: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() + self.o1 = InvalidOperationException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = NoSuchObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -4211,7 +9280,7 @@ 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('create_table_result') + oprot.writeStructBegin('alter_partition_result') if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -4220,14 +9289,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 != None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -4245,25 +9306,22 @@ def __ne__(self, other): return not (self == other) -class drop_table_args: +class get_config_value_args: """ Attributes: - - dbname - name - - deleteData + - defaultValue """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'name', None, None, ), # 2 - (3, TType.BOOL, 'deleteData', None, None, ), # 3 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'defaultValue', None, None, ), # 2 ) - def __init__(self, dbname=None, name=None, deleteData=None,): - self.dbname = dbname + def __init__(self, name=None, defaultValue=None,): self.name = name - self.deleteData = deleteData + self.defaultValue = defaultValue 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: @@ -4276,17 +9334,12 @@ break if fid == 1: if ftype == TType.STRING: - self.dbname = iprot.readString(); + self.name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + self.defaultValue = iprot.readString(); else: iprot.skip(ftype) else: @@ -4298,18 +9351,14 @@ 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('drop_table_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() + oprot.writeStructBegin('get_config_value_args') if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeFieldBegin('name', TType.STRING, 1) oprot.writeString(self.name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 3) - oprot.writeBool(self.deleteData) + if self.defaultValue != None: + oprot.writeFieldBegin('defaultValue', TType.STRING, 2) + oprot.writeString(self.defaultValue) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4328,22 +9377,21 @@ def __ne__(self, other): return not (self == other) -class drop_table_result: +class get_config_value_result: """ Attributes: + - success - o1 - - o3 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 ) - def __init__(self, o1=None, o3=None,): + def __init__(self, success=None, o1=None,): + self.success = success self.o1 = o1 - self.o3 = o3 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: @@ -4354,16 +9402,15 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString(); else: iprot.skip(ftype) - elif fid == 2: + elif fid == 1: if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) + self.o1 = ConfigValSecurityException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -4375,15 +9422,15 @@ 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('drop_table_result') + oprot.writeStructBegin('get_config_value_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 2) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -4401,22 +9448,19 @@ def __ne__(self, other): return not (self == other) -class get_tables_args: +class partition_name_to_vals_args: """ Attributes: - - db_name - - pattern + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'pattern', None, None, ), # 2 + (1, TType.STRING, 'part_name', None, None, ), # 1 ) - def __init__(self, db_name=None, pattern=None,): - self.db_name = db_name - self.pattern = pattern + def __init__(self, part_name=None,): + self.part_name = part_name 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: @@ -4429,12 +9473,7 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pattern = iprot.readString(); + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -4446,14 +9485,10 @@ 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('get_tables_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.pattern != None: - oprot.writeFieldBegin('pattern', TType.STRING, 2) - oprot.writeString(self.pattern) + oprot.writeStructBegin('partition_name_to_vals_args') + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 1) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4472,7 +9507,7 @@ def __ne__(self, other): return not (self == other) -class get_tables_result: +class partition_name_to_vals_result: """ Attributes: - success @@ -4500,10 +9535,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype152, _size149) = iprot.readListBegin() - for _i153 in xrange(_size149): - _elem154 = iprot.readString(); - self.success.append(_elem154) + (_etype364, _size361) = iprot.readListBegin() + for _i365 in xrange(_size361): + _elem366 = iprot.readString(); + self.success.append(_elem366) iprot.readListEnd() else: iprot.skip(ftype) @@ -4522,12 +9557,12 @@ 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('get_tables_result') + oprot.writeStructBegin('partition_name_to_vals_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter155 in self.success: - oprot.writeString(iter155) + for iter367 in self.success: + oprot.writeString(iter367) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -4551,19 +9586,19 @@ def __ne__(self, other): return not (self == other) -class get_all_tables_args: +class partition_name_to_spec_args: """ Attributes: - - db_name + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 + (1, TType.STRING, 'part_name', None, None, ), # 1 ) - def __init__(self, db_name=None,): - self.db_name = db_name + def __init__(self, part_name=None,): + self.part_name = part_name 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: @@ -4576,7 +9611,7 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -4588,10 +9623,10 @@ 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('get_all_tables_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('partition_name_to_spec_args') + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 1) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4610,7 +9645,7 @@ def __ne__(self, other): return not (self == other) -class get_all_tables_result: +class partition_name_to_spec_result: """ Attributes: - success @@ -4618,7 +9653,7 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -4636,13 +9671,14 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype159, _size156) = iprot.readListBegin() - for _i160 in xrange(_size156): - _elem161 = iprot.readString(); - self.success.append(_elem161) - iprot.readListEnd() + if ftype == TType.MAP: + self.success = {} + (_ktype369, _vtype370, _size368 ) = iprot.readMapBegin() + for _i372 in xrange(_size368): + _key373 = iprot.readString(); + _val374 = iprot.readString(); + self.success[_key373] = _val374 + iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: @@ -4660,13 +9696,14 @@ 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('get_all_tables_result') + oprot.writeStructBegin('partition_name_to_spec_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter162 in self.success: - oprot.writeString(iter162) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) + for kiter375,viter376 in self.success.items(): + oprot.writeString(kiter375) + oprot.writeString(viter376) + oprot.writeMapEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -4689,22 +9726,22 @@ def __ne__(self, other): return not (self == other) -class get_table_args: +class add_index_args: """ Attributes: - - dbname - - tbl_name + - new_index + - index_table """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (1, TType.STRUCT, 'new_index', (Index, Index.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'index_table', (Table, Table.thrift_spec), None, ), # 2 ) - def __init__(self, dbname=None, tbl_name=None,): - self.dbname = dbname - self.tbl_name = tbl_name + def __init__(self, new_index=None, index_table=None,): + self.new_index = new_index + self.index_table = index_table 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: @@ -4716,13 +9753,15 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString(); + if ftype == TType.STRUCT: + self.new_index = Index() + self.new_index.read(iprot) else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.STRUCT: + self.index_table = Table() + self.index_table.read(iprot) else: iprot.skip(ftype) else: @@ -4734,14 +9773,14 @@ 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('get_table_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) + oprot.writeStructBegin('add_index_args') + if self.new_index != None: + oprot.writeFieldBegin('new_index', TType.STRUCT, 1) + self.new_index.write(oprot) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.index_table != None: + oprot.writeFieldBegin('index_table', TType.STRUCT, 2) + self.index_table.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4760,24 +9799,27 @@ def __ne__(self, other): return not (self == other) -class get_table_result: +class add_index_result: """ Attributes: - success - o1 - o2 + - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None, o2=None, o3=None,): self.success = success self.o1 = o1 self.o2 = o2 + self.o3 = o3 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: @@ -4790,22 +9832,28 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Table() + self.success = Index() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = InvalidObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() + self.o2 = AlreadyExistsException() self.o2.read(iprot) else: iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -4815,7 +9863,7 @@ 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('get_table_result') + oprot.writeStructBegin('add_index_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -4828,6 +9876,10 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -4845,25 +9897,28 @@ def __ne__(self, other): return not (self == other) -class alter_table_args: +class alter_index_args: """ Attributes: - dbname - - tbl_name - - new_tbl + - base_tbl_name + - idx_name + - new_idx """ thrift_spec = ( None, # 0 (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 + (2, TType.STRING, 'base_tbl_name', None, None, ), # 2 + (3, TType.STRING, 'idx_name', None, None, ), # 3 + (4, TType.STRUCT, 'new_idx', (Index, Index.thrift_spec), None, ), # 4 ) - def __init__(self, dbname=None, tbl_name=None, new_tbl=None,): + def __init__(self, dbname=None, base_tbl_name=None, idx_name=None, new_idx=None,): self.dbname = dbname - self.tbl_name = tbl_name - self.new_tbl = new_tbl + self.base_tbl_name = base_tbl_name + self.idx_name = idx_name + self.new_idx = new_idx 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: @@ -4881,13 +9936,18 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.base_tbl_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: + if ftype == TType.STRING: + self.idx_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: if ftype == TType.STRUCT: - self.new_tbl = Table() - self.new_tbl.read(iprot) + self.new_idx = Index() + self.new_idx.read(iprot) else: iprot.skip(ftype) else: @@ -4899,18 +9959,22 @@ 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('alter_table_args') + oprot.writeStructBegin('alter_index_args') if self.dbname != None: oprot.writeFieldBegin('dbname', TType.STRING, 1) oprot.writeString(self.dbname) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.base_tbl_name != None: + oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) + oprot.writeString(self.base_tbl_name) oprot.writeFieldEnd() - if self.new_tbl != None: - oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) - self.new_tbl.write(oprot) + if self.idx_name != None: + oprot.writeFieldBegin('idx_name', TType.STRING, 3) + oprot.writeString(self.idx_name) + oprot.writeFieldEnd() + if self.new_idx != None: + oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) + self.new_idx.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4929,7 +9993,7 @@ def __ne__(self, other): return not (self == other) -class alter_table_result: +class alter_index_result: """ Attributes: - o1 @@ -4976,7 +10040,7 @@ 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('alter_table_result') + oprot.writeStructBegin('alter_index_result') if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -5002,19 +10066,28 @@ def __ne__(self, other): return not (self == other) -class add_partition_args: +class drop_index_by_name_args: """ Attributes: - - new_part + - db_name + - tbl_name + - index_name + - deleteData """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'index_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 ) - def __init__(self, new_part=None,): - self.new_part = new_part + def __init__(self, db_name=None, tbl_name=None, index_name=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.index_name = index_name + self.deleteData = deleteData 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: @@ -5026,9 +10099,23 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.index_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); else: iprot.skip(ftype) else: @@ -5040,10 +10127,22 @@ 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('add_partition_args') - if self.new_part != None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 1) - self.new_part.write(oprot) + oprot.writeStructBegin('drop_index_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.index_name != None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5062,27 +10161,24 @@ def __ne__(self, other): return not (self == other) -class add_partition_result: +class drop_index_by_name_result: """ Attributes: - success - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 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: @@ -5094,29 +10190,22 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -5126,10 +10215,10 @@ 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('add_partition_result') + oprot.writeStructBegin('drop_index_by_name_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -5139,10 +10228,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -5160,25 +10245,25 @@ def __ne__(self, other): return not (self == other) -class append_partition_args: +class get_index_by_name_args: """ Attributes: - db_name - tbl_name - - part_vals + - index_name """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (3, TType.STRING, 'index_name', None, None, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + def __init__(self, db_name=None, tbl_name=None, index_name=None,): self.db_name = db_name self.tbl_name = tbl_name - self.part_vals = part_vals + self.index_name = index_name 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: @@ -5200,13 +10285,8 @@ else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype166, _size163) = iprot.readListBegin() - for _i167 in xrange(_size163): - _elem168 = iprot.readString(); - self.part_vals.append(_elem168) - iprot.readListEnd() + if ftype == TType.STRING: + self.index_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -5218,7 +10298,7 @@ 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('append_partition_args') + oprot.writeStructBegin('get_index_by_name_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -5227,12 +10307,9 @@ oprot.writeFieldBegin('tbl_name', TType.STRING, 2) oprot.writeString(self.tbl_name) oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter169 in self.part_vals: - oprot.writeString(iter169) - oprot.writeListEnd() + if self.index_name != None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5251,27 +10328,24 @@ def __ne__(self, other): return not (self == other) -class append_partition_result: +class get_index_by_name_result: """ Attributes: - success - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 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: @@ -5284,28 +10358,22 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Partition() + self.success = Index() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() + self.o2 = NoSuchObjectException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -5315,7 +10383,7 @@ 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('append_partition_result') + oprot.writeStructBegin('get_index_by_name_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -5328,10 +10396,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -5349,25 +10413,25 @@ def __ne__(self, other): return not (self == other) -class append_partition_by_name_args: +class get_indexes_args: """ Attributes: - db_name - tbl_name - - part_name + - max_indexes """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_name=None,): + def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): self.db_name = db_name self.tbl_name = tbl_name - self.part_name = part_name + self.max_indexes = max_indexes 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: @@ -5389,8 +10453,8 @@ else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString(); + if ftype == TType.I16: + self.max_indexes = iprot.readI16(); else: iprot.skip(ftype) else: @@ -5402,7 +10466,7 @@ 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('append_partition_by_name_args') + oprot.writeStructBegin('get_indexes_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -5411,9 +10475,9 @@ oprot.writeFieldBegin('tbl_name', TType.STRING, 2) oprot.writeString(self.tbl_name) oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) + if self.max_indexes != None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5432,27 +10496,24 @@ def __ne__(self, other): return not (self == other) -class append_partition_by_name_result: +class get_indexes_result: """ Attributes: - success - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.LIST, 'success', (TType.STRUCT,(Index, Index.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 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: @@ -5464,29 +10525,28 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype380, _size377) = iprot.readListBegin() + for _i381 in xrange(_size377): + _elem382 = Index() + _elem382.read(iprot) + self.success.append(_elem382) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -5496,22 +10556,21 @@ 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('append_partition_by_name_result') + oprot.writeStructBegin('get_indexes_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter383 in self.success: + iter383.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5530,28 +10589,25 @@ def __ne__(self, other): return not (self == other) -class drop_partition_args: +class get_index_names_args: """ Attributes: - db_name - tbl_name - - part_vals - - deleteData + - max_indexes """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,): + def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): self.db_name = db_name self.tbl_name = tbl_name - self.part_vals = part_vals - self.deleteData = deleteData + self.max_indexes = max_indexes 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: @@ -5573,18 +10629,8 @@ else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype173, _size170) = iprot.readListBegin() - for _i174 in xrange(_size170): - _elem175 = iprot.readString(); - self.part_vals.append(_elem175) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.I16: + self.max_indexes = iprot.readI16(); else: iprot.skip(ftype) else: @@ -5596,7 +10642,7 @@ 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('drop_partition_args') + oprot.writeStructBegin('get_index_names_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -5605,16 +10651,9 @@ oprot.writeFieldBegin('tbl_name', TType.STRING, 2) oprot.writeString(self.tbl_name) oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter176 in self.part_vals: - oprot.writeString(iter176) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) + if self.max_indexes != None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5633,23 +10672,20 @@ def __ne__(self, other): return not (self == other) -class drop_partition_result: +class get_index_names_result: """ Attributes: - success - - o1 - o2 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o2=None,): self.success = success - self.o1 = o1 self.o2 = o2 def read(self, iprot): @@ -5662,18 +10698,17 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype387, _size384) = iprot.readListBegin() + for _i388 in xrange(_size384): + _elem389 = iprot.readString(); + self.success.append(_elem389) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: self.o2 = MetaException() self.o2.read(iprot) else: @@ -5687,17 +10722,16 @@ 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('drop_partition_result') + oprot.writeStructBegin('get_index_names_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter390 in self.success: + oprot.writeString(iter390) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) + oprot.writeFieldBegin('o2', TType.STRUCT, 1) self.o2.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5717,28 +10751,22 @@ def __ne__(self, other): return not (self == other) -class drop_partition_by_name_args: +class get_user_privilege_set_args: """ Attributes: - - db_name - - tbl_name - - part_name - - deleteData + - user_name + - group_names """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 2 ) - def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - self.deleteData = deleteData + def __init__(self, user_name=None, group_names=None,): + self.user_name = user_name + self.group_names = group_names 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: @@ -5751,22 +10779,17 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.LIST: + self.group_names = [] + (_etype394, _size391) = iprot.readListBegin() + for _i395 in xrange(_size391): + _elem396 = iprot.readString(); + self.group_names.append(_elem396) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -5778,22 +10801,17 @@ 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('drop_partition_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) + oprot.writeStructBegin('get_user_privilege_set_args') + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter397 in self.group_names: + oprot.writeString(iter397) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5812,24 +10830,21 @@ def __ne__(self, other): return not (self == other) -class drop_partition_by_name_result: +class get_user_privilege_set_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -5841,22 +10856,17 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.STRUCT: + self.success = PrincipalPrivilegeSet() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -5866,19 +10876,15 @@ 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('drop_partition_by_name_result') + oprot.writeStructBegin('get_user_privilege_set_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -5896,25 +10902,25 @@ def __ne__(self, other): return not (self == other) -class get_partition_args: +class get_db_privilege_set_args: """ Attributes: - db_name - - tbl_name - - part_vals + - user_name + - group_names """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (2, TType.STRING, 'user_name', None, None, ), # 2 + (3, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + def __init__(self, db_name=None, user_name=None, group_names=None,): self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals + self.user_name = user_name + self.group_names = group_names 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: @@ -5932,16 +10938,16 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: - self.part_vals = [] - (_etype180, _size177) = iprot.readListBegin() - for _i181 in xrange(_size177): - _elem182 = iprot.readString(); - self.part_vals.append(_elem182) + self.group_names = [] + (_etype401, _size398) = iprot.readListBegin() + for _i402 in xrange(_size398): + _elem403 = iprot.readString(); + self.group_names.append(_elem403) iprot.readListEnd() else: iprot.skip(ftype) @@ -5954,20 +10960,20 @@ 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('get_partition_args') + oprot.writeStructBegin('get_db_privilege_set_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 2) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter183 in self.part_vals: - oprot.writeString(iter183) + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter404 in self.group_names: + oprot.writeString(iter404) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5987,24 +10993,21 @@ def __ne__(self, other): return not (self == other) -class get_partition_result: +class get_db_privilege_set_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -6017,7 +11020,7 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Partition() + self.success = PrincipalPrivilegeSet() self.success.read(iprot) else: iprot.skip(ftype) @@ -6027,12 +11030,6 @@ self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -6042,7 +11039,7 @@ 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('get_partition_result') + oprot.writeStructBegin('get_db_privilege_set_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -6051,10 +11048,6 @@ oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -6072,25 +11065,28 @@ def __ne__(self, other): return not (self == other) -class get_partition_by_name_args: +class get_table_privilege_set_args: """ Attributes: - db_name - - tbl_name - - part_name + - table_name + - user_name + - group_names """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'user_name', None, None, ), # 3 + (4, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 4 ) - def __init__(self, db_name=None, tbl_name=None, part_name=None,): + def __init__(self, db_name=None, table_name=None, user_name=None, group_names=None,): self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name + self.table_name = table_name + self.user_name = user_name + self.group_names = group_names 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: @@ -6108,12 +11104,22 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.table_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.group_names = [] + (_etype408, _size405) = iprot.readListBegin() + for _i409 in xrange(_size405): + _elem410 = iprot.readString(); + self.group_names.append(_elem410) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -6125,18 +11131,25 @@ 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('get_partition_by_name_args') + oprot.writeStructBegin('get_table_privilege_set_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 3) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter411 in self.group_names: + oprot.writeString(iter411) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6155,24 +11168,21 @@ def __ne__(self, other): return not (self == other) -class get_partition_by_name_result: +class get_table_privilege_set_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -6185,7 +11195,7 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Partition() + self.success = PrincipalPrivilegeSet() self.success.read(iprot) else: iprot.skip(ftype) @@ -6195,12 +11205,6 @@ self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -6210,7 +11214,7 @@ 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('get_partition_by_name_result') + oprot.writeStructBegin('get_table_privilege_set_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -6219,10 +11223,6 @@ oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -6240,25 +11240,31 @@ def __ne__(self, other): return not (self == other) -class get_partitions_args: +class get_partition_privilege_set_args: """ Attributes: - db_name - - tbl_name - - max_parts + - table_name + - part_name + - user_name + - group_names """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRING, 'user_name', None, None, ), # 4 + (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 ) - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + def __init__(self, db_name=None, table_name=None, part_name=None, user_name=None, group_names=None,): self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts + self.table_name = table_name + self.part_name = part_name + self.user_name = user_name + self.group_names = group_names 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: @@ -6271,17 +11277,32 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); else: iprot.skip(ftype) - elif fid == 2: + elif fid == 4: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype415, _size412) = iprot.readListBegin() + for _i416 in xrange(_size412): + _elem417 = iprot.readString(); + self.group_names.append(_elem417) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -6293,18 +11314,29 @@ 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('get_partitions_args') + oprot.writeStructBegin('get_partition_privilege_set_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 4) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter418 in self.group_names: + oprot.writeString(iter418) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6323,24 +11355,21 @@ def __ne__(self, other): return not (self == other) -class get_partitions_result: +class get_partition_privilege_set_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -6352,28 +11381,17 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype187, _size184) = iprot.readListBegin() - for _i188 in xrange(_size184): - _elem189 = Partition() - _elem189.read(iprot) - self.success.append(_elem189) - iprot.readListEnd() + if ftype == TType.STRUCT: + self.success = PrincipalPrivilegeSet() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -6383,22 +11401,15 @@ 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('get_partitions_result') + oprot.writeStructBegin('get_partition_privilege_set_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter190 in self.success: - iter190.write(oprot) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -6416,25 +11427,34 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_args: +class get_column_privilege_set_args: """ Attributes: - db_name - - tbl_name - - max_parts + - table_name + - part_name + - column_name + - user_name + - group_names """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRING, 'column_name', None, None, ), # 4 + (5, TType.STRING, 'user_name', None, None, ), # 5 + (6, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 6 ) - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + def __init__(self, db_name=None, table_name=None, part_name=None, column_name=None, user_name=None, group_names=None,): self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts + self.table_name = table_name + self.part_name = part_name + self.column_name = column_name + self.user_name = user_name + self.group_names = group_names 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: @@ -6452,12 +11472,32 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.table_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.column_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.group_names = [] + (_etype422, _size419) = iprot.readListBegin() + for _i423 in xrange(_size419): + _elem424 = iprot.readString(); + self.group_names.append(_elem424) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -6469,18 +11509,33 @@ 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('get_partition_names_args') + oprot.writeStructBegin('get_column_privilege_set_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.column_name != None: + oprot.writeFieldBegin('column_name', TType.STRING, 4) + oprot.writeString(self.column_name) + oprot.writeFieldEnd() + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 5) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter425 in self.group_names: + oprot.writeString(iter425) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6499,21 +11554,21 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_result: +class get_column_privilege_set_result: """ Attributes: - success - - o2 + - o1 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success - self.o2 = o2 + 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: @@ -6525,19 +11580,15 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype194, _size191) = iprot.readListBegin() - for _i195 in xrange(_size191): - _elem196 = iprot.readString(); - self.success.append(_elem196) - iprot.readListEnd() + if ftype == TType.STRUCT: + self.success = PrincipalPrivilegeSet() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -6549,17 +11600,14 @@ 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('get_partition_names_result') + oprot.writeStructBegin('get_column_privilege_set_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter197 in self.success: - oprot.writeString(iter197) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6578,28 +11626,25 @@ def __ne__(self, other): return not (self == other) -class get_partitions_ps_args: +class create_role_args: """ Attributes: + - role_name + - owner_name - db_name - - tbl_name - - part_vals - - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'owner_name', None, None, ), # 2 + (3, TType.STRING, 'db_name', None, None, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + def __init__(self, role_name=None, owner_name=None, db_name=None,): + self.role_name = role_name + self.owner_name = owner_name self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts 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: @@ -6612,27 +11657,17 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.owner_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype201, _size198) = iprot.readListBegin() - for _i202 in xrange(_size198): - _elem203 = iprot.readString(); - self.part_vals.append(_elem203) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + if ftype == TType.STRING: + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -6644,25 +11679,18 @@ 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('get_partitions_ps_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + oprot.writeStructBegin('create_role_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter204 in self.part_vals: - oprot.writeString(iter204) - oprot.writeListEnd() + if self.owner_name != None: + oprot.writeFieldBegin('owner_name', TType.STRING, 2) + oprot.writeString(self.owner_name) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 3) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6681,7 +11709,7 @@ def __ne__(self, other): return not (self == other) -class get_partitions_ps_result: +class create_role_result: """ Attributes: - success @@ -6689,7 +11717,7 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -6707,14 +11735,8 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype208, _size205) = iprot.readListBegin() - for _i209 in xrange(_size205): - _elem210 = Partition() - _elem210.read(iprot) - self.success.append(_elem210) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -6732,13 +11754,10 @@ 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('get_partitions_ps_result') + oprot.writeStructBegin('create_role_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter211 in self.success: - iter211.write(oprot) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -6761,28 +11780,22 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_ps_args: +class drop_role_args: """ Attributes: + - role_name - db_name - - tbl_name - - part_vals - - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'db_name', None, None, ), # 2 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + def __init__(self, role_name=None, db_name=None,): + self.role_name = role_name self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts 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: @@ -6795,27 +11808,12 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype215, _size212) = iprot.readListBegin() - for _i216 in xrange(_size212): - _elem217 = iprot.readString(); - self.part_vals.append(_elem217) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -6827,26 +11825,15 @@ 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('get_partition_names_ps_args') + oprot.writeStructBegin('drop_role_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) + oprot.writeFieldEnd() if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeFieldBegin('db_name', TType.STRING, 2) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter218 in self.part_vals: - oprot.writeString(iter218) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -6864,7 +11851,7 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_ps_result: +class drop_role_result: """ Attributes: - success @@ -6872,7 +11859,7 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -6890,13 +11877,8 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype222, _size219) = iprot.readListBegin() - for _i223 in xrange(_size219): - _elem224 = iprot.readString(); - self.success.append(_elem224) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -6914,13 +11896,10 @@ 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('get_partition_names_ps_result') + oprot.writeStructBegin('drop_role_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter225 in self.success: - oprot.writeString(iter225) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -6943,28 +11922,31 @@ def __ne__(self, other): return not (self == other) -class get_partitions_by_filter_args: +class add_role_member_args: """ Attributes: + - role_name + - user_name + - is_role + - is_group - db_name - - tbl_name - - filter - - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'filter', None, None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'user_name', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.BOOL, 'is_group', None, None, ), # 4 + (5, TType.STRING, 'db_name', None, None, ), # 5 ) - def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): + def __init__(self, role_name=None, user_name=None, is_role=None, is_group=None, db_name=None,): + self.role_name = role_name + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group self.db_name = db_name - self.tbl_name = tbl_name - self.filter = filter - self.max_parts = max_parts 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: @@ -6977,22 +11959,27 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.filter = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7004,22 +11991,26 @@ 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('get_partitions_by_filter_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('add_role_member_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 2) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.filter != None: - oprot.writeFieldBegin('filter', TType.STRING, 3) - oprot.writeString(self.filter) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 4) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 5) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7038,24 +12029,21 @@ def __ne__(self, other): return not (self == other) -class get_partitions_by_filter_result: +class add_role_member_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -7067,14 +12055,8 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype229, _size226) = iprot.readListBegin() - for _i230 in xrange(_size226): - _elem231 = Partition() - _elem231.read(iprot) - self.success.append(_elem231) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -7083,12 +12065,6 @@ self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -7098,22 +12074,15 @@ 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('get_partitions_by_filter_result') + oprot.writeStructBegin('add_role_member_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter232 in self.success: - iter232.write(oprot) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -7131,25 +12100,31 @@ def __ne__(self, other): return not (self == other) -class alter_partition_args: +class remove_role_member_args: """ Attributes: + - role_name + - user_name + - is_role + - is_group - db_name - - tbl_name - - new_part """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'user_name', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.BOOL, 'is_group', None, None, ), # 4 + (5, TType.STRING, 'db_name', None, None, ), # 5 ) - def __init__(self, db_name=None, tbl_name=None, new_part=None,): + def __init__(self, role_name=None, user_name=None, is_role=None, is_group=None, db_name=None,): + self.role_name = role_name + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group self.db_name = db_name - self.tbl_name = tbl_name - self.new_part = new_part 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: @@ -7162,18 +12137,27 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7185,18 +12169,26 @@ 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('alter_partition_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('remove_role_member_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 2) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.new_part != None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 3) - self.new_part.write(oprot) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 4) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 5) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7215,22 +12207,21 @@ def __ne__(self, other): return not (self == other) -class alter_partition_result: +class remove_role_member_result: """ Attributes: + - success - o1 - - o2 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): + self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -7241,16 +12232,15 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) - elif fid == 2: + elif fid == 1: if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -7262,15 +12252,15 @@ 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('alter_partition_result') + oprot.writeStructBegin('remove_role_member_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -7288,22 +12278,28 @@ def __ne__(self, other): return not (self == other) -class get_config_value_args: +class list_roles_args: """ Attributes: - - name - - defaultValue + - principal_name + - is_role + - is_group + - db_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'defaultValue', None, None, ), # 2 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 ) - def __init__(self, name=None, defaultValue=None,): - self.name = name - self.defaultValue = defaultValue + def __init__(self, principal_name=None, is_role=None, is_group=None, db_name=None,): + self.principal_name = principal_name + self.is_role = is_role + self.is_group = is_group + self.db_name = db_name 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: @@ -7316,12 +12312,22 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.principal_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: if ftype == TType.STRING: - self.defaultValue = iprot.readString(); + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7333,14 +12339,22 @@ 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('get_config_value_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('list_roles_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) oprot.writeFieldEnd() - if self.defaultValue != None: - oprot.writeFieldBegin('defaultValue', TType.STRING, 2) - oprot.writeString(self.defaultValue) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 4) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7359,7 +12373,7 @@ def __ne__(self, other): return not (self == other) -class get_config_value_result: +class list_roles_result: """ Attributes: - success @@ -7367,8 +12381,8 @@ """ thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT,(Role, Role.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) def __init__(self, success=None, o1=None,): @@ -7385,13 +12399,19 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString(); + if ftype == TType.LIST: + self.success = [] + (_etype429, _size426) = iprot.readListBegin() + for _i430 in xrange(_size426): + _elem431 = Role() + _elem431.read(iprot) + self.success.append(_elem431) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = ConfigValSecurityException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) @@ -7404,10 +12424,13 @@ 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('get_config_value_result') + oprot.writeStructBegin('list_roles_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter432 in self.success: + iter432.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7430,19 +12453,25 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_vals_args: +class list_security_user_grant_args: """ Attributes: - - part_name + - principla_name + - is_role + - is_group """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 + (1, TType.STRING, 'principla_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 ) - def __init__(self, part_name=None,): - self.part_name = part_name + def __init__(self, principla_name=None, is_role=None, is_group=None,): + self.principla_name = principla_name + self.is_role = is_role + self.is_group = is_group 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: @@ -7455,7 +12484,17 @@ break if fid == 1: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.principla_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); else: iprot.skip(ftype) else: @@ -7467,10 +12506,18 @@ 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('partition_name_to_vals_args') - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) + oprot.writeStructBegin('list_security_user_grant_args') + if self.principla_name != None: + oprot.writeFieldBegin('principla_name', TType.STRING, 1) + oprot.writeString(self.principla_name) + oprot.writeFieldEnd() + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7489,7 +12536,7 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_vals_result: +class list_security_user_grant_result: """ Attributes: - success @@ -7497,7 +12544,7 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityUser, SecurityUser.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -7517,10 +12564,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype236, _size233) = iprot.readListBegin() - for _i237 in xrange(_size233): - _elem238 = iprot.readString(); - self.success.append(_elem238) + (_etype436, _size433) = iprot.readListBegin() + for _i437 in xrange(_size433): + _elem438 = SecurityUser() + _elem438.read(iprot) + self.success.append(_elem438) iprot.readListEnd() else: iprot.skip(ftype) @@ -7539,12 +12587,12 @@ 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('partition_name_to_vals_result') + oprot.writeStructBegin('list_security_user_grant_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter239 in self.success: - oprot.writeString(iter239) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter439 in self.success: + iter439.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -7568,19 +12616,28 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_spec_args: +class list_security_db_grant_args: """ Attributes: - - part_name + - principal_name + - is_group + - is_role + - db_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_group', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 ) - def __init__(self, part_name=None,): - self.part_name = part_name + def __init__(self, principal_name=None, is_group=None, is_role=None, db_name=None,): + self.principal_name = principal_name + self.is_group = is_group + self.is_role = is_role + self.db_name = db_name 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: @@ -7593,7 +12650,22 @@ break if fid == 1: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.principal_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7605,10 +12677,22 @@ 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('partition_name_to_spec_args') - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) + oprot.writeStructBegin('list_security_db_grant_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 4) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7627,7 +12711,7 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_spec_result: +class list_security_db_grant_result: """ Attributes: - success @@ -7635,7 +12719,7 @@ """ thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityDB, SecurityDB.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -7652,15 +12736,15 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype241, _vtype242, _size240 ) = iprot.readMapBegin() - for _i244 in xrange(_size240): - _key245 = iprot.readString(); - _val246 = iprot.readString(); - self.success[_key245] = _val246 - iprot.readMapEnd() + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype443, _size440) = iprot.readListBegin() + for _i444 in xrange(_size440): + _elem445 = SecurityDB() + _elem445.read(iprot) + self.success.append(_elem445) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -7678,14 +12762,13 @@ 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('partition_name_to_spec_result') + oprot.writeStructBegin('list_security_db_grant_result') if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter247,viter248 in self.success.items(): - oprot.writeString(kiter247) - oprot.writeString(viter248) - oprot.writeMapEnd() + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter446 in self.success: + iter446.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7708,22 +12791,31 @@ def __ne__(self, other): return not (self == other) -class add_index_args: +class list_security_table_grant_args: """ Attributes: - - new_index - - index_table + - principal_name + - is_group + - is_role + - db_name + - table_name """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'new_index', (Index, Index.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'index_table', (Table, Table.thrift_spec), None, ), # 2 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_group', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 + (5, TType.STRING, 'table_name', None, None, ), # 5 ) - def __init__(self, new_index=None, index_table=None,): - self.new_index = new_index - self.index_table = index_table + def __init__(self, principal_name=None, is_group=None, is_role=None, db_name=None, table_name=None,): + self.principal_name = principal_name + self.is_group = is_group + self.is_role = is_role + self.db_name = db_name + self.table_name = table_name 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: @@ -7735,15 +12827,28 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.new_index = Index() - self.new_index.read(iprot) + if ftype == TType.STRING: + self.principal_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRUCT: - self.index_table = Table() - self.index_table.read(iprot) + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.table_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7755,14 +12860,26 @@ 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('add_index_args') - if self.new_index != None: - oprot.writeFieldBegin('new_index', TType.STRUCT, 1) - self.new_index.write(oprot) + oprot.writeStructBegin('list_security_table_grant_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) oprot.writeFieldEnd() - if self.index_table != None: - oprot.writeFieldBegin('index_table', TType.STRUCT, 2) - self.index_table.write(oprot) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 4) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 5) + oprot.writeString(self.table_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7781,27 +12898,21 @@ def __ne__(self, other): return not (self == other) -class add_index_result: +class list_security_table_grant_result: """ Attributes: - success - o1 - - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityTablePartition, SecurityTablePartition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 - self.o3 = o3 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: @@ -7813,29 +12924,22 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Index() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype450, _size447) = iprot.readListBegin() + for _i451 in xrange(_size447): + _elem452 = SecurityTablePartition() + _elem452.read(iprot) + self.success.append(_elem452) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -7845,23 +12949,18 @@ 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('add_index_result') + oprot.writeStructBegin('list_security_table_grant_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter453 in self.success: + iter453.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -7879,28 +12978,34 @@ def __ne__(self, other): return not (self == other) -class alter_index_args: +class list_security_partition_grant_args: """ Attributes: - - dbname - - base_tbl_name - - idx_name - - new_idx + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'base_tbl_name', None, None, ), # 2 - (3, TType.STRING, 'idx_name', None, None, ), # 3 - (4, TType.STRUCT, 'new_idx', (Index, Index.thrift_spec), None, ), # 4 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_group', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 + (5, TType.STRING, 'table_name', None, None, ), # 5 + (6, TType.STRING, 'part_name', None, None, ), # 6 ) - def __init__(self, dbname=None, base_tbl_name=None, idx_name=None, new_idx=None,): - self.dbname = dbname - self.base_tbl_name = base_tbl_name - self.idx_name = idx_name - self.new_idx = new_idx + def __init__(self, principal_name=None, is_group=None, is_role=None, db_name=None, table_name=None, part_name=None,): + self.principal_name = principal_name + self.is_group = is_group + self.is_role = is_role + self.db_name = db_name + self.table_name = table_name + self.part_name = part_name 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: @@ -7913,23 +13018,32 @@ break if fid == 1: if ftype == TType.STRING: - self.dbname = iprot.readString(); + self.principal_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.base_tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.idx_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 4: - if ftype == TType.STRUCT: - self.new_idx = Index() - self.new_idx.read(iprot) + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7941,22 +13055,30 @@ 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('alter_index_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) + oprot.writeStructBegin('list_security_partition_grant_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) oprot.writeFieldEnd() - if self.base_tbl_name != None: - oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) - oprot.writeString(self.base_tbl_name) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) oprot.writeFieldEnd() - if self.idx_name != None: - oprot.writeFieldBegin('idx_name', TType.STRING, 3) - oprot.writeString(self.idx_name) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.new_idx != None: - oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) - self.new_idx.write(oprot) + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 4) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 5) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 6) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7975,22 +13097,21 @@ def __ne__(self, other): return not (self == other) -class alter_index_result: +class list_security_partition_grant_result: """ Attributes: + - success - o1 - - o2 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityTablePartition, SecurityTablePartition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): + self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -8001,16 +13122,21 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype457, _size454) = iprot.readListBegin() + for _i458 in xrange(_size454): + _elem459 = SecurityTablePartition() + _elem459.read(iprot) + self.success.append(_elem459) + iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 2: + elif fid == 1: if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -8022,15 +13148,18 @@ 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('alter_index_result') + oprot.writeStructBegin('list_security_partition_grant_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter460 in self.success: + iter460.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -8048,28 +13177,37 @@ def __ne__(self, other): return not (self == other) -class drop_index_by_name_args: +class list_security_column_grant_args: """ Attributes: + - principal_name + - is_group + - is_role - db_name - - tbl_name - - index_name - - deleteData + - table_name + - part_name + - column_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'index_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_group', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 + (5, TType.STRING, 'table_name', None, None, ), # 5 + (6, TType.STRING, 'part_name', None, None, ), # 6 + (7, TType.STRING, 'column_name', None, None, ), # 7 ) - def __init__(self, db_name=None, tbl_name=None, index_name=None, deleteData=None,): + def __init__(self, principal_name=None, is_group=None, is_role=None, db_name=None, table_name=None, part_name=None, column_name=None,): + self.principal_name = principal_name + self.is_group = is_group + self.is_role = is_role self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name - self.deleteData = deleteData + self.table_name = table_name + self.part_name = part_name + self.column_name = column_name 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: @@ -8082,22 +13220,37 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.principal_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.index_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.column_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -8109,22 +13262,34 @@ 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('drop_index_by_name_args') + oprot.writeStructBegin('list_security_column_grant_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeFieldBegin('db_name', TType.STRING, 4) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 5) + oprot.writeString(self.table_name) oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 6) + oprot.writeString(self.part_name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) + if self.column_name != None: + oprot.writeFieldBegin('column_name', TType.STRING, 7) + oprot.writeString(self.column_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8143,24 +13308,21 @@ def __ne__(self, other): return not (self == other) -class drop_index_by_name_result: +class list_security_column_grant_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityColumn, SecurityColumn.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -8172,22 +13334,22 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype464, _size461) = iprot.readListBegin() + for _i465 in xrange(_size461): + _elem466 = SecurityColumn() + _elem466.read(iprot) + self.success.append(_elem466) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -8197,19 +13359,18 @@ 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('drop_index_by_name_result') + oprot.writeStructBegin('list_security_column_grant_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter467 in self.success: + iter467.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -8227,25 +13388,31 @@ def __ne__(self, other): return not (self == other) -class get_index_by_name_args: +class grant_privileges_args: """ Attributes: - - db_name - - tbl_name - - index_name + - user_name + - is_role + - is_group + - privileges + - grantor """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'index_name', None, None, ), # 3 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 + (4, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 4 + (5, TType.STRING, 'grantor', None, None, ), # 5 ) - def __init__(self, db_name=None, tbl_name=None, index_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name + def __init__(self, user_name=None, is_role=None, is_group=None, privileges=None, grantor=None,): + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group + self.privileges = privileges + self.grantor = grantor 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: @@ -8258,17 +13425,28 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: if ftype == TType.STRING: - self.index_name = iprot.readString(); + self.grantor = iprot.readString(); else: iprot.skip(ftype) else: @@ -8280,18 +13458,26 @@ 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('get_index_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('grant_privileges_args') + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 4) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 5) + oprot.writeString(self.grantor) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8310,24 +13496,21 @@ def __ne__(self, other): return not (self == other) -class get_index_by_name_result: +class grant_privileges_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -8339,9 +13522,8 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Index() - self.success.read(iprot) + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -8350,12 +13532,6 @@ self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -8365,19 +13541,15 @@ 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('get_index_by_name_result') + oprot.writeStructBegin('grant_privileges_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -8395,25 +13567,28 @@ def __ne__(self, other): return not (self == other) -class get_indexes_args: +class revoke_privileges_args: """ Attributes: - - db_name - - tbl_name - - max_indexes + - user_name + - is_role + - is_group + - privileges """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_indexes', None, -1, ), # 3 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 + (4, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 4 ) - def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_indexes = max_indexes + def __init__(self, user_name=None, is_role=None, is_group=None, privileges=None,): + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group + self.privileges = privileges 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: @@ -8426,17 +13601,23 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.I16: - self.max_indexes = iprot.readI16(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) else: iprot.skip(ftype) else: @@ -8448,18 +13629,22 @@ 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('get_indexes_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('revoke_privileges_args') + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.max_indexes != None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 4) + self.privileges.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8478,24 +13663,21 @@ def __ne__(self, other): return not (self == other) -class get_indexes_result: +class revoke_privileges_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Index, Index.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 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: @@ -8507,28 +13689,16 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype252, _size249) = iprot.readListBegin() - for _i253 in xrange(_size249): - _elem254 = Index() - _elem254.read(iprot) - self.success.append(_elem254) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -8538,22 +13708,15 @@ 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('get_indexes_result') + oprot.writeStructBegin('revoke_privileges_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter255 in self.success: - iter255.write(oprot) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -8571,25 +13734,40 @@ def __ne__(self, other): return not (self == other) -class get_index_names_args: +class revoke_all_privileges_args: """ Attributes: - - db_name - - tbl_name - - max_indexes + - user_name + - is_role + - is_group + - remove_user_priv + - dbs + - tables + - parts + - columns """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_indexes', None, -1, ), # 3 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 + (4, TType.BOOL, 'remove_user_priv', None, None, ), # 4 + (5, TType.LIST, 'dbs', (TType.STRUCT,(Database, Database.thrift_spec)), None, ), # 5 + (6, TType.LIST, 'tables', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 6 + (7, TType.LIST, 'parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 7 + (8, TType.MAP, 'columns', (TType.STRUCT,(Table, Table.thrift_spec),TType.LIST,(TType.STRING,None)), None, ), # 8 ) - def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_indexes = max_indexes + def __init__(self, user_name=None, is_role=None, is_group=None, remove_user_priv=None, dbs=None, tables=None, parts=None, columns=None,): + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group + self.remove_user_priv = remove_user_priv + self.dbs = dbs + self.tables = tables + self.parts = parts + self.columns = columns 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: @@ -8602,17 +13780,72 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.I16: - self.max_indexes = iprot.readI16(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.remove_user_priv = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.dbs = [] + (_etype471, _size468) = iprot.readListBegin() + for _i472 in xrange(_size468): + _elem473 = Database() + _elem473.read(iprot) + self.dbs.append(_elem473) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.tables = [] + (_etype477, _size474) = iprot.readListBegin() + for _i478 in xrange(_size474): + _elem479 = Table() + _elem479.read(iprot) + self.tables.append(_elem479) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.LIST: + self.parts = [] + (_etype483, _size480) = iprot.readListBegin() + for _i484 in xrange(_size480): + _elem485 = Partition() + _elem485.read(iprot) + self.parts.append(_elem485) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.MAP: + self.columns = {} + (_ktype487, _vtype488, _size486 ) = iprot.readMapBegin() + for _i490 in xrange(_size486): + _key491 = Table() + _key491.read(iprot) + _val492 = [] + (_etype496, _size493) = iprot.readListBegin() + for _i497 in xrange(_size493): + _elem498 = iprot.readString(); + _val492.append(_elem498) + iprot.readListEnd() + self.columns[_key491] = _val492 + iprot.readMapEnd() else: iprot.skip(ftype) else: @@ -8624,18 +13857,54 @@ 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('get_index_names_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('revoke_all_privileges_args') + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.max_indexes != None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.remove_user_priv != None: + oprot.writeFieldBegin('remove_user_priv', TType.BOOL, 4) + oprot.writeBool(self.remove_user_priv) + oprot.writeFieldEnd() + if self.dbs != None: + oprot.writeFieldBegin('dbs', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.dbs)) + for iter499 in self.dbs: + iter499.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.tables != None: + oprot.writeFieldBegin('tables', TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.tables)) + for iter500 in self.tables: + iter500.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parts != None: + oprot.writeFieldBegin('parts', TType.LIST, 7) + oprot.writeListBegin(TType.STRUCT, len(self.parts)) + for iter501 in self.parts: + iter501.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columns != None: + oprot.writeFieldBegin('columns', TType.MAP, 8) + oprot.writeMapBegin(TType.STRUCT, TType.LIST, len(self.columns)) + for kiter502,viter503 in self.columns.items(): + kiter502.write(oprot) + oprot.writeListBegin(TType.STRING, len(viter503)) + for iter504 in viter503: + oprot.writeString(iter504) + oprot.writeListEnd() + oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8654,21 +13923,21 @@ def __ne__(self, other): return not (self == other) -class get_index_names_result: +class revoke_all_privileges_result: """ Attributes: - success - - o2 + - o1 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success - self.o2 = o2 + 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: @@ -8680,19 +13949,14 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype259, _size256) = iprot.readListBegin() - for _i260 in xrange(_size256): - _elem261 = iprot.readString(); - self.success.append(_elem261) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -8704,17 +13968,14 @@ 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('get_index_names_result') + oprot.writeStructBegin('revoke_all_privileges_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter262 in self.success: - oprot.writeString(iter262) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() Index: metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (revision 1044070) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (working copy) @@ -275,6 +275,119 @@ def __ne__(self, other): return not (self == other) +class PrincipalPrivilegeSet: + """ + Attributes: + - userPrivileges + - groupPrivileges + - rolePrivileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 1 + (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 2 + (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,): + self.userPrivileges = userPrivileges + self.groupPrivileges = groupPrivileges + self.rolePrivileges = rolePrivileges + + 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.MAP: + self.userPrivileges = {} + (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() + for _i11 in xrange(_size7): + _key12 = iprot.readString(); + _val13 = iprot.readString(); + self.userPrivileges[_key12] = _val13 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.groupPrivileges = {} + (_ktype15, _vtype16, _size14 ) = iprot.readMapBegin() + for _i18 in xrange(_size14): + _key19 = iprot.readString(); + _val20 = iprot.readString(); + self.groupPrivileges[_key19] = _val20 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.rolePrivileges = {} + (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() + for _i25 in xrange(_size21): + _key26 = iprot.readString(); + _val27 = iprot.readString(); + self.rolePrivileges[_key26] = _val27 + iprot.readMapEnd() + 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('PrincipalPrivilegeSet') + if self.userPrivileges != None: + oprot.writeFieldBegin('userPrivileges', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.userPrivileges)) + for kiter28,viter29 in self.userPrivileges.items(): + oprot.writeString(kiter28) + oprot.writeString(viter29) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.groupPrivileges != None: + oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.groupPrivileges)) + for kiter30,viter31 in self.groupPrivileges.items(): + oprot.writeString(kiter30) + oprot.writeString(viter31) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.rolePrivileges != None: + oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.rolePrivileges)) + for kiter32,viter33 in self.rolePrivileges.items(): + oprot.writeString(kiter32) + oprot.writeString(viter33) + oprot.writeMapEnd() + 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 Database: """ Attributes: @@ -282,6 +395,7 @@ - description - locationUri - parameters + - privileges """ thrift_spec = ( @@ -290,13 +404,15 @@ (2, TType.STRING, 'description', None, None, ), # 2 (3, TType.STRING, 'locationUri', None, None, ), # 3 (4, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 4 + (5, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 5 ) - def __init__(self, name=None, description=None, locationUri=None, parameters=None,): + def __init__(self, name=None, description=None, locationUri=None, parameters=None, privileges=None,): self.name = name self.description = description self.locationUri = locationUri self.parameters = parameters + self.privileges = privileges 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: @@ -325,14 +441,20 @@ elif fid == 4: if ftype == TType.MAP: self.parameters = {} - (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() - for _i11 in xrange(_size7): - _key12 = iprot.readString(); - _val13 = iprot.readString(); - self.parameters[_key12] = _val13 + (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() + for _i38 in xrange(_size34): + _key39 = iprot.readString(); + _val40 = iprot.readString(); + self.parameters[_key39] = _val40 iprot.readMapEnd() else: iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -358,9 +480,131 @@ if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 4) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter14,viter15 in self.parameters.items(): - oprot.writeString(kiter14) - oprot.writeString(viter15) + for kiter41,viter42 in self.parameters.items(): + oprot.writeString(kiter41) + oprot.writeString(viter42) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 5) + self.privileges.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 Role: + """ + Attributes: + - roleName + - database + - createTime + - ownerName + - parameters + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + (2, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 2 + (3, TType.I32, 'createTime', None, None, ), # 3 + (4, TType.STRING, 'ownerName', None, None, ), # 4 + (5, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 5 + ) + + def __init__(self, roleName=None, database=None, createTime=None, ownerName=None, parameters=None,): + self.roleName = roleName + self.database = database + self.createTime = createTime + self.ownerName = ownerName + self.parameters = parameters + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.roleName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.database = Database() + self.database.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.ownerName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.parameters = {} + (_ktype44, _vtype45, _size43 ) = iprot.readMapBegin() + for _i47 in xrange(_size43): + _key48 = iprot.readString(); + _val49 = iprot.readString(); + self.parameters[_key48] = _val49 + iprot.readMapEnd() + 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('Role') + if self.roleName != None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.database != None: + oprot.writeFieldBegin('database', TType.STRUCT, 2) + self.database.write(oprot) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 3) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.ownerName != None: + oprot.writeFieldBegin('ownerName', TType.STRING, 4) + oprot.writeString(self.ownerName) + oprot.writeFieldEnd() + if self.parameters != None: + oprot.writeFieldBegin('parameters', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) + for kiter50,viter51 in self.parameters.items(): + oprot.writeString(kiter50) + oprot.writeString(viter51) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -422,11 +666,11 @@ elif fid == 3: if ftype == TType.MAP: self.parameters = {} - (_ktype17, _vtype18, _size16 ) = iprot.readMapBegin() - for _i20 in xrange(_size16): - _key21 = iprot.readString(); - _val22 = iprot.readString(); - self.parameters[_key21] = _val22 + (_ktype53, _vtype54, _size52 ) = iprot.readMapBegin() + for _i56 in xrange(_size52): + _key57 = iprot.readString(); + _val58 = iprot.readString(); + self.parameters[_key57] = _val58 iprot.readMapEnd() else: iprot.skip(ftype) @@ -451,9 +695,9 @@ if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter23,viter24 in self.parameters.items(): - oprot.writeString(kiter23) - oprot.writeString(viter24) + for kiter59,viter60 in self.parameters.items(): + oprot.writeString(kiter59) + oprot.writeString(viter60) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -597,11 +841,11 @@ if fid == 1: if ftype == TType.LIST: self.cols = [] - (_etype28, _size25) = iprot.readListBegin() - for _i29 in xrange(_size25): - _elem30 = FieldSchema() - _elem30.read(iprot) - self.cols.append(_elem30) + (_etype64, _size61) = iprot.readListBegin() + for _i65 in xrange(_size61): + _elem66 = FieldSchema() + _elem66.read(iprot) + self.cols.append(_elem66) iprot.readListEnd() else: iprot.skip(ftype) @@ -639,32 +883,32 @@ elif fid == 8: if ftype == TType.LIST: self.bucketCols = [] - (_etype34, _size31) = iprot.readListBegin() - for _i35 in xrange(_size31): - _elem36 = iprot.readString(); - self.bucketCols.append(_elem36) + (_etype70, _size67) = iprot.readListBegin() + for _i71 in xrange(_size67): + _elem72 = iprot.readString(); + self.bucketCols.append(_elem72) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.sortCols = [] - (_etype40, _size37) = iprot.readListBegin() - for _i41 in xrange(_size37): - _elem42 = Order() - _elem42.read(iprot) - self.sortCols.append(_elem42) + (_etype76, _size73) = iprot.readListBegin() + for _i77 in xrange(_size73): + _elem78 = Order() + _elem78.read(iprot) + self.sortCols.append(_elem78) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.MAP: self.parameters = {} - (_ktype44, _vtype45, _size43 ) = iprot.readMapBegin() - for _i47 in xrange(_size43): - _key48 = iprot.readString(); - _val49 = iprot.readString(); - self.parameters[_key48] = _val49 + (_ktype80, _vtype81, _size79 ) = iprot.readMapBegin() + for _i83 in xrange(_size79): + _key84 = iprot.readString(); + _val85 = iprot.readString(); + self.parameters[_key84] = _val85 iprot.readMapEnd() else: iprot.skip(ftype) @@ -681,8 +925,8 @@ if self.cols != None: oprot.writeFieldBegin('cols', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.cols)) - for iter50 in self.cols: - iter50.write(oprot) + for iter86 in self.cols: + iter86.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.location != None: @@ -712,23 +956,23 @@ if self.bucketCols != None: oprot.writeFieldBegin('bucketCols', TType.LIST, 8) oprot.writeListBegin(TType.STRING, len(self.bucketCols)) - for iter51 in self.bucketCols: - oprot.writeString(iter51) + for iter87 in self.bucketCols: + oprot.writeString(iter87) oprot.writeListEnd() oprot.writeFieldEnd() if self.sortCols != None: oprot.writeFieldBegin('sortCols', TType.LIST, 9) oprot.writeListBegin(TType.STRUCT, len(self.sortCols)) - for iter52 in self.sortCols: - iter52.write(oprot) + for iter88 in self.sortCols: + iter88.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 10) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter53,viter54 in self.parameters.items(): - oprot.writeString(kiter53) - oprot.writeString(viter54) + for kiter89,viter90 in self.parameters.items(): + oprot.writeString(kiter89) + oprot.writeString(viter90) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -763,6 +1007,7 @@ - viewOriginalText - viewExpandedText - tableType + - privileges """ thrift_spec = ( @@ -779,9 +1024,10 @@ (10, TType.STRING, 'viewOriginalText', None, None, ), # 10 (11, TType.STRING, 'viewExpandedText', None, None, ), # 11 (12, TType.STRING, 'tableType', None, None, ), # 12 + (13, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 13 ) - def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None,): + def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None,): self.tableName = tableName self.dbName = dbName self.owner = owner @@ -794,6 +1040,7 @@ self.viewOriginalText = viewOriginalText self.viewExpandedText = viewExpandedText self.tableType = tableType + self.privileges = privileges 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: @@ -843,22 +1090,22 @@ elif fid == 8: if ftype == TType.LIST: self.partitionKeys = [] - (_etype58, _size55) = iprot.readListBegin() - for _i59 in xrange(_size55): - _elem60 = FieldSchema() - _elem60.read(iprot) - self.partitionKeys.append(_elem60) + (_etype94, _size91) = iprot.readListBegin() + for _i95 in xrange(_size91): + _elem96 = FieldSchema() + _elem96.read(iprot) + self.partitionKeys.append(_elem96) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.MAP: self.parameters = {} - (_ktype62, _vtype63, _size61 ) = iprot.readMapBegin() - for _i65 in xrange(_size61): - _key66 = iprot.readString(); - _val67 = iprot.readString(); - self.parameters[_key66] = _val67 + (_ktype98, _vtype99, _size97 ) = iprot.readMapBegin() + for _i101 in xrange(_size97): + _key102 = iprot.readString(); + _val103 = iprot.readString(); + self.parameters[_key102] = _val103 iprot.readMapEnd() else: iprot.skip(ftype) @@ -877,6 +1124,12 @@ self.tableType = iprot.readString(); else: iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -918,16 +1171,16 @@ if self.partitionKeys != None: oprot.writeFieldBegin('partitionKeys', TType.LIST, 8) oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) - for iter68 in self.partitionKeys: - iter68.write(oprot) + for iter104 in self.partitionKeys: + iter104.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 9) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter69,viter70 in self.parameters.items(): - oprot.writeString(kiter69) - oprot.writeString(viter70) + for kiter105,viter106 in self.parameters.items(): + oprot.writeString(kiter105) + oprot.writeString(viter106) oprot.writeMapEnd() oprot.writeFieldEnd() if self.viewOriginalText != None: @@ -942,6 +1195,10 @@ oprot.writeFieldBegin('tableType', TType.STRING, 12) oprot.writeString(self.tableType) oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 13) + self.privileges.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -969,6 +1226,7 @@ - lastAccessTime - sd - parameters + - privileges """ thrift_spec = ( @@ -980,9 +1238,10 @@ (5, TType.I32, 'lastAccessTime', None, None, ), # 5 (6, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 6 (7, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 7 + (8, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 8 ) - def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None,): + def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None, privileges=None,): self.values = values self.dbName = dbName self.tableName = tableName @@ -990,6 +1249,7 @@ self.lastAccessTime = lastAccessTime self.sd = sd self.parameters = parameters + self.privileges = privileges 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: @@ -1003,10 +1263,10 @@ if fid == 1: if ftype == TType.LIST: self.values = [] - (_etype74, _size71) = iprot.readListBegin() - for _i75 in xrange(_size71): - _elem76 = iprot.readString(); - self.values.append(_elem76) + (_etype110, _size107) = iprot.readListBegin() + for _i111 in xrange(_size107): + _elem112 = iprot.readString(); + self.values.append(_elem112) iprot.readListEnd() else: iprot.skip(ftype) @@ -1039,14 +1299,20 @@ elif fid == 7: if ftype == TType.MAP: self.parameters = {} - (_ktype78, _vtype79, _size77 ) = iprot.readMapBegin() - for _i81 in xrange(_size77): - _key82 = iprot.readString(); - _val83 = iprot.readString(); - self.parameters[_key82] = _val83 + (_ktype114, _vtype115, _size113 ) = iprot.readMapBegin() + for _i117 in xrange(_size113): + _key118 = iprot.readString(); + _val119 = iprot.readString(); + self.parameters[_key118] = _val119 iprot.readMapEnd() else: iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -1060,8 +1326,8 @@ if self.values != None: oprot.writeFieldBegin('values', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.values)) - for iter84 in self.values: - oprot.writeString(iter84) + for iter120 in self.values: + oprot.writeString(iter120) oprot.writeListEnd() oprot.writeFieldEnd() if self.dbName != None: @@ -1087,11 +1353,15 @@ if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 7) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter85,viter86 in self.parameters.items(): - oprot.writeString(kiter85) - oprot.writeString(viter86) + for kiter121,viter122 in self.parameters.items(): + oprot.writeString(kiter121) + oprot.writeString(viter122) oprot.writeMapEnd() oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 8) + self.privileges.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -1203,11 +1473,11 @@ elif fid == 9: if ftype == TType.MAP: self.parameters = {} - (_ktype88, _vtype89, _size87 ) = iprot.readMapBegin() - for _i91 in xrange(_size87): - _key92 = iprot.readString(); - _val93 = iprot.readString(); - self.parameters[_key92] = _val93 + (_ktype124, _vtype125, _size123 ) = iprot.readMapBegin() + for _i127 in xrange(_size123): + _key128 = iprot.readString(); + _val129 = iprot.readString(); + self.parameters[_key128] = _val129 iprot.readMapEnd() else: iprot.skip(ftype) @@ -1261,9 +1531,9 @@ if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 9) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter94,viter95 in self.parameters.items(): - oprot.writeString(kiter94) - oprot.writeString(viter95) + for kiter130,viter131 in self.parameters.items(): + oprot.writeString(kiter130) + oprot.writeString(viter131) oprot.writeMapEnd() oprot.writeFieldEnd() if self.deferredRebuild != None: @@ -1316,22 +1586,22 @@ if fid == 1: if ftype == TType.LIST: self.fieldSchemas = [] - (_etype99, _size96) = iprot.readListBegin() - for _i100 in xrange(_size96): - _elem101 = FieldSchema() - _elem101.read(iprot) - self.fieldSchemas.append(_elem101) + (_etype135, _size132) = iprot.readListBegin() + for _i136 in xrange(_size132): + _elem137 = FieldSchema() + _elem137.read(iprot) + self.fieldSchemas.append(_elem137) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.MAP: self.properties = {} - (_ktype103, _vtype104, _size102 ) = iprot.readMapBegin() - for _i106 in xrange(_size102): - _key107 = iprot.readString(); - _val108 = iprot.readString(); - self.properties[_key107] = _val108 + (_ktype139, _vtype140, _size138 ) = iprot.readMapBegin() + for _i142 in xrange(_size138): + _key143 = iprot.readString(); + _val144 = iprot.readString(); + self.properties[_key143] = _val144 iprot.readMapEnd() else: iprot.skip(ftype) @@ -1348,16 +1618,16 @@ if self.fieldSchemas != None: oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas)) - for iter109 in self.fieldSchemas: - iter109.write(oprot) + for iter145 in self.fieldSchemas: + iter145.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.properties != None: oprot.writeFieldBegin('properties', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) - for kiter110,viter111 in self.properties.items(): - oprot.writeString(kiter110) - oprot.writeString(viter111) + for kiter146,viter147 in self.properties.items(): + oprot.writeString(kiter146) + oprot.writeString(viter147) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1377,19 +1647,28 @@ def __ne__(self, other): return not (self == other) -class MetaException(Exception): +class ColumnPrivilegeBag: """ Attributes: - - message + - dbName + - tableName + - partitionName + - columnPrivileges """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tableName', None, None, ), # 2 + (3, TType.STRING, 'partitionName', None, None, ), # 3 + (4, TType.MAP, 'columnPrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 4 ) - def __init__(self, message=None,): - self.message = message + def __init__(self, dbName=None, tableName=None, partitionName=None, columnPrivileges=None,): + self.dbName = dbName + self.tableName = tableName + self.partitionName = partitionName + self.columnPrivileges = columnPrivileges 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: @@ -1402,7 +1681,28 @@ break if fid == 1: if ftype == TType.STRING: - self.message = iprot.readString(); + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partitionName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.columnPrivileges = {} + (_ktype149, _vtype150, _size148 ) = iprot.readMapBegin() + for _i152 in xrange(_size148): + _key153 = iprot.readString(); + _val154 = iprot.readString(); + self.columnPrivileges[_key153] = _val154 + iprot.readMapEnd() else: iprot.skip(ftype) else: @@ -1414,10 +1714,26 @@ 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('MetaException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) + oprot.writeStructBegin('ColumnPrivilegeBag') + if self.dbName != None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName != None: + oprot.writeFieldBegin('tableName', TType.STRING, 2) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.partitionName != None: + oprot.writeFieldBegin('partitionName', TType.STRING, 3) + oprot.writeString(self.partitionName) + oprot.writeFieldEnd() + if self.columnPrivileges != None: + oprot.writeFieldBegin('columnPrivileges', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.columnPrivileges)) + for kiter155,viter156 in self.columnPrivileges.items(): + oprot.writeString(kiter155) + oprot.writeString(viter156) + oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1425,9 +1741,6 @@ return - def __str__(self): - return repr(self) - def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1439,19 +1752,31 @@ def __ne__(self, other): return not (self == other) -class UnknownTableException(Exception): +class PrivilegeBag: """ Attributes: - - message + - userPrivileges + - dbPrivileges + - tablePrivileges + - partitionPrivileges + - columnPrivileges """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 + (1, TType.STRING, 'userPrivileges', None, None, ), # 1 + (2, TType.MAP, 'dbPrivileges', (TType.STRUCT,(Database, Database.thrift_spec),TType.STRING,None), None, ), # 2 + (3, TType.MAP, 'tablePrivileges', (TType.STRUCT,(Table, Table.thrift_spec),TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'partitionPrivileges', (TType.STRUCT,(Partition, Partition.thrift_spec),TType.STRING,None), None, ), # 4 + (5, TType.LIST, 'columnPrivileges', (TType.STRUCT,(ColumnPrivilegeBag, ColumnPrivilegeBag.thrift_spec)), None, ), # 5 ) - def __init__(self, message=None,): - self.message = message + def __init__(self, userPrivileges=None, dbPrivileges=None, tablePrivileges=None, partitionPrivileges=None, columnPrivileges=None,): + self.userPrivileges = userPrivileges + self.dbPrivileges = dbPrivileges + self.tablePrivileges = tablePrivileges + self.partitionPrivileges = partitionPrivileges + self.columnPrivileges = columnPrivileges 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: @@ -1464,7 +1789,54 @@ break if fid == 1: if ftype == TType.STRING: - self.message = iprot.readString(); + self.userPrivileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.dbPrivileges = {} + (_ktype158, _vtype159, _size157 ) = iprot.readMapBegin() + for _i161 in xrange(_size157): + _key162 = Database() + _key162.read(iprot) + _val163 = iprot.readString(); + self.dbPrivileges[_key162] = _val163 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.tablePrivileges = {} + (_ktype165, _vtype166, _size164 ) = iprot.readMapBegin() + for _i168 in xrange(_size164): + _key169 = Table() + _key169.read(iprot) + _val170 = iprot.readString(); + self.tablePrivileges[_key169] = _val170 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.partitionPrivileges = {} + (_ktype172, _vtype173, _size171 ) = iprot.readMapBegin() + for _i175 in xrange(_size171): + _key176 = Partition() + _key176.read(iprot) + _val177 = iprot.readString(); + self.partitionPrivileges[_key176] = _val177 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.columnPrivileges = [] + (_etype181, _size178) = iprot.readListBegin() + for _i182 in xrange(_size178): + _elem183 = ColumnPrivilegeBag() + _elem183.read(iprot) + self.columnPrivileges.append(_elem183) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -1476,10 +1848,160 @@ 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('UnknownTableException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) + oprot.writeStructBegin('PrivilegeBag') + if self.userPrivileges != None: + oprot.writeFieldBegin('userPrivileges', TType.STRING, 1) + oprot.writeString(self.userPrivileges) + oprot.writeFieldEnd() + if self.dbPrivileges != None: + oprot.writeFieldBegin('dbPrivileges', TType.MAP, 2) + oprot.writeMapBegin(TType.STRUCT, TType.STRING, len(self.dbPrivileges)) + for kiter184,viter185 in self.dbPrivileges.items(): + kiter184.write(oprot) + oprot.writeString(viter185) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.tablePrivileges != None: + oprot.writeFieldBegin('tablePrivileges', TType.MAP, 3) + oprot.writeMapBegin(TType.STRUCT, TType.STRING, len(self.tablePrivileges)) + for kiter186,viter187 in self.tablePrivileges.items(): + kiter186.write(oprot) + oprot.writeString(viter187) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.partitionPrivileges != None: + oprot.writeFieldBegin('partitionPrivileges', TType.MAP, 4) + oprot.writeMapBegin(TType.STRUCT, TType.STRING, len(self.partitionPrivileges)) + for kiter188,viter189 in self.partitionPrivileges.items(): + kiter188.write(oprot) + oprot.writeString(viter189) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.columnPrivileges != None: + oprot.writeFieldBegin('columnPrivileges', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.columnPrivileges)) + for iter190 in self.columnPrivileges: + iter190.write(oprot) + oprot.writeListEnd() + 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 SecurityUser: + """ + Attributes: + - principalName + - isRole + - isGroup + - privileges + - createTime + - grantor + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principalName', None, None, ), # 1 + (2, TType.BOOL, 'isRole', None, None, ), # 2 + (3, TType.BOOL, 'isGroup', None, None, ), # 3 + (4, TType.STRING, 'privileges', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'grantor', None, None, ), # 6 + ) + + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None,): + self.principalName = principalName + self.isRole = isRole + self.isGroup = isGroup + self.privileges = privileges + self.createTime = createTime + self.grantor = grantor + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isRole = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isGroup = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.privileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SecurityUser') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1487,6 +2009,561 @@ 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 SecurityDB: + """ + Attributes: + - principalName + - isRole + - isGroup + - privileges + - createTime + - grantor + - db + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principalName', None, None, ), # 1 + (2, TType.BOOL, 'isRole', None, None, ), # 2 + (3, TType.BOOL, 'isGroup', None, None, ), # 3 + (4, TType.STRING, 'privileges', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'grantor', None, None, ), # 6 + (7, TType.STRUCT, 'db', (Database, Database.thrift_spec), None, ), # 7 + ) + + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None, db=None,): + self.principalName = principalName + self.isRole = isRole + self.isGroup = isGroup + self.privileges = privileges + self.createTime = createTime + self.grantor = grantor + self.db = db + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isRole = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isGroup = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.privileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.db = Database() + self.db.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('SecurityDB') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.db != None: + oprot.writeFieldBegin('db', TType.STRUCT, 7) + self.db.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 SecurityTablePartition: + """ + Attributes: + - principalName + - isRole + - isGroup + - privileges + - createTime + - grantor + - table + - part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principalName', None, None, ), # 1 + (2, TType.BOOL, 'isRole', None, None, ), # 2 + (3, TType.BOOL, 'isGroup', None, None, ), # 3 + (4, TType.STRING, 'privileges', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'grantor', None, None, ), # 6 + (7, TType.STRUCT, 'table', (Table, Table.thrift_spec), None, ), # 7 + (8, TType.STRUCT, 'part', (Partition, Partition.thrift_spec), None, ), # 8 + ) + + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None, table=None, part=None,): + self.principalName = principalName + self.isRole = isRole + self.isGroup = isGroup + self.privileges = privileges + self.createTime = createTime + self.grantor = grantor + self.table = table + self.part = part + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isRole = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isGroup = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.privileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.part = Partition() + self.part.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('SecurityTablePartition') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.table != None: + oprot.writeFieldBegin('table', TType.STRUCT, 7) + self.table.write(oprot) + oprot.writeFieldEnd() + if self.part != None: + oprot.writeFieldBegin('part', TType.STRUCT, 8) + self.part.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 SecurityColumn: + """ + Attributes: + - principalName + - isRole + - isGroup + - privileges + - createTime + - grantor + - table + - partition + - column + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principalName', None, None, ), # 1 + (2, TType.BOOL, 'isRole', None, None, ), # 2 + (3, TType.BOOL, 'isGroup', None, None, ), # 3 + (4, TType.STRING, 'privileges', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'grantor', None, None, ), # 6 + (7, TType.STRUCT, 'table', (Table, Table.thrift_spec), None, ), # 7 + (8, TType.STRUCT, 'partition', (Partition, Partition.thrift_spec), None, ), # 8 + (9, TType.STRING, 'column', None, None, ), # 9 + ) + + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None, table=None, partition=None, column=None,): + self.principalName = principalName + self.isRole = isRole + self.isGroup = isGroup + self.privileges = privileges + self.createTime = createTime + self.grantor = grantor + self.table = table + self.partition = partition + self.column = column + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isRole = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isGroup = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.privileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.partition = Partition() + self.partition.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SecurityColumn') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.table != None: + oprot.writeFieldBegin('table', TType.STRUCT, 7) + self.table.write(oprot) + oprot.writeFieldEnd() + if self.partition != None: + oprot.writeFieldBegin('partition', TType.STRUCT, 8) + self.partition.write(oprot) + oprot.writeFieldEnd() + if self.column != None: + oprot.writeFieldBegin('column', TType.STRING, 9) + oprot.writeString(self.column) + 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 MetaException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('MetaException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + 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 UnknownTableException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UnknownTableException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + def __str__(self): return repr(self) Index: metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (revision 1044070) +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (working copy) @@ -67,17 +67,63 @@ ::Thrift::Struct.generate_accessors self end +class PrincipalPrivilegeSet + include ::Thrift::Struct, ::Thrift::Struct_Union + USERPRIVILEGES = 1 + GROUPPRIVILEGES = 2 + ROLEPRIVILEGES = 3 + + FIELDS = { + USERPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'userPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + GROUPPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'groupPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + ROLEPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'rolePrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + class Database include ::Thrift::Struct, ::Thrift::Struct_Union NAME = 1 DESCRIPTION = 2 LOCATIONURI = 3 PARAMETERS = 4 + PRIVILEGES = 5 FIELDS = { NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}, LOCATIONURI => {:type => ::Thrift::Types::STRING, :name => 'locationUri'}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :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 + DATABASE = 2 + CREATETIME = 3 + OWNERNAME = 4 + PARAMETERS = 5 + + FIELDS = { + ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}, + DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => Database}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName'}, PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} } @@ -175,6 +221,7 @@ VIEWORIGINALTEXT = 10 VIEWEXPANDEDTEXT = 11 TABLETYPE = 12 + PRIVILEGES = 13 FIELDS = { TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, @@ -188,7 +235,8 @@ PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, VIEWORIGINALTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewOriginalText'}, VIEWEXPANDEDTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewExpandedText'}, - TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'} + TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'}, + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true} } def struct_fields; FIELDS; end @@ -208,6 +256,7 @@ LASTACCESSTIME = 5 SD = 6 PARAMETERS = 7 + PRIVILEGES = 8 FIELDS = { VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}}, @@ -216,7 +265,8 @@ CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, - PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrincipalPrivilegeSet, :optional => true} } def struct_fields; FIELDS; end @@ -279,6 +329,168 @@ ::Thrift::Struct.generate_accessors self end +class ColumnPrivilegeBag + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TABLENAME = 2 + PARTITIONNAME = 3 + COLUMNPRIVILEGES = 4 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionName'}, + COLUMNPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'columnPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class PrivilegeBag + include ::Thrift::Struct, ::Thrift::Struct_Union + USERPRIVILEGES = 1 + DBPRIVILEGES = 2 + TABLEPRIVILEGES = 3 + PARTITIONPRIVILEGES = 4 + COLUMNPRIVILEGES = 5 + + FIELDS = { + USERPRIVILEGES => {:type => ::Thrift::Types::STRING, :name => 'userPrivileges'}, + DBPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'dbPrivileges', :key => {:type => ::Thrift::Types::STRUCT, :class => Database}, :value => {:type => ::Thrift::Types::STRING}}, + TABLEPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'tablePrivileges', :key => {:type => ::Thrift::Types::STRUCT, :class => Table}, :value => {:type => ::Thrift::Types::STRING}}, + PARTITIONPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'partitionPrivileges', :key => {:type => ::Thrift::Types::STRUCT, :class => Partition}, :value => {:type => ::Thrift::Types::STRING}}, + COLUMNPRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'columnPrivileges', :element => {:type => ::Thrift::Types::STRUCT, :class => ColumnPrivilegeBag}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SecurityUser + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPALNAME = 1 + ISROLE = 2 + ISGROUP = 3 + PRIVILEGES = 4 + CREATETIME = 5 + GRANTOR = 6 + + FIELDS = { + PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, + ISROLE => {:type => ::Thrift::Types::BOOL, :name => 'isRole'}, + ISGROUP => {:type => ::Thrift::Types::BOOL, :name => 'isGroup'}, + PRIVILEGES => {:type => ::Thrift::Types::STRING, :name => 'privileges'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SecurityDB + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPALNAME = 1 + ISROLE = 2 + ISGROUP = 3 + PRIVILEGES = 4 + CREATETIME = 5 + GRANTOR = 6 + DB = 7 + + FIELDS = { + PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, + ISROLE => {:type => ::Thrift::Types::BOOL, :name => 'isRole'}, + ISGROUP => {:type => ::Thrift::Types::BOOL, :name => 'isGroup'}, + PRIVILEGES => {:type => ::Thrift::Types::STRING, :name => 'privileges'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, + DB => {:type => ::Thrift::Types::STRUCT, :name => 'db', :class => Database} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SecurityTablePartition + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPALNAME = 1 + ISROLE = 2 + ISGROUP = 3 + PRIVILEGES = 4 + CREATETIME = 5 + GRANTOR = 6 + TABLE = 7 + PART = 8 + + FIELDS = { + PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, + ISROLE => {:type => ::Thrift::Types::BOOL, :name => 'isRole'}, + ISGROUP => {:type => ::Thrift::Types::BOOL, :name => 'isGroup'}, + PRIVILEGES => {:type => ::Thrift::Types::STRING, :name => 'privileges'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, + TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'table', :class => Table}, + PART => {:type => ::Thrift::Types::STRUCT, :name => 'part', :class => Partition} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SecurityColumn + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPALNAME = 1 + ISROLE = 2 + ISGROUP = 3 + PRIVILEGES = 4 + CREATETIME = 5 + GRANTOR = 6 + TABLE = 7 + PARTITION = 8 + COLUMN = 9 + + FIELDS = { + PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, + ISROLE => {:type => ::Thrift::Types::BOOL, :name => 'isRole'}, + ISGROUP => {:type => ::Thrift::Types::BOOL, :name => 'isGroup'}, + PRIVILEGES => {:type => ::Thrift::Types::STRING, :name => 'privileges'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, + TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'table', :class => Table}, + PARTITION => {:type => ::Thrift::Types::STRUCT, :name => 'partition', :class => Partition}, + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + class MetaException < ::Thrift::Exception include ::Thrift::Struct, ::Thrift::Struct_Union def initialize(message=nil) Index: metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (revision 1044070) +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (working copy) @@ -403,6 +403,23 @@ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition failed: unknown result') end + def get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + return recv_get_partition_with_auth() + end + + def send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + send_message('get_partition_with_auth', Get_partition_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :user_name => user_name, :group_names => group_names) + end + + def recv_get_partition_with_auth() + result = receive_message(Get_partition_with_auth_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_with_auth failed: unknown result') + end + def get_partition_by_name(db_name, tbl_name, part_name) send_get_partition_by_name(db_name, tbl_name, part_name) return recv_get_partition_by_name() @@ -437,6 +454,23 @@ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions failed: unknown result') end + def get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + return recv_get_partitions_with_auth() + end + + def send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + send_message('get_partitions_with_auth', Get_partitions_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts, :user_name => user_name, :group_names => group_names) + end + + def recv_get_partitions_with_auth() + result = receive_message(Get_partitions_with_auth_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_with_auth failed: unknown result') + end + def get_partition_names(db_name, tbl_name, max_parts) send_get_partition_names(db_name, tbl_name, max_parts) return recv_get_partition_names() @@ -469,6 +503,23 @@ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_ps failed: unknown result') end + def get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + return recv_get_partitions_ps_with_auth() + end + + def send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + send_message('get_partitions_ps_with_auth', Get_partitions_ps_with_auth_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts, :user_name => user_name, :group_names => group_names) + end + + def recv_get_partitions_ps_with_auth() + result = receive_message(Get_partitions_ps_with_auth_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_ps_with_auth failed: unknown result') + end + def get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) return recv_get_partition_names_ps() @@ -667,6 +718,294 @@ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result') end + def get_user_privilege_set(user_name, group_names) + send_get_user_privilege_set(user_name, group_names) + return recv_get_user_privilege_set() + end + + def send_get_user_privilege_set(user_name, group_names) + send_message('get_user_privilege_set', Get_user_privilege_set_args, :user_name => user_name, :group_names => group_names) + end + + def recv_get_user_privilege_set() + result = receive_message(Get_user_privilege_set_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_user_privilege_set failed: unknown result') + end + + def get_db_privilege_set(db_name, user_name, group_names) + send_get_db_privilege_set(db_name, user_name, group_names) + return recv_get_db_privilege_set() + end + + def send_get_db_privilege_set(db_name, user_name, group_names) + send_message('get_db_privilege_set', Get_db_privilege_set_args, :db_name => db_name, :user_name => user_name, :group_names => group_names) + end + + def recv_get_db_privilege_set() + result = receive_message(Get_db_privilege_set_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_db_privilege_set failed: unknown result') + end + + def get_table_privilege_set(db_name, table_name, user_name, group_names) + send_get_table_privilege_set(db_name, table_name, user_name, group_names) + return recv_get_table_privilege_set() + end + + def send_get_table_privilege_set(db_name, table_name, user_name, group_names) + send_message('get_table_privilege_set', Get_table_privilege_set_args, :db_name => db_name, :table_name => table_name, :user_name => user_name, :group_names => group_names) + end + + def recv_get_table_privilege_set() + result = receive_message(Get_table_privilege_set_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_privilege_set failed: unknown result') + end + + def get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names) + send_get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names) + return recv_get_partition_privilege_set() + end + + def send_get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names) + send_message('get_partition_privilege_set', Get_partition_privilege_set_args, :db_name => db_name, :table_name => table_name, :part_name => part_name, :user_name => user_name, :group_names => group_names) + end + + def recv_get_partition_privilege_set() + result = receive_message(Get_partition_privilege_set_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_privilege_set failed: unknown result') + end + + def get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names) + send_get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names) + return recv_get_column_privilege_set() + end + + def send_get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names) + send_message('get_column_privilege_set', Get_column_privilege_set_args, :db_name => db_name, :table_name => table_name, :part_name => part_name, :column_name => column_name, :user_name => user_name, :group_names => group_names) + end + + def recv_get_column_privilege_set() + result = receive_message(Get_column_privilege_set_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_column_privilege_set failed: unknown result') + end + + def create_role(role_name, owner_name, db_name) + send_create_role(role_name, owner_name, db_name) + return recv_create_role() + end + + def send_create_role(role_name, owner_name, db_name) + send_message('create_role', Create_role_args, :role_name => role_name, :owner_name => owner_name, :db_name => db_name) + end + + def recv_create_role() + result = receive_message(Create_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_role failed: unknown result') + end + + def drop_role(role_name, db_name) + send_drop_role(role_name, db_name) + return recv_drop_role() + end + + def send_drop_role(role_name, db_name) + send_message('drop_role', Drop_role_args, :role_name => role_name, :db_name => db_name) + end + + def recv_drop_role() + result = receive_message(Drop_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_role failed: unknown result') + end + + def add_role_member(role_name, user_name, is_role, is_group, db_name) + send_add_role_member(role_name, user_name, is_role, is_group, db_name) + return recv_add_role_member() + end + + def send_add_role_member(role_name, user_name, is_role, is_group, db_name) + send_message('add_role_member', Add_role_member_args, :role_name => role_name, :user_name => user_name, :is_role => is_role, :is_group => is_group, :db_name => db_name) + end + + def recv_add_role_member() + result = receive_message(Add_role_member_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_role_member failed: unknown result') + end + + def remove_role_member(role_name, user_name, is_role, is_group, db_name) + send_remove_role_member(role_name, user_name, is_role, is_group, db_name) + return recv_remove_role_member() + end + + def send_remove_role_member(role_name, user_name, is_role, is_group, db_name) + send_message('remove_role_member', Remove_role_member_args, :role_name => role_name, :user_name => user_name, :is_role => is_role, :is_group => is_group, :db_name => db_name) + end + + def recv_remove_role_member() + result = receive_message(Remove_role_member_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'remove_role_member failed: unknown result') + end + + def list_roles(principal_name, is_role, is_group, db_name) + send_list_roles(principal_name, is_role, is_group, db_name) + return recv_list_roles() + end + + def send_list_roles(principal_name, is_role, is_group, db_name) + send_message('list_roles', List_roles_args, :principal_name => principal_name, :is_role => is_role, :is_group => is_group, :db_name => db_name) + end + + def recv_list_roles() + result = receive_message(List_roles_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_roles failed: unknown result') + end + + def list_security_user_grant(principla_name, is_role, is_group) + send_list_security_user_grant(principla_name, is_role, is_group) + return recv_list_security_user_grant() + end + + def send_list_security_user_grant(principla_name, is_role, is_group) + send_message('list_security_user_grant', List_security_user_grant_args, :principla_name => principla_name, :is_role => is_role, :is_group => is_group) + end + + def recv_list_security_user_grant() + result = receive_message(List_security_user_grant_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_security_user_grant failed: unknown result') + end + + def list_security_db_grant(principal_name, is_group, is_role, db_name) + send_list_security_db_grant(principal_name, is_group, is_role, db_name) + return recv_list_security_db_grant() + end + + def send_list_security_db_grant(principal_name, is_group, is_role, db_name) + send_message('list_security_db_grant', List_security_db_grant_args, :principal_name => principal_name, :is_group => is_group, :is_role => is_role, :db_name => db_name) + end + + def recv_list_security_db_grant() + result = receive_message(List_security_db_grant_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_security_db_grant failed: unknown result') + end + + def list_security_table_grant(principal_name, is_group, is_role, db_name, table_name) + send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name) + return recv_list_security_table_grant() + end + + def send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name) + send_message('list_security_table_grant', List_security_table_grant_args, :principal_name => principal_name, :is_group => is_group, :is_role => is_role, :db_name => db_name, :table_name => table_name) + end + + def recv_list_security_table_grant() + result = receive_message(List_security_table_grant_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_security_table_grant failed: unknown result') + end + + def list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name) + send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name) + return recv_list_security_partition_grant() + end + + def send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name) + send_message('list_security_partition_grant', List_security_partition_grant_args, :principal_name => principal_name, :is_group => is_group, :is_role => is_role, :db_name => db_name, :table_name => table_name, :part_name => part_name) + end + + def recv_list_security_partition_grant() + result = receive_message(List_security_partition_grant_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_security_partition_grant failed: unknown result') + end + + def list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name) + send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name) + return recv_list_security_column_grant() + end + + def send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name) + send_message('list_security_column_grant', List_security_column_grant_args, :principal_name => principal_name, :is_group => is_group, :is_role => is_role, :db_name => db_name, :table_name => table_name, :part_name => part_name, :column_name => column_name) + end + + def recv_list_security_column_grant() + result = receive_message(List_security_column_grant_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_security_column_grant failed: unknown result') + end + + def grant_privileges(user_name, is_role, is_group, privileges, grantor) + send_grant_privileges(user_name, is_role, is_group, privileges, grantor) + return recv_grant_privileges() + end + + def send_grant_privileges(user_name, is_role, is_group, privileges, grantor) + send_message('grant_privileges', Grant_privileges_args, :user_name => user_name, :is_role => is_role, :is_group => is_group, :privileges => privileges, :grantor => grantor) + end + + def recv_grant_privileges() + result = receive_message(Grant_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_privileges failed: unknown result') + end + + def revoke_privileges(user_name, is_role, is_group, privileges) + send_revoke_privileges(user_name, is_role, is_group, privileges) + return recv_revoke_privileges() + end + + def send_revoke_privileges(user_name, is_role, is_group, privileges) + send_message('revoke_privileges', Revoke_privileges_args, :user_name => user_name, :is_role => is_role, :is_group => is_group, :privileges => privileges) + end + + def recv_revoke_privileges() + result = receive_message(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, 'revoke_privileges failed: unknown result') + end + + def revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns) + send_revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns) + return recv_revoke_all_privileges() + end + + def send_revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns) + send_message('revoke_all_privileges', Revoke_all_privileges_args, :user_name => user_name, :is_role => is_role, :is_group => is_group, :remove_user_priv => remove_user_priv, :dbs => dbs, :tables => tables, :parts => parts, :columns => columns) + end + + def recv_revoke_all_privileges() + result = receive_message(Revoke_all_privileges_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'revoke_all_privileges failed: unknown result') + end + end class Processor < FacebookService::Processor @@ -981,6 +1320,19 @@ write_result(result, oprot, 'get_partition', seqid) end + def process_get_partition_with_auth(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_with_auth_args) + result = Get_partition_with_auth_result.new() + begin + result.success = @handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_with_auth', seqid) + end + def process_get_partition_by_name(seqid, iprot, oprot) args = read_args(iprot, Get_partition_by_name_args) result = Get_partition_by_name_result.new() @@ -1007,6 +1359,19 @@ write_result(result, oprot, 'get_partitions', seqid) end + def process_get_partitions_with_auth(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_with_auth_args) + result = Get_partitions_with_auth_result.new() + begin + result.success = @handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_with_auth', seqid) + end + def process_get_partition_names(seqid, iprot, oprot) args = read_args(iprot, Get_partition_names_args) result = Get_partition_names_result.new() @@ -1029,6 +1394,19 @@ write_result(result, oprot, 'get_partitions_ps', seqid) end + def process_get_partitions_ps_with_auth(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_ps_with_auth_args) + result = Get_partitions_ps_with_auth_result.new() + begin + result.success = @handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_ps_with_auth', seqid) + end + def process_get_partition_names_ps(seqid, iprot, oprot) args = read_args(iprot, Get_partition_names_ps_args) result = Get_partition_names_ps_result.new() @@ -1177,31 +1555,229 @@ write_result(result, oprot, 'get_index_names', seqid) end - end + def process_get_user_privilege_set(seqid, iprot, oprot) + args = read_args(iprot, Get_user_privilege_set_args) + result = Get_user_privilege_set_result.new() + begin + result.success = @handler.get_user_privilege_set(args.user_name, args.group_names) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_user_privilege_set', seqid) + end - # HELPER FUNCTIONS AND STRUCTURES + def process_get_db_privilege_set(seqid, iprot, oprot) + args = read_args(iprot, Get_db_privilege_set_args) + result = Get_db_privilege_set_result.new() + begin + result.success = @handler.get_db_privilege_set(args.db_name, args.user_name, args.group_names) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_db_privilege_set', seqid) + end - class Create_database_args - include ::Thrift::Struct, ::Thrift::Struct_Union - DATABASE = 1 + def process_get_table_privilege_set(seqid, iprot, oprot) + args = read_args(iprot, Get_table_privilege_set_args) + result = Get_table_privilege_set_result.new() + begin + result.success = @handler.get_table_privilege_set(args.db_name, args.table_name, args.user_name, args.group_names) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_table_privilege_set', seqid) + end - FIELDS = { - DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => Database} - } + def process_get_partition_privilege_set(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_privilege_set_args) + result = Get_partition_privilege_set_result.new() + begin + result.success = @handler.get_partition_privilege_set(args.db_name, args.table_name, args.part_name, args.user_name, args.group_names) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_partition_privilege_set', seqid) + end - def struct_fields; FIELDS; end + def process_get_column_privilege_set(seqid, iprot, oprot) + args = read_args(iprot, Get_column_privilege_set_args) + result = Get_column_privilege_set_result.new() + begin + result.success = @handler.get_column_privilege_set(args.db_name, args.table_name, args.part_name, args.column_name, args.user_name, args.group_names) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_column_privilege_set', seqid) + end - def validate + def process_create_role(seqid, iprot, oprot) + args = read_args(iprot, Create_role_args) + result = Create_role_result.new() + begin + result.success = @handler.create_role(args.role_name, args.owner_name, args.db_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'create_role', seqid) end - ::Thrift::Struct.generate_accessors self - end + def process_drop_role(seqid, iprot, oprot) + args = read_args(iprot, Drop_role_args) + result = Drop_role_result.new() + begin + result.success = @handler.drop_role(args.role_name, args.db_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'drop_role', seqid) + end - class Create_database_result - include ::Thrift::Struct, ::Thrift::Struct_Union - O1 = 1 - O2 = 2 - O3 = 3 + def process_add_role_member(seqid, iprot, oprot) + args = read_args(iprot, Add_role_member_args) + result = Add_role_member_result.new() + begin + result.success = @handler.add_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'add_role_member', seqid) + end + + def process_remove_role_member(seqid, iprot, oprot) + args = read_args(iprot, Remove_role_member_args) + result = Remove_role_member_result.new() + begin + result.success = @handler.remove_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'remove_role_member', seqid) + end + + def process_list_roles(seqid, iprot, oprot) + args = read_args(iprot, List_roles_args) + result = List_roles_result.new() + begin + result.success = @handler.list_roles(args.principal_name, args.is_role, args.is_group, args.db_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_roles', seqid) + end + + def process_list_security_user_grant(seqid, iprot, oprot) + args = read_args(iprot, List_security_user_grant_args) + result = List_security_user_grant_result.new() + begin + result.success = @handler.list_security_user_grant(args.principla_name, args.is_role, args.is_group) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_security_user_grant', seqid) + end + + def process_list_security_db_grant(seqid, iprot, oprot) + args = read_args(iprot, List_security_db_grant_args) + result = List_security_db_grant_result.new() + begin + result.success = @handler.list_security_db_grant(args.principal_name, args.is_group, args.is_role, args.db_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_security_db_grant', seqid) + end + + def process_list_security_table_grant(seqid, iprot, oprot) + args = read_args(iprot, List_security_table_grant_args) + result = List_security_table_grant_result.new() + begin + result.success = @handler.list_security_table_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_security_table_grant', seqid) + end + + def process_list_security_partition_grant(seqid, iprot, oprot) + args = read_args(iprot, List_security_partition_grant_args) + result = List_security_partition_grant_result.new() + begin + result.success = @handler.list_security_partition_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_security_partition_grant', seqid) + end + + def process_list_security_column_grant(seqid, iprot, oprot) + args = read_args(iprot, List_security_column_grant_args) + result = List_security_column_grant_result.new() + begin + result.success = @handler.list_security_column_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name, args.column_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_security_column_grant', seqid) + end + + def process_grant_privileges(seqid, iprot, oprot) + args = read_args(iprot, Grant_privileges_args) + result = Grant_privileges_result.new() + begin + result.success = @handler.grant_privileges(args.user_name, args.is_role, args.is_group, args.privileges, args.grantor) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'grant_privileges', seqid) + end + + def process_revoke_privileges(seqid, iprot, oprot) + args = read_args(iprot, Revoke_privileges_args) + result = Revoke_privileges_result.new() + begin + result.success = @handler.revoke_privileges(args.user_name, args.is_role, args.is_group, args.privileges) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'revoke_privileges', seqid) + end + + def process_revoke_all_privileges(seqid, iprot, oprot) + args = read_args(iprot, Revoke_all_privileges_args) + result = Revoke_all_privileges_result.new() + begin + result.success = @handler.revoke_all_privileges(args.user_name, args.is_role, args.is_group, args.remove_user_priv, args.dbs, args.tables, args.parts, args.columns) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'revoke_all_privileges', seqid) + end + + end + + # HELPER FUNCTIONS AND STRUCTURES + + class Create_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DATABASE = 1 + + FIELDS = { + DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => Database} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 FIELDS = { O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, @@ -2050,6 +2626,50 @@ ::Thrift::Struct.generate_accessors self end + class Get_partition_with_auth_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + USER_NAME = 4 + GROUP_NAMES = 5 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_with_auth_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Get_partition_by_name_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 @@ -2130,6 +2750,50 @@ ::Thrift::Struct.generate_accessors self end + class Get_partitions_with_auth_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + USER_NAME = 4 + GROUP_NAMES = 5 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_with_auth_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Get_partition_names_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 @@ -2208,6 +2872,52 @@ ::Thrift::Struct.generate_accessors self end + class Get_partitions_ps_with_auth_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + USER_NAME = 5 + GROUP_NAMES = 6 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_with_auth_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Get_partition_names_ps_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 @@ -2672,5 +3382,743 @@ ::Thrift::Struct.generate_accessors self end -end + class Get_user_privilege_set_args + include ::Thrift::Struct, ::Thrift::Struct_Union + USER_NAME = 1 + GROUP_NAMES = 2 + + FIELDS = { + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_user_privilege_set_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => PrincipalPrivilegeSet}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_db_privilege_set_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + USER_NAME = 2 + GROUP_NAMES = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_db_privilege_set_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => PrincipalPrivilegeSet}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_privilege_set_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + USER_NAME = 3 + GROUP_NAMES = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_privilege_set_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => PrincipalPrivilegeSet}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_privilege_set_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + PART_NAME = 3 + USER_NAME = 4 + GROUP_NAMES = 5 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_privilege_set_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => PrincipalPrivilegeSet}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_column_privilege_set_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + PART_NAME = 3 + COLUMN_NAME = 4 + USER_NAME = 5 + GROUP_NAMES = 6 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + GROUP_NAMES => {:type => ::Thrift::Types::LIST, :name => 'group_names', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_column_privilege_set_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => PrincipalPrivilegeSet}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + OWNER_NAME = 2 + DB_NAME = 3 + + FIELDS = { + ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, + OWNER_NAME => {:type => ::Thrift::Types::STRING, :name => 'owner_name'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_role_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + DB_NAME = 2 + + FIELDS = { + ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_role_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_role_member_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + USER_NAME = 2 + IS_ROLE = 3 + IS_GROUP = 4 + DB_NAME = 5 + + FIELDS = { + ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_role_member_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Remove_role_member_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + USER_NAME = 2 + IS_ROLE = 3 + IS_GROUP = 4 + DB_NAME = 5 + + FIELDS = { + ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Remove_role_member_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_roles_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + IS_ROLE = 2 + IS_GROUP = 3 + DB_NAME = 4 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_roles_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Role}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_user_grant_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPLA_NAME = 1 + IS_ROLE = 2 + IS_GROUP = 3 + + FIELDS = { + PRINCIPLA_NAME => {:type => ::Thrift::Types::STRING, :name => 'principla_name'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_user_grant_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SecurityUser}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_db_grant_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + IS_GROUP = 2 + IS_ROLE = 3 + DB_NAME = 4 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_db_grant_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SecurityDB}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_table_grant_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + IS_GROUP = 2 + IS_ROLE = 3 + DB_NAME = 4 + TABLE_NAME = 5 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_table_grant_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SecurityTablePartition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_partition_grant_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + IS_GROUP = 2 + IS_ROLE = 3 + DB_NAME = 4 + TABLE_NAME = 5 + PART_NAME = 6 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_partition_grant_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SecurityTablePartition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_column_grant_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + IS_GROUP = 2 + IS_ROLE = 3 + DB_NAME = 4 + TABLE_NAME = 5 + PART_NAME = 6 + COLUMN_NAME = 7 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class List_security_column_grant_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SecurityColumn}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + USER_NAME = 1 + IS_ROLE = 2 + IS_GROUP = 3 + PRIVILEGES = 4 + GRANTOR = 5 + + FIELDS = { + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrivilegeBag}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_privileges_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + USER_NAME = 1 + IS_ROLE = 2 + IS_GROUP = 3 + PRIVILEGES = 4 + + FIELDS = { + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrivilegeBag} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_privileges_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_all_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + USER_NAME = 1 + IS_ROLE = 2 + IS_GROUP = 3 + REMOVE_USER_PRIV = 4 + DBS = 5 + TABLES = 6 + PARTS = 7 + COLUMNS = 8 + + FIELDS = { + USER_NAME => {:type => ::Thrift::Types::STRING, :name => 'user_name'}, + IS_ROLE => {:type => ::Thrift::Types::BOOL, :name => 'is_role'}, + IS_GROUP => {:type => ::Thrift::Types::BOOL, :name => 'is_group'}, + REMOVE_USER_PRIV => {:type => ::Thrift::Types::BOOL, :name => 'remove_user_priv'}, + DBS => {:type => ::Thrift::Types::LIST, :name => 'dbs', :element => {:type => ::Thrift::Types::STRUCT, :class => Database}}, + TABLES => {:type => ::Thrift::Types::LIST, :name => 'tables', :element => {:type => ::Thrift::Types::STRUCT, :class => Table}}, + PARTS => {:type => ::Thrift::Types::LIST, :name => 'parts', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + COLUMNS => {:type => ::Thrift::Types::MAP, :name => 'columns', :key => {:type => ::Thrift::Types::STRUCT, :class => Table}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRING}}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_all_privileges_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + +end Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 1044070) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -48,12 +48,27 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore; import org.apache.hadoop.hive.metastore.api.Type; import org.apache.hadoop.hive.metastore.api.UnknownDBException; import org.apache.hadoop.hive.metastore.api.UnknownTableException; import org.apache.hadoop.hive.metastore.hooks.JDOConnectionURLHook; +import org.apache.hadoop.hive.metastore.model.MPartition; +import org.apache.hadoop.hive.metastore.model.MSecurityColumn; +import org.apache.hadoop.hive.metastore.model.MSecurityDB; +import org.apache.hadoop.hive.metastore.model.MSecurityRoleEntity; +import org.apache.hadoop.hive.metastore.model.MSecurityTablePartition; +import org.apache.hadoop.hive.metastore.model.MSecurityUser; +import org.apache.hadoop.hive.metastore.model.MSecurityUserRoleMap; +import org.apache.hadoop.hive.metastore.model.MTable; import org.apache.hadoop.hive.serde2.Deserializer; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeUtils; @@ -1312,6 +1327,35 @@ } return ret; } + + @Override + public Partition get_partition_with_auth(final String db_name, + final String tbl_name, final List part_vals, + final String user_name, final List group_names) + throws MetaException, NoSuchObjectException, TException { + incrementCounter("get_partition_with_auth"); + logStartPartitionFunction("get_partition_with_auth", db_name, tbl_name, + part_vals); + + Partition ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Partition run(RawStore ms) throws Exception { + return ms.getPartitionWithAuth(db_name, tbl_name, part_vals, + user_name, group_names); + } + }); + } catch (MetaException e) { + throw e; + } catch (NoSuchObjectException e) { + throw e; + } catch (Exception e) { + assert (e instanceof RuntimeException); + throw (RuntimeException) e; + } + return ret; + } public List get_partitions(final String db_name, final String tbl_name, final short max_parts) throws NoSuchObjectException, MetaException { @@ -1337,6 +1381,35 @@ return ret; } + + @Override + public List get_partitions_with_auth(final String dbName, + final String tblName, final short maxParts, final String userName, + final List groupNames) throws NoSuchObjectException, + MetaException, TException { + incrementCounter("get_partitions_with_auth"); + logStartTableFunction("get_partitions_with_auth", dbName, tblName); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + return ms.getPartitionsWithAuth(dbName, tblName, maxParts, + userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (NoSuchObjectException e) { + throw e; + } catch (Exception e) { + assert (e instanceof RuntimeException); + throw (RuntimeException) e; + } + return ret; + + } public List get_partition_names(final String db_name, final String tbl_name, final short max_parts) throws MetaException { @@ -1774,10 +1847,24 @@ @Override public List get_partitions_ps(final String db_name, - final String tbl_name, final List part_vals, final short max_parts) - throws MetaException, TException { + final String tbl_name, final List part_vals, + final short max_parts) throws MetaException, TException { + incrementCounter("get_partitions_ps"); + logStartPartitionFunction("get_partitions_ps", db_name, tbl_name, + part_vals); + + return this.get_partitions_ps_with_auth(db_name, tbl_name, part_vals, + max_parts, null, null); + } + + @Override + public List get_partitions_ps_with_auth(final String db_name, + final String tbl_name, final List part_vals, + final short max_parts, final String userName, + final List groupNames) throws MetaException, TException { incrementCounter("get_partitions_ps"); - logStartPartitionFunction("get_partitions_ps", db_name, tbl_name, part_vals); + logStartPartitionFunction("get_partitions_ps", db_name, tbl_name, + part_vals); Table t; try { @@ -1791,7 +1878,7 @@ } // Create a map from the partition column name to the partition value Map partKeyToValues = new LinkedHashMap(); - int i=0; + int i = 0; for (String value : part_vals) { String col = t.getPartitionKeys().get(i).getName(); if (value.length() > 0) { @@ -1799,21 +1886,48 @@ } i++; } - final String filter = MetaStoreUtils.makeFilterStringFromMap(partKeyToValues); + final String filter = MetaStoreUtils + .makeFilterStringFromMap(partKeyToValues); List ret = null; try { ret = executeWithRetry(new Command>() { @Override List run(RawStore ms) throws Exception { - return ms.getPartitionsByFilter(db_name, tbl_name, filter, max_parts); + return ms.getPartitionsByFilter(db_name, tbl_name, filter, + max_parts); } }); } catch (MetaException e) { throw e; } catch (Exception e) { - assert(e instanceof RuntimeException); - throw (RuntimeException)e; + assert (e instanceof RuntimeException); + throw (RuntimeException) e; + } + + if (ret != null && ret.size() > 0) { + for (Partition part : ret) { + final String partName = Warehouse.makePartName(t.getPartitionKeys(), + part.getValues()); + PrincipalPrivilegeSet partAuth = null; + try { + partAuth = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + PrincipalPrivilegeSet auth = ms.getPartitionPrivilegeSet( + db_name, tbl_name, partName, userName, groupNames); + return auth; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + assert (e instanceof RuntimeException); + throw (RuntimeException) e; + } + + part.setPrivileges(partAuth); + } } return ret; @@ -2163,6 +2277,505 @@ return ret; } + @Override + public PrincipalPrivilegeSet get_column_privilege_set(final String dbName, + final String tableName, final String partName, final String columnName, + final String userName, final List groupNames) throws MetaException, + TException { + incrementCounter("get_column_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getColumnPrivilegeSet(dbName, tableName, partName, columnName, userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public PrincipalPrivilegeSet get_db_privilege_set(final String dbName, + final String userName, final List groupNames) throws MetaException, + TException { + incrementCounter("get_db_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getDBPrivilegeSet(dbName, userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public PrincipalPrivilegeSet get_partition_privilege_set( + final String dbName, final String tableName, final String partName, + final String userName, final List groupNames) + throws MetaException, TException { + incrementCounter("get_partition_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getPartitionPrivilegeSet(dbName, tableName, partName, + userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public PrincipalPrivilegeSet get_table_privilege_set(final String dbName, + final String tableName, final String userName, + final List groupNames) throws MetaException, TException { + incrementCounter("get_table_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getTablePrivilegeSet(dbName, tableName, userName, + groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean add_role_member(final String roleName, + final String userName, final boolean isRole, final boolean isGroup, + final String databaseName) throws MetaException, TException { + incrementCounter("add_role_member"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + Role role = ms.getRole(roleName, databaseName); + return ms.addRoleMember(role, userName, isRole, isGroup); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + public List list_roles(final String principalName, + final boolean isRole, final boolean isGroup, final String databaseName) throws MetaException, TException { + incrementCounter("list_roles"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List result = new ArrayList(); + List roleMap = ms.listRoles(principalName, + isRole, isGroup, databaseName); + if (roleMap!=null) { + Database db = get_database(databaseName); + for (MSecurityUserRoleMap role : roleMap) { + MSecurityRoleEntity r = role.getRole(); + result.add(new Role(r.getRoleName(), db, r + .getCreateTime(), r.getOwnerName(), null)); + } + } + return result; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean create_role(final String roleName, final String ownerName, + final String databName) + throws MetaException, TException { + incrementCounter("create_role"); + + Boolean ret = null; + try { + + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.addRole(roleName, ownerName, databName); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean drop_role(final String roleName, final String databaseName) + throws MetaException, TException { + incrementCounter("drop_role"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.removeRole(roleName, databaseName); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean grant_privileges(final String userName, final boolean isRole, + final boolean isGroup, final PrivilegeBag privileges, final String grantor) throws MetaException, + TException { + incrementCounter("grant_privileges"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.grantPrivileges(userName, isRole, isGroup, privileges, grantor); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean remove_role_member(final String roleName, final String userName, + final boolean isRole, final boolean isGroup, final String databaseName) throws MetaException, TException { + incrementCounter("remove_role_member"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + Role mRole = ms.getRole(roleName, databaseName); + return ms.removeRoleMember(mRole, userName, isRole, isGroup); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean revoke_privileges(final String userName, final boolean isRole, + final boolean isGroup, final PrivilegeBag privileges) throws MetaException, + TException { + incrementCounter("revoke_privileges"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.revokePrivileges(userName, isRole, isGroup, privileges); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public PrincipalPrivilegeSet get_user_privilege_set(final String userName, + final List groupNames) throws MetaException, TException { + incrementCounter("get_user_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getUserPrivilegeSet(userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean revoke_all_privileges(final String userName, + final boolean isRole, final boolean isGroup, + final boolean removeUserPriv, final List dbs, + final List
tables, final List parts, + final Map> columns) throws MetaException, + TException { + incrementCounter("revoke_all_privileges"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.revokeAllPrivileges(userName, isRole, isGroup, + removeUserPriv, dbs, tables, parts, columns); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_column_grant( + final String principalName, final boolean isGroup, + final boolean isRole, final String dbName, final String tableName, + final String partName, final String columnName) throws MetaException, + TException { + incrementCounter("list_security_column_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mCols = ms.listMSecurityTabOrPartColumnGrant(principalName, + isGroup, isRole, dbName, tableName, partName, columnName); + Table tbl = ms.getTable(dbName, tableName); + Partition part = null; + if (partName != null) { + part = get_partition_by_name(dbName, tableName, partName); + } + + if (mCols.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mCols.size(); i++) { + MSecurityColumn sCol = mCols.get(i); + SecurityColumn col = new SecurityColumn( + sCol.getPrincipalName(), sCol.getIsRole(), sCol + .getIsGroup(), sCol.getPrivileges(), sCol + .getCreateTime(), sCol.getGrantor(), tbl, part, sCol + .getColumnName()); + result.add(col); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_db_grant(final String principalName, + final boolean isGroup, final boolean isRole, final String dbName) + throws MetaException, TException { + incrementCounter("list_security_db_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mDbs = ms.listMSecurityPrincipalDBGrant( + principalName, isGroup, isRole, dbName); + Database db = ms.getDatabase(dbName); + if (mDbs.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mDbs.size(); i++) { + MSecurityDB sDB = mDbs.get(i); + SecurityDB secdb = new SecurityDB(sDB.getPrincipalName(), sDB + .getIsRole(), sDB.getIsGroup(), sDB.getPrivileges(), sDB + .getCreateTime(), sDB.getGrantor(), db); + result.add(secdb); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_partition_grant( + final String principalName, final boolean isGroup, + final boolean isRole, final String dbName, final String tableName, + final String partName) throws MetaException, TException { + incrementCounter("list_security_partition_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mParts = ms + .listMSecurityPrincipalPartitionGrant(principalName, isGroup, + isRole, dbName, tableName, partName); + Partition partObj = get_partition_by_name(dbName, tableName, + partName); + if (mParts.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mParts.size(); i++) { + MSecurityTablePartition sPart = mParts.get(i); + SecurityTablePartition secPart = new SecurityTablePartition( + sPart.getPrincipalName(), sPart.getIsRole(), sPart + .getIsGroup(), sPart.getPrivileges(), sPart + .getCreateTime(), sPart.getGrantor(), null, partObj); + result.add(secPart); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_table_grant( + final String principalName, final boolean isGroup, + final boolean isRole, final String dbName, final String tableName) + throws MetaException, TException { + incrementCounter("list_security_table_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mTbls = ms + .listMSecurityPrincipalTableGrant(principalName, isGroup, + isRole, dbName, tableName); + Table tblObj = ms.getTable(dbName, tableName); + if (mTbls.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mTbls.size(); i++) { + MSecurityTablePartition sTbl = mTbls.get(i); + SecurityTablePartition secPart = new SecurityTablePartition( + sTbl.getPrincipalName(), sTbl.getIsRole(), sTbl + .getIsGroup(), sTbl.getPrivileges(), sTbl + .getCreateTime(), sTbl.getGrantor(), tblObj, null); + result.add(secPart); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_user_grant( + final String principlaName, final boolean isRole, final boolean isGroup) + throws MetaException, TException { + incrementCounter("list_security_user_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mUsers = ms.listMSecurityPrincipalUserGrant( + principlaName, isRole, isGroup); + if (mUsers.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mUsers.size(); i++) { + MSecurityUser sUsr = mUsers.get(i); + SecurityUser secUser = new SecurityUser( + sUsr.getPrincipalName(), sUsr.getIsRole(), sUsr + .getIsGroup(), sUsr.getPrivileges(), sUsr + .getCreateTime(), sUsr.getGrantor()); + result.add(secUser); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + } /** Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (revision 1044070) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (working copy) @@ -40,6 +40,13 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore; import org.apache.hadoop.hive.metastore.api.Type; @@ -515,6 +522,23 @@ return deepCopyPartitions( client.get_partitions_ps(db_name, tbl_name, part_vals, max_parts)); } + + @Override + public List listPartitionsWithAuthInfo(String db_name, + String tbl_name, short max_parts, String user_name, List group_names) + throws NoSuchObjectException, MetaException, TException { + return deepCopyPartitions( + client.get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names)); + } + + @Override + public List listPartitionsWithAuthInfo(String db_name, + String tbl_name, List part_vals, short max_parts, + String user_name, List group_names) throws NoSuchObjectException, + MetaException, TException { + return deepCopyPartitions(client.get_partitions_ps_with_auth(db_name, + tbl_name, part_vals, max_parts, user_name, group_names)); + } /** * Get list of partitions matching specified filter @@ -564,6 +588,14 @@ List part_vals) throws NoSuchObjectException, MetaException, TException { return deepCopy(client.get_partition(db_name, tbl_name, part_vals)); } + + @Override + public Partition getPartitionWithAuthInfo(String db_name, String tbl_name, + List part_vals, String user_name, List group_names) + throws MetaException, UnknownTableException, NoSuchObjectException, + TException { + return deepCopy(client.get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names)); + } /** * @param name @@ -891,4 +923,132 @@ return client.drop_index_by_name(dbName, tblName, name, deleteData); } + @Override + public boolean add_role_member(String roleName, String userName, + boolean isRole, boolean isGroup, String dbName) throws MetaException, TException { + return client.add_role_member(roleName, userName, isRole, isGroup, dbName); + } + + @Override + public boolean create_role(String roleName, String ownerName, String dbName) + throws MetaException, TException { + return client.create_role(roleName, ownerName, dbName); + } + + @Override + public boolean drop_role(String roleName, String dbName) throws MetaException, TException { + return client.drop_role(roleName, dbName); + } + + @Override + public List list_roles(String principalName, + boolean isRole, boolean isGroup, String dbName) throws MetaException, TException { + return client.list_roles(principalName, isRole, isGroup, dbName); + } + + @Override + public PrincipalPrivilegeSet get_column_privilege_set(String dbName, + String tableName, String partName, String columnName, String userName, + List groupNames) throws MetaException, TException { + return client.get_column_privilege_set(dbName, tableName, partName, + columnName, userName, groupNames); + } + + @Override + public PrincipalPrivilegeSet get_db_privilege_set(String dbName, + String userName, List groupNames) throws MetaException, + TException { + return client.get_db_privilege_set(dbName, userName, groupNames); + } + + @Override + public PrincipalPrivilegeSet get_partition_privilege_set(String dbName, + String tableName, String partName, String userName, + List groupNames) throws MetaException, TException { + return client.get_partition_privilege_set(dbName, tableName, partName, + userName, groupNames); + } + + @Override + public PrincipalPrivilegeSet get_table_privilege_set(String dbName, + String tableName, String userName, List groupNames) + throws MetaException, TException { + return client.get_table_privilege_set(dbName, tableName, userName, + groupNames); + } + + @Override + public PrincipalPrivilegeSet get_user_privilege_set(String userName, + List groupNames) throws MetaException, TException { + return client.get_user_privilege_set(userName, groupNames); + } + + @Override + public boolean grant_privileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges, String grantor) + throws MetaException, TException { + return client.grant_privileges(userName, isRole, isGroup, privileges, + grantor); + } + + @Override + public boolean remove_role_member(String roleName, String userName, + boolean isRole, boolean isGroup, String dbName) throws MetaException, TException { + return client.remove_role_member(roleName, userName, isRole, isGroup, dbName); + } + + @Override + public boolean revoke_all_privileges(String userName, boolean isRole, + boolean isGroup, boolean removeUserPriv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException, TException { + return client.revoke_all_privileges(userName, isRole, isGroup, + removeUserPriv, dbs, tables, parts, columns); + } + + @Override + public boolean revoke_privileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges) throws MetaException, + TException { + return client.revoke_privileges(userName, isRole, isGroup, privileges); + } + + @Override + public List list_security_column_grant(String principalName, + boolean isGroup, boolean isRole, String dbName, String tableName, + String partName, String columnName) throws MetaException, TException { + return client.list_security_column_grant(principalName, isGroup, isRole, + dbName, tableName, partName, columnName); + } + + @Override + public List list_security_db_grant(String principalName, + boolean isGroup, boolean isRole, String dbName) throws MetaException, + TException { + return client + .list_security_db_grant(principalName, isGroup, isRole, dbName); + } + + @Override + public List list_security_partition_grant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName) throws MetaException, TException { + return client.list_security_partition_grant(principalName, isGroup, isRole, + dbName, tableName, partName); + } + + @Override + public List list_security_table_grant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName) throws MetaException, TException { + return client.list_security_table_grant(principalName, isGroup, isRole, + dbName, tableName); + } + + @Override + public List list_security_user_grant(String principlaName, + boolean isRole, boolean isGroup) throws MetaException, TException { + return client.list_security_user_grant(principlaName, isRole, isGroup); + } + } Index: metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (revision 1044070) +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (working copy) @@ -31,6 +31,13 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.UnknownDBException; import org.apache.hadoop.hive.metastore.api.UnknownTableException; @@ -263,6 +270,23 @@ public Partition getPartition(String dbName, String tblName, String name) throws MetaException, UnknownTableException, NoSuchObjectException, TException; + + /** + * @param dbName + * @param tableName + * @param pvals + * @param userName + * @param groupNames + * @return + * @throws MetaException + * @throws UnknownTableException + * @throws NoSuchObjectException + * @throws TException + */ + public Partition getPartitionWithAuthInfo(String dbName, String tableName, + List pvals, String userName, List groupNames) + throws MetaException, UnknownTableException, NoSuchObjectException, TException; + /** * @param tbl_name * @param db_name @@ -285,6 +309,33 @@ List part_vals, short max_parts) throws MetaException, TException; /** + * @param dbName + * @param tableName + * @param s + * @param userName + * @param groupNames + * @return + * @throws NoSuchObjectException + */ + public List listPartitionsWithAuthInfo(String dbName, + String tableName, short s, String userName, List groupNames) + throws MetaException, TException, NoSuchObjectException; + + /** + * @param dbName + * @param tableName + * @param partialPvals + * @param s + * @param userName + * @param groupNames + * @return + * @throws NoSuchObjectException + */ + public List listPartitionsWithAuthInfo(String dbName, + String tableName, List partialPvals, short s, String userName, + List groupNames) throws MetaException, TException, NoSuchObjectException; + + /** * @param tbl * @throws AlreadyExistsException * @throws InvalidObjectException @@ -478,4 +529,297 @@ public boolean dropIndex(String db_name, String tbl_name, String name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; + + /** + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_user_privilege_set(String user_name, + List group_names) throws MetaException, TException; + + /** + * @param db_name + * database name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_db_privilege_set(String db_name, + String user_name, List group_names) throws MetaException, + TException; + + /** + * @param db_name + * db name + * @param table_name + * table name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_table_privilege_set(String db_name, + String table_name, String user_name, List group_names) + throws MetaException, TException; + + /** + * @param db_name + * db name + * @param table_name + * table name + * @param part_name + * partition name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_partition_privilege_set(String db_name, + String table_name, String part_name, String user_name, + List group_names) throws MetaException, TException; + + /** + * @param db_name + * database name + * @param table_name + * table name + * @param part_name + * partition name + * @param column_name + * column name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_column_privilege_set(String db_name, + String table_name, String part_name, String column_name, + String user_name, List group_names) throws MetaException, + TException; + + /** + * @param role_name + * role name + * @param owner_name + * owner name + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean create_role(String role_name, String owner_name, String db_name) + throws MetaException, TException; + + /** + * @param role_name + * role name + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean drop_role(String role_name, String db_name) throws MetaException, TException; + + /** + * @param role_name + * role name + * @param user_name + * user name + * @param is_role + * is the given user name a role name + * @param is_group + * is the given user name a group name + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean add_role_member(String role_name, String user_name, + boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + /** + * @param role_name + * role name + * @param user_name + * user name + * @param is_role + * is the given user name a role + * @param is_group + * is the given group name a group + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean remove_role_member(String role_name, String user_name, + boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + /** + * @param principalName + * @param isRole + * @param isGroup + * @return + * @throws MetaException + * @throws TException + */ + public List list_roles(String principalName, boolean isRole, + boolean isGroup, String db_name) throws MetaException, TException; + + /** + * @param user_name + * user name + * @param is_role + * is the given user name a role + * @param is_group + * is the given user name a group + * @param privileges + * a bag of privilege - including user level, db level, table level, + * and column level + * @param grantor + * the name of the grantor + * @return + * @throws MetaException + * @throws TException + */ + public boolean grant_privileges(String user_name, boolean is_role, + boolean is_group, PrivilegeBag privileges, String grantor) + throws MetaException, TException; + + /** + * @param user_name + * user name + * @param is_role + * is the given user name a role + * @param is_group + * is the given user name a group + * @param privileges + * a bag of privileges + * @return + * @throws MetaException + * @throws TException + */ + public boolean revoke_privileges(String user_name, boolean is_role, + boolean is_group, PrivilegeBag privileges) throws MetaException, + TException; + + /** + * @param user_name + * user name + * @param is_role + * is the given user name a role + * @param is_group + * is the given user name a group + * @param remove_user_priv + * true if need to remove all user level privileges that were + * assigned the the given principal + * @param dbs + * a list of database on which all db level privileges for the given + * principal are going to be remove. + * @param tables + * a list of tables on which all table level privileges for the given + * principal are going to be removed. + * @param parts + * a list of partitions on on which all partition level privileges + * for the given principal are going to be removed. + * @param columns + * a list of columns on on which all column level privileges for the + * given principal are going to be removed. + * @return + * @throws MetaException + * @throws TException + */ + public boolean revoke_all_privileges(String user_name, boolean is_role, + boolean is_group, boolean remove_user_priv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException, TException; + + /** + * @param principla_name + * @param is_role + * @param is_group + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_user_grant(String principla_name, + boolean is_role, boolean is_group) throws MetaException, TException; + + /** + * @param principal_name + * @param is_group + * @param is_role + * @param db_name + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_db_grant(String principal_name, + boolean is_group, boolean is_role, String db_name) throws MetaException, + TException; + + /** + * @param principal_name + * @param is_group + * @param is_role + * @param db_name + * @param table_name + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_table_grant( + String principal_name, boolean is_group, boolean is_role, String db_name, + String table_name) throws MetaException, TException; + + /** + * @param principal_name + * @param is_group + * @param is_role + * @param db_name + * @param table_name + * @param part_name + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_partition_grant( + String principal_name, boolean is_group, boolean is_role, String db_name, + String table_name, String part_name) throws MetaException, TException; + + /** + * @param principal_name + * @param is_group + * @param is_role + * @param db_name + * @param table_name + * @param column_name + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_column_grant(String principal_name, + boolean is_group, boolean is_role, String db_name, String table_name, + String part_name, String column_name) throws MetaException, TException; } Index: metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (revision 1044070) +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (working copy) @@ -44,7 +44,9 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.common.FileUtils; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.ColumnPrivilegeBag; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Index; @@ -53,6 +55,9 @@ import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Order; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; import org.apache.hadoop.hive.metastore.api.SerDeInfo; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; import org.apache.hadoop.hive.metastore.api.Table; @@ -62,6 +67,12 @@ import org.apache.hadoop.hive.metastore.model.MIndex; import org.apache.hadoop.hive.metastore.model.MOrder; import org.apache.hadoop.hive.metastore.model.MPartition; +import org.apache.hadoop.hive.metastore.model.MSecurityColumn; +import org.apache.hadoop.hive.metastore.model.MSecurityDB; +import org.apache.hadoop.hive.metastore.model.MSecurityRoleEntity; +import org.apache.hadoop.hive.metastore.model.MSecurityTablePartition; +import org.apache.hadoop.hive.metastore.model.MSecurityUser; +import org.apache.hadoop.hive.metastore.model.MSecurityUserRoleMap; import org.apache.hadoop.hive.metastore.model.MSerDeInfo; import org.apache.hadoop.hive.metastore.model.MStorageDescriptor; import org.apache.hadoop.hive.metastore.model.MTable; @@ -527,6 +538,51 @@ openTransaction(); MTable mtbl = convertToMTable(tbl); pm.makePersistent(mtbl); + PrincipalPrivilegeSet principalPrivs = tbl.getPrivileges(); + List toPersistPrivObjs = new ArrayList(); + if (principalPrivs != null) { + int now = (int)(System.currentTimeMillis()/1000); + Map userPrivs = principalPrivs.getUserPrivileges(); + if (userPrivs != null) { + for (Map.Entry entry: userPrivs.entrySet()) { + String principalName = entry.getKey(); + String privStr = entry.getValue(); + if (privStr == null) { + continue; + } + MSecurityTablePartition mTblSec = new MSecurityTablePartition( + principalName, false, false, mtbl, null, privStr, now, null); + toPersistPrivObjs.add(mTblSec); + } + } + Map groupPrivs = principalPrivs.getGroupPrivileges(); + if (groupPrivs != null) { + for (Map.Entry entry: groupPrivs.entrySet()) { + String principalName = entry.getKey(); + String privStr = entry.getValue(); + if (privStr == null) { + continue; + } + MSecurityTablePartition mTblSec = new MSecurityTablePartition( + principalName, false, true, mtbl, null, privStr, now, null); + toPersistPrivObjs.add(mTblSec); + } + } + Map rolePrivs = principalPrivs.getRolePrivileges(); + if (rolePrivs != null) { + for (Map.Entry entry: rolePrivs.entrySet()) { + String principalName = entry.getKey(); + String privStr = entry.getValue(); + if (privStr == null) { + continue; + } + MSecurityTablePartition mTblSec = new MSecurityTablePartition( + principalName, true, false, mtbl, null, privStr, now, null); + toPersistPrivObjs.add(mTblSec); + } + } + } + pm.makePersistentAll(toPersistPrivObjs); commited = commitTransaction(); } finally { if (!commited) { @@ -543,6 +599,16 @@ pm.retrieve(tbl); if (tbl != null) { // first remove all the partitions + List tabParts = listMSecurityTablePart(dbName, + tableName, false); + if (tabParts != null && tabParts.size() > 0) { + pm.deletePersistentAll(tabParts); + } + List colGrants = listMSecurityTablePartColumn(dbName, + tableName, false); + if (colGrants != null && colGrants.size() > 0) { + pm.deletePersistentAll(colGrants); + } pm.deletePersistentAll(listMPartitions(dbName, tableName, -1)); // then remove the table pm.deletePersistent(tbl); @@ -555,7 +621,7 @@ } return success; } - + public Table getTable(String dbName, String tableName) throws MetaException { boolean commited = false; Table tbl = null; @@ -791,9 +857,39 @@ boolean success = false; boolean commited = false; try { + List tabGrants = this.listMSecurityTablePart(part + .getDbName(), part.getTableName(), true); + List tabColumnGrants = this.listMSecurityTablePartColumn( + part.getDbName(), part.getTableName(), true); openTransaction(); MPartition mpart = convertToMPart(part); pm.makePersistent(mpart); + + int now = (int)(System.currentTimeMillis()/1000); + List toPersist = new ArrayList(); + if (tabGrants != null) { + for (MSecurityTablePartition tab: tabGrants) { + MSecurityTablePartition partGrant = new MSecurityTablePartition(tab + .getPrincipalName(), tab.getIsRole(), tab.getIsGroup(), tab + .getTable(), mpart, tab.getPrivileges(), now, tab.getGrantor()); + toPersist.add(partGrant); + } + } + + if (tabColumnGrants != null) { + for (MSecurityColumn col : tabColumnGrants) { + MSecurityColumn partColumn = new MSecurityColumn(col + .getPrincipalName(), col.getIsRole(), col.getIsGroup(), col + .getTable(), mpart, col.getColumnName(), col.getPrivileges(), + now, col.getGrantor()); + toPersist.add(partColumn); + } + + if (toPersist.size() > 0) { + pm.makePersistentAll(toPersist); + } + } + commited = commitTransaction(); success = true; } finally { @@ -810,8 +906,31 @@ Partition part = convertToPart(getMPartition(dbName, tableName, part_vals)); commitTransaction(); if(part == null) { - throw new NoSuchObjectException(); + throw new NoSuchObjectException("partition values=" + + part_vals.toString()); + } + return part; + } + + @Override + public Partition getPartitionWithAuth(String dbName, String tblName, + List partVals, String user_name, List group_names) + throws NoSuchObjectException, MetaException, InvalidObjectException { + openTransaction(); + MPartition mpart = getMPartition(dbName, tblName, partVals); + if (mpart == null) { + commitTransaction(); + throw new NoSuchObjectException("partition values=" + partVals.toString()); } + Partition part = null; + MTable mtbl = mpart.getTable(); + part = convertToPart(mpart); + String partName = Warehouse.makePartName(this.convertToFieldSchemas(mtbl + .getPartitionKeys()), partVals); + commitTransaction(); + PrincipalPrivilegeSet partAuth = this.getPartitionPrivilegeSet(dbName, + tblName, partName, user_name, group_names); + part.setPrivileges(partAuth); return part; } @@ -880,6 +999,26 @@ openTransaction(); MPartition part = getMPartition(dbName, tableName, part_vals); if (part != null) { + List schemas = part.getTable().getPartitionKeys(); + List colNames = new ArrayList(); + for (MFieldSchema col: schemas) { + colNames.add(col.getName()); + } + String partName = FileUtils.makePartName(colNames, part_vals); + + List partGrants = listMSecurityPartition( + dbName, tableName, partName); + + if (partGrants != null && partGrants.size() > 0) { + pm.deletePersistentAll(partGrants); + } + + List partColumnGrants = listMSecurityPartitionColumn( + dbName, tableName, partName); + if (partColumnGrants != null && partColumnGrants.size() > 0) { + pm.deletePersistentAll(partColumnGrants); + } + pm.deletePersistent(part); } success = commitTransaction(); @@ -899,6 +1038,29 @@ commitTransaction(); return parts; } + + @Override + public List getPartitionsWithAuth(String dbName, String tblName, + short maxParts, String userName, List groupNames) + throws MetaException, NoSuchObjectException, InvalidObjectException { + openTransaction(); + List mparts = listMPartitions(dbName, tblName, maxParts); + List parts = new ArrayList(mparts.size()); + if (mparts != null && mparts.size()>0) { + for (MPartition mpart : mparts) { + MTable mtbl = mpart.getTable(); + Partition part = convertToPart(mpart); + String partName = Warehouse.makePartName(this.convertToFieldSchemas(mtbl + .getPartitionKeys()), part.getValues()); + PrincipalPrivilegeSet partAuth = this.getPartitionPrivilegeSet(dbName, + tblName, partName, userName, groupNames); + part.setPrivileges(partAuth); + } + } + commitTransaction(); + return parts; + } + private List convertToParts(List mparts) throws MetaException { @@ -1434,4 +1596,1274 @@ } return pns; } + + @Override + public boolean addRole(String roleName, String ownerName, String dbName) + throws InvalidObjectException, MetaException, NoSuchObjectException { + boolean success = false; + boolean commited = false; + try { + openTransaction(); + MDatabase db = this.getMDatabase(dbName); + MSecurityRoleEntity nameCheck = this.getMRole(roleName, dbName); + if (nameCheck != null) { + throw new RuntimeException("Role " + roleName + " already exists."); + } + int now = (int)(System.currentTimeMillis()/1000); + MSecurityRoleEntity mRole = new MSecurityRoleEntity(roleName, now, + ownerName, db); + pm.makePersistent(mRole); + commited = commitTransaction(); + success = true; + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return success; + } + + @Override + public boolean addRoleMember(Role role, String userName, boolean isRole, + boolean isGroup) throws MetaException, NoSuchObjectException { + boolean success = false; + boolean commited = false; + try { + MSecurityUserRoleMap roleMap = null; + try { + roleMap = this.getMSecurityUserRoleMap(userName, isRole, isGroup, role + .getRoleName(), role.getDatabase().getName()); + } catch (Exception e) { + e.printStackTrace(); + } + if (roleMap != null) { + throw new RuntimeException("Principal " + userName + + " already has the role " + role.getRoleName()); + } + openTransaction(); + MSecurityRoleEntity mRole = getMRole(role.getRoleName(), role + .getDatabase().getName()); + long now = System.currentTimeMillis()/1000; + MSecurityUserRoleMap roleMember = new MSecurityUserRoleMap(userName, + isRole, isGroup, mRole, (int) now); + pm.makePersistent(roleMember); + commited = commitTransaction(); + success = true; + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return success; + } + + @Override + public boolean removeRoleMember(Role role, String userName, boolean isRole, + boolean isGroup) throws MetaException, NoSuchObjectException { + boolean success = false; + try { + openTransaction(); + MSecurityUserRoleMap roleMember = getMSecurityUserRoleMap(userName, + isRole, isGroup, role.getRoleName(), role.getDatabase().getName()); + pm.deletePersistent(roleMember); + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return success; + } + + private MSecurityUserRoleMap getMSecurityUserRoleMap(String userName, + boolean isRole, boolean isGroup, String roleName, String dbName) { + MSecurityUserRoleMap mRoleMember = null; + boolean commited = false; + try { + openTransaction(); + Query query = pm.newQuery(MSecurityUserRoleMap.class, "principalName == t1 && isRole==t2 && isGroup == t3 && role.roleName == t4 && role.database.name == t5"); + query.declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5"); + query.setUnique(true); + mRoleMember = (MSecurityUserRoleMap) query.executeWithArray(userName, isRole, isGroup, roleName, dbName); + pm.retrieve(mRoleMember); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return mRoleMember; + } + + @Override + public boolean removeRole(String roleName, String dbName) throws MetaException, + NoSuchObjectException { + boolean success = false; + try { + openTransaction(); + MSecurityRoleEntity mRol = getMRole(roleName, dbName); + pm.retrieve(mRol); + if (mRol != null) { + // first remove all the membership, the membership that this role has + // been granted + List roleMap = listMSecurityUserRoleMember(mRol); + if (roleMap.size() > 0) { + pm.deletePersistentAll(roleMap); + } + List roleMember = listMSecurityPrincipalMembershipRole( + mRol.getRoleName(), true, false); + if (roleMember.size() > 0) { + pm.deletePersistentAll(roleMember); + } + // then remove all the grants + List userGrants = listMSecurityPrincipalUserGrant( + mRol.getRoleName(), true, false); + if (userGrants.size() > 0) { + pm.deletePersistentAll(userGrants); + } + List dbGrants = listAllMSecurityPrincipalDBGrant( + mRol.getRoleName(), true, false); + if (dbGrants.size() > 0) { + pm.deletePersistentAll(dbGrants); + } + List tabPartGrants = listAllMSecurityPrincipalTablePartGrant( + mRol.getRoleName(), true, false); + if (tabPartGrants.size() > 0) { + pm.deletePersistentAll(tabPartGrants); + } + List columnGrants = listAllMSecurityPrincipalColumnGrant( + mRol.getRoleName(), true, false); + if (columnGrants.size() > 0) { + pm.deletePersistentAll(columnGrants); + } + // last remove the role + pm.deletePersistent(mRol); + } + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return success; + } + + private List listRoles(String userName, + List groupNames, String databaseName) { + List ret = new ArrayList(); + if(userName != null) { + ret.addAll(listRoles(userName, false, false, databaseName)); + } + if (groupNames != null) { + for (String groupName: groupNames) { + ret.addAll(listRoles(groupName, false, true, databaseName)); + } + } + return ret; + } + + @SuppressWarnings("unchecked") + public List listRoles(String principalName, + boolean isRole, boolean isGroup, String databaseName) { + boolean success = false; + List mRoleMember = null; + try { + openTransaction(); + LOG.debug("Executing listRoles"); + Query query = pm + .newQuery( + MSecurityUserRoleMap.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && role.database.name == t4"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4"); + query.setUnique(false); + mRoleMember = (List) query.executeWithArray( + principalName, isGroup, isRole, databaseName); + LOG.debug("Done executing query for listMSecurityUserRoleMap"); + pm.retrieveAll(mRoleMember); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityUserRoleMap"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mRoleMember; + } + + + @SuppressWarnings("unchecked") + private List listMSecurityPrincipalMembershipRole(final String roleName, + final boolean isRole, final boolean isGroup) { + boolean success = false; + List mRoleMemebership = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalMembershipRole"); + Query query = pm.newQuery(MSecurityUserRoleMap.class, + "principalName == t1 && isRole == t2 && isGroup == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mRoleMemebership = (List) query.execute(roleName, + isRole, isGroup); + LOG + .debug("Done executing query for listMSecurityPrincipalMembershipRole"); + pm.retrieveAll(mRoleMemebership); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listMSecurityPrincipalMembershipRole"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mRoleMemebership; + } + + public Role getRole(String roleName, String dbName) throws NoSuchObjectException { + MSecurityRoleEntity mRole = this.getMRole(roleName, dbName); + if (mRole == null) { + throw new NoSuchObjectException(roleName + " role can not be found."); + } + Role ret = new Role(mRole.getRoleName(), this.getDatabase(mRole + .getDatabase().getName()), mRole.getCreateTime(), mRole.getOwnerName(), null); + return ret; + } + + private MSecurityRoleEntity getMRole(String roleName, String dbName) { + MSecurityRoleEntity mrole = null; + boolean commited = false; + try { + openTransaction(); + Query query = pm.newQuery(MSecurityRoleEntity.class, "roleName == t1 && database.name == t2"); + query.declareParameters("java.lang.String t1, java.lang.String t2"); + query.setUnique(true); + mrole = (MSecurityRoleEntity) query.execute(roleName, dbName); + pm.retrieve(mrole); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return mrole; + } + + @Override + public PrincipalPrivilegeSet getUserPrivilegeSet(String userName, + List groupNames) throws InvalidObjectException, MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + List user = this.listMSecurityPrincipalUserGrant(userName, false, false); + if(user.size()>0) { + Map userPriv = new HashMap(); + String userPrivStr = user.get(0).getPrivileges(); + for (int i = 1; i < user.size(); i++) { + userPrivStr = userPrivStr + ";" + user.get(i).getPrivileges(); + } + userPriv.put(userName, userPrivStr); + ret.setUserPrivileges(userPriv); + } + } + if (groupNames != null && groupNames.size() > 0) { + Map groupPriv = new HashMap(); + for(String groupName: groupNames) { + List group = this.listMSecurityPrincipalUserGrant(groupName, false, true); + if(group.size()>0) { + String groupPrivStr = group.get(0).getPrivileges(); + for (int i = 1; i < group.size(); i++) { + groupPrivStr = groupPrivStr + ";" + group.get(i).getPrivileges(); + } + groupPriv.put(groupName, groupPrivStr); + } + } + ret.setGroupPrivileges(groupPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, + String userName, List groupNames) throws InvalidObjectException, + MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map userDbPriv = new HashMap(); + userDbPriv.put(userName, getDBPrivilege(dbName, userName, false, false)); + ret.setUserPrivileges(userDbPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map groupDbPriv = new HashMap(); + for (String groupName : groupNames) { + groupDbPriv.put(groupName, getDBPrivilege(dbName, groupName, false, + true)); + } + ret.setGroupPrivileges(groupDbPriv); + } + List roles = listRoles(userName, groupNames, dbName); + if (roles != null && roles.size() > 0) { + Map roleDbPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String name = role.getRole().getRoleName(); + roleDbPriv.put(name, getDBPrivilege(dbName, name, true, false)); + } + ret.setRolePrivileges(roleDbPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public PrincipalPrivilegeSet getPartitionPrivilegeSet(String dbName, + String tableName, String partition, String userName, + List groupNames) throws InvalidObjectException, MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map userPartitionPriv = new HashMap(); + userPartitionPriv.put(userName, getPartitionPrivilege(dbName, + tableName, partition, userName, false, false)); + ret.setUserPrivileges(userPartitionPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map groupPartitionPriv = new HashMap(); + for (String groupName : groupNames) { + groupPartitionPriv.put(groupName, getPartitionPrivilege(dbName, tableName, + partition, groupName, false, true)); + } + ret.setGroupPrivileges(groupPartitionPriv); + } + List roles = listRoles(userName, groupNames, dbName); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + rolePartPriv.put(roleName, getPartitionPrivilege(dbName, tableName, + partition, roleName, true, false)); + } + ret.setRolePrivileges(rolePartPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public PrincipalPrivilegeSet getTablePrivilegeSet(String dbName, + String tableName, String userName, List groupNames) + throws InvalidObjectException, MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map userPartitionPriv = new HashMap(); + userPartitionPriv.put(userName, getTablePrivilege(dbName, + tableName, userName, false, false)); + ret.setUserPrivileges(userPartitionPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map groupPartitionPriv = new HashMap(); + for (String groupName : groupNames) { + groupPartitionPriv.put(groupName, getTablePrivilege(dbName, tableName, + groupName, false, true)); + } + ret.setGroupPrivileges(groupPartitionPriv); + } + List roles = listRoles(userName, groupNames, dbName); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + rolePartPriv.put(roleName, getTablePrivilege(dbName, tableName, + roleName, true, false)); + } + ret.setRolePrivileges(rolePartPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public PrincipalPrivilegeSet getColumnPrivilegeSet(String dbName, + String tableName, String partitionName, String columnName, + String userName, List groupNames) throws InvalidObjectException, + MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map userPartitionPriv = new HashMap(); + userPartitionPriv.put(userName, getColumnPrivilege(dbName, tableName, + columnName, partitionName, userName, false, false)); + ret.setUserPrivileges(userPartitionPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map groupPartitionPriv = new HashMap(); + for (String groupName : groupNames) { + groupPartitionPriv.put(groupName, getColumnPrivilege(dbName, + tableName, columnName, partitionName, groupName, false, true)); + } + ret.setGroupPrivileges(groupPartitionPriv); + } + List roles = listRoles(userName, groupNames, dbName); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + rolePartPriv.put(roleName, getColumnPrivilege(dbName, tableName, + columnName, partitionName, roleName, true, false)); + } + ret.setRolePrivileges(rolePartPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public boolean grantPrivileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges, String grantor) + throws InvalidObjectException, MetaException, NoSuchObjectException { + boolean committed = false; + int now = (int)(System.currentTimeMillis()/1000); + try { + openTransaction(); + List persistentObjs = new ArrayList(); + + String userPrivs = privileges.getUserPrivileges(); + if (userPrivs != null) { + MSecurityUser mDb = new MSecurityUser(userName, isRole, isGroup, + userPrivs, now, grantor); + persistentObjs.add(mDb); + } + + Map dbPrivs = privileges.getDbPrivileges(); + if (dbPrivs != null) { + for (Map.Entry db : dbPrivs.entrySet()) { + MDatabase dbObj = getMDatabase(db.getKey().getName()); + if (dbObj != null) { + MSecurityDB mDb = new MSecurityDB(userName, isRole, isGroup, dbObj, + db.getValue(), now, grantor); + persistentObjs.add(mDb); + } + } + } + + Map tablePriv = privileges.getTablePrivileges(); + if (tablePriv != null) { + for (Map.Entry table : tablePriv.entrySet()) { + MTable tblObj = getMTable(table.getKey().getDbName(), table.getKey() + .getTableName()); + if (tblObj != null) { + MSecurityTablePartition mTab = new MSecurityTablePartition( + userName, isRole, isGroup, tblObj, null, table.getValue(), now, + grantor); + persistentObjs.add(mTab); + } + } + } + + Map partitionPriv = privileges.getPartitionPrivileges(); + if (partitionPriv != null) { + for (Map.Entry part : partitionPriv.entrySet()) { + Partition partObj = part.getKey(); + MPartition tblObj = this.getMPartition(partObj.getDbName(), partObj + .getTableName(), partObj.getValues()); + if (tblObj != null) { + MSecurityTablePartition mTab = new MSecurityTablePartition( + userName, isRole, isGroup, tblObj.getTable(), tblObj, part + .getValue(), now, grantor); + persistentObjs.add(mTab); + } + } + } + + List columnPriv = privileges.getColumnPrivileges(); + if (columnPriv != null) { + for (ColumnPrivilegeBag col : columnPriv) { + Map columnMap = col.getColumnPrivileges(); + MTable tblObj = getMTable(col.getDbName(), col.getTableName()); + if (columnMap != null && tblObj != null) { + for (Map.Entry colPriv : columnMap.entrySet()) { + MSecurityColumn mCol = new MSecurityColumn(userName, isRole, + isGroup, tblObj, null, colPriv.getKey(), colPriv.getValue(), now, + grantor); + persistentObjs.add(mCol); + } + } + } + } + if (persistentObjs.size() > 0) { + pm.makePersistentAll(persistentObjs); + } + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + return committed; + } + + public boolean revokeAllPrivileges(String userName, boolean isRole, + boolean isGroup, boolean removeUserPriv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException { + boolean committed = false; + try { + openTransaction(); + List persistentObjs = new ArrayList(); + if (removeUserPriv) { + List mSecUser = this.listMSecurityPrincipalUserGrant( + userName, isRole, isGroup); + if (mSecUser != null) { + persistentObjs.addAll(persistentObjs); + } + } + + if (dbs != null) { + for (Database db : dbs) { + List dbGrants = this.listMSecurityPrincipalDBGrant( + userName, isGroup, isRole, db.getName()); + persistentObjs.addAll(dbGrants); + } + } + + if(tables != null) { + for (Table tab : tables) { + List tabGrants = + this.listMSecurityPrincipalTableGrant(userName, isGroup, isRole, + tab.getDbName(), tab.getTableName()); + persistentObjs.addAll(tabGrants); + } + } + + if(parts != null) { + for (Partition part : parts) { + Table tabObj = this.getTable(part.getDbName(), part.getTableName()); + List partGrants = this + .listMSecurityPrincipalPartitionGrant(userName, isGroup, isRole, + part.getDbName(), part.getTableName(), + Warehouse.makePartName(tabObj.getPartitionKeys(), part.getValues())); + persistentObjs.addAll(partGrants); + } + } + + if(columns != null) { + for (Map.Entry> tableColMap : columns.entrySet()){ + Table table = tableColMap.getKey(); + List colList = tableColMap.getValue(); + for(String col : colList) { + List secCol = this.listMSecurityPrincipalTableColumnGrant(userName, isGroup, isRole, + table.getDbName(), table.getTableName(), col, false); + persistentObjs.addAll(secCol); + } + } + } + + if (persistentObjs.size() > 0) { + pm.deletePersistentAll(persistentObjs); + } + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + return committed; + } + + + @Override + public boolean revokePrivileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges) throws InvalidObjectException, + MetaException { + boolean committed = false; + try { + openTransaction(); + List persistentObjs = new ArrayList(); + String userPriv = privileges.getUserPrivileges(); + if (userPriv != null && !userPriv.trim().equals("")) { + List mSecUser = this.listMSecurityPrincipalUserGrant( + userName, isRole, isGroup); + boolean found = false; + if (mSecUser != null) { + String[] userPrivArray = userPriv.split(","); + for (MSecurityUser userGrant : mSecUser) { + String[] userGrantArray = userGrant.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(userPrivArray, userGrantArray)) { + found = true; + persistentObjs.add(userGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException( + "No user grant found for privileges " + userPriv); + } + } + } + + Map dbPrivileges = privileges.getDbPrivileges(); + if (dbPrivileges != null) { + for (Map.Entry dbPriv : dbPrivileges.entrySet()) { + Database db = dbPriv.getKey(); + String dbPrivStr = dbPriv.getValue(); + boolean found = false; + String[] dbPrivArray = dbPrivStr.split(","); + List dbGrants = this.listMSecurityPrincipalDBGrant( + userName, isGroup, isRole, db.getName()); + for (MSecurityDB dbGrant : dbGrants) { + String[] privStrArray = dbGrant.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(dbPrivArray, privStrArray)) { + found = true; + persistentObjs.add(dbGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException( + "No database grant found for privileges " + dbPrivStr + + " on database " + db.getName()); + } + } + } + + Map tablePrivileges = privileges.getTablePrivileges(); + if (tablePrivileges != null) { + for (Map.Entry tabPriv : tablePrivileges.entrySet()) { + Table table = tabPriv.getKey(); + String tblPrivStr = tabPriv.getValue(); + boolean found = false; + String[] tablePrivArray = tblPrivStr.split(","); + List tableGrants = + this.listMSecurityPrincipalTableGrant(userName, isGroup, isRole, + table.getDbName(), table.getTableName()); + for (MSecurityTablePartition tabGrant : tableGrants) { + String[] privStrArray = tabGrant.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(privStrArray, tablePrivArray)) { + found = true; + persistentObjs.add(tabGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + tblPrivStr + + ") found " + " on table " + table.getTableName() + + ", database is " + table.getDbName()); + } + } + } + + Map partPrivileges = privileges + .getPartitionPrivileges(); + if (partPrivileges != null) { + for (Map.Entry partPriv : partPrivileges.entrySet()) { + Partition part = partPriv.getKey(); + String partPrivStr = partPriv.getValue(); + boolean found = false; + String[] partPrivArray = partPrivStr.split(","); + Table tabObj = this.getTable(part.getDbName(), part.getTableName()); + List partitionGrants = this + .listMSecurityPrincipalPartitionGrant(userName, isGroup, isRole, + part.getDbName(), part.getTableName(), + Warehouse.makePartName(tabObj.getPartitionKeys(), part + .getValues())); + for (MSecurityTablePartition tabGrant : partitionGrants) { + String[] privStrArray = tabGrant.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(privStrArray, partPrivArray)) { + found = true; + persistentObjs.add(tabGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + partPrivStr + + ") found " + " on table " + tabObj.getTableName() + + ", database is " + tabObj.getDbName()); + } + } + } + + List columnPrivileges = privileges + .getColumnPrivileges(); + if (columnPrivileges != null) { + for (ColumnPrivilegeBag colPriv : columnPrivileges) { + String dbName = colPriv.getDbName(); + String tabName = colPriv.getTableName(); + String partName = colPriv.getPartitionName(); + Map colPrivMap = colPriv.getColumnPrivileges(); + for (Map.Entry column : colPrivMap.entrySet()) { + List mSecCol = listMSecurityTabOrPartColumnGrant(userName, + isRole, isGroup, dbName, tabName, partName, column.getKey()); + boolean found = false; + if (mSecCol != null) { + String[] toBeMatched = column.getValue().split(","); + for (MSecurityColumn col : mSecCol) { + String[] candicate = col.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(candicate, toBeMatched)) { + found = true; + persistentObjs.add(col); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + column + + ") found " + " on column " + column.getKey() + " table " + + tabName + ", database is " + dbName); + } + } + } + } + } + if (persistentObjs.size() > 0) { + pm.deletePersistentAll(persistentObjs); + } + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + return committed; + } + + private boolean stringArrayEqualsIgnoreOrder(String[] o1, String[] o2) { + if (o1 == o2) { + return true; + } + if (o1 != null && o2 != null) { + for (int i = 0; i < o1.length; i++) { + boolean found = false; + for (int j = 0; j < o2.length; j++) { + if (o1[i].equalsIgnoreCase(o2[j])) { + found = true; + break; + } + } + + if (!found) { + return false; + } + } + return true; + } else { + return false; + } + } + + public String getDBPrivilege(String dbName, + String principalName, boolean isRole, boolean isGroup) + throws InvalidObjectException, MetaException { + String privileges = null; + if (principalName != null) { + List userNameDbPriv = this.listMSecurityPrincipalDBGrant( + principalName, isGroup, isRole, dbName); + if (userNameDbPriv != null && userNameDbPriv.size() > 0) { + privileges = userNameDbPriv.get(0).getPrivileges(); + for (int i = 1; i < userNameDbPriv.size(); i++) { + privileges = privileges + "," + + userNameDbPriv.get(i).getPrivileges(); + } + } + } + return privileges; + } + + private String getTablePrivilege(String dbName, String tableName, + String principalName, boolean isRole, boolean isGroup) { + String privileges = null; + if (principalName != null) { + List userNameTabPartPriv = this + .listMSecurityPrincipalTableGrant(principalName, isGroup, isRole, + dbName, tableName); + if (userNameTabPartPriv != null && userNameTabPartPriv.size() > 0) { + privileges = userNameTabPartPriv.get(0).getPrivileges(); + for (int i = 1; i < userNameTabPartPriv.size(); i++) { + privileges = privileges + "," + + userNameTabPartPriv.get(i).getPrivileges(); + } + } + } + return privileges; + } + + private String getPartitionPrivilege(String dbName, String tableName, + String partName, String principalName, boolean isRole, boolean isGroup) { + String privileges = null; + if (principalName != null) { + List userNameTabPartPriv = this + .listMSecurityPrincipalPartitionGrant(principalName, isGroup, isRole, + dbName, tableName, partName); + if (userNameTabPartPriv != null && userNameTabPartPriv.size() > 0) { + privileges = userNameTabPartPriv.get(0).getPrivileges(); + for (int i = 1; i < userNameTabPartPriv.size(); i++) { + privileges = privileges + "," + + userNameTabPartPriv.get(i).getPrivileges(); + } + } + } + return privileges; + } + + private String getColumnPrivilege(String dbName, String tableName, + String columnName, String partitionName, String principalName, boolean isRole, boolean isGroup) { + String privileges = null; + List userNameTabPartPriv = null; + if (partitionName == null) { + userNameTabPartPriv = this.listMSecurityPrincipalTableColumnGrant( + principalName, isGroup, isRole, dbName, tableName, columnName, true); + } else { + userNameTabPartPriv = this.listMSecurityPrincipalPartitionColumnGrant( + principalName, isGroup, isRole, dbName, tableName, partitionName, + columnName); + } + if (userNameTabPartPriv != null && userNameTabPartPriv.size() > 0) { + privileges = userNameTabPartPriv.get(0).getPrivileges(); + for (int i = 1; i < userNameTabPartPriv.size(); i++) { + privileges = privileges + "," + + userNameTabPartPriv.get(i).getPrivileges(); + } + } + return privileges; + } + + @SuppressWarnings("unchecked") + private List listMSecurityUserRoleMember( + MSecurityRoleEntity mRol) { + boolean success = false; + List mRoleMemeberList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityUserRoleMember"); + Query query = pm.newQuery(MSecurityUserRoleMap.class, + "role.roleName == t1"); + query.declareParameters("java.lang.String t1"); + query.setUnique(false); + mRoleMemeberList = (List) query.execute( + mRol.getRoleName()); + LOG.debug("Done executing query for listMSecurityUserRoleMember"); + pm.retrieveAll(mRoleMemeberList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityUserRoleMember"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mRoleMemeberList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalUserGrant(String principlaName, + boolean isRole, boolean isGroup) { + boolean commited = false; + List userNameDbPriv = null; + try { + openTransaction(); + if (principlaName != null) { + Query query = pm.newQuery(MSecurityUser.class, + "principalName == t1 && isRole == t2 && isGroup== t3"); + query.declareParameters( + "java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + userNameDbPriv = (List) query + .executeWithArray(principlaName, isRole, isGroup); + pm.retrieveAll(userNameDbPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return userNameDbPriv; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalDBGrant(String principalName, + boolean isGroup, boolean isRole, String dbName) { + boolean success = false; + List mSecurityDBList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalDBGrant"); + Query query = pm.newQuery(MSecurityDB.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && database.name == t4"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4"); + mSecurityDBList = (List) query.executeWithArray(principalName, + isGroup, isRole, dbName); + LOG.debug("Done executing query for listMSecurityPrincipalDBGrant"); + pm.retrieveAll(mSecurityDBList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityPrincipalDBGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityDBList; + } + + @SuppressWarnings("unchecked") + private List listAllMSecurityPrincipalDBGrant(String principalName, + boolean isGroup, boolean isRole) { + boolean success = false; + List mSecurityDBList = null; + try { + openTransaction(); + LOG.debug("Executing listAllMSecurityPrincipalDBGrant"); + Query query = pm.newQuery(MSecurityDB.class, + "principalName == t1 && isGroup == t2 && isRole == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mSecurityDBList = (List) query.execute(principalName, + isGroup, isRole); + LOG.debug("Done executing query for listAllMSecurityPrincipalDBGrant"); + pm.retrieveAll(mSecurityDBList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listAllMSecurityPrincipalDBGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityDBList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityTablePart(String dbName, + String tableName, boolean tableOnly) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityTable"); + String queryStr = "table.tableName == t1 && table.database.name == t2"; + if (tableOnly) { + queryStr = queryStr + " && partition == null"; + } + Query query = pm.newQuery( + MSecurityTablePartition.class, queryStr); + query.declareParameters( + "java.lang.String t1, java.lang.String t2"); + mSecurityTabPartList = (List) query + .executeWithArray(tableName, dbName); + LOG.debug("Done executing query for listMSecurityTable"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listMSecurityTable"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityTablePartColumn(String dbName, + String tableName, boolean tableOnly) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityTablePartColumn"); + String queryStr = "table.tableName == t1 && table.database.name == t2"; + if (tableOnly) { + queryStr = queryStr + " && partition == null"; + } + Query query = pm.newQuery(MSecurityColumn.class, queryStr); + query.declareParameters("java.lang.String t1, java.lang.String t2"); + mSecurityColList = (List) query + .executeWithArray(tableName, dbName); + LOG.debug("Done executing query for listMSecurityTablePartColumn"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityTablePartColumn"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + private List listMSecurityPartition(String dbName, String tableName, + String partName) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityTablePartition"); + Query query = pm.newQuery(MSecurityTablePartition.class, + "table.tableName == t1 && table.database.name == t2 && partition.partitionName == t3"); + query.declareParameters( + "java.lang.String t1, java.lang.String t2, java.lang.String t3"); + mSecurityTabPartList = (List) query + .executeWithArray(tableName, dbName, partName); + LOG.debug("Done executing query for listMSecurityTablePartition"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityTablePartition"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPartitionColumn(String dbName, + String tableName, String partName) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPartitionColumn"); + Query query = pm.newQuery( + MSecurityColumn.class, + "table.tableName == t1 && table.database.name == t2 && partition.partitionName == t3"); + query.declareParameters( + "java.lang.String t1, java.lang.String t2, java.lang.String t3"); + mSecurityColList = (List) query + .executeWithArray(tableName, dbName, partName); + LOG.debug("Done executing query for listMSecurityPartitionColumn"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityPartitionColumn"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalTableGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalTableGrant"); + Query query = pm.newQuery( + MSecurityTablePartition.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && table.tableName == t4 && table.database.name == t5 && partition == null"); + query.declareParameters( + "java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5"); + mSecurityTabPartList = (List) query + .executeWithArray(principalName, isGroup, isRole, tableName, dbName); + LOG.debug("Done executing query for listMSecurityPrincipalTableGrant"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listMSecurityPrincipalTableGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalPartitionGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalPartitionGrant"); + Query query = pm.newQuery( + MSecurityTablePartition.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && table.tableName == t4 " + + "&& table.database.name == t5 && partition.partitionName == t6"); + query.declareParameters( + "java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5, java.lang.String t6"); + mSecurityTabPartList = (List) query + .executeWithArray(principalName, isGroup, isRole, tableName, dbName, partName); + LOG.debug("Done executing query for listMSecurityPrincipalPartitionGrant"); + + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityPrincipalPartitionGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + private List listAllMSecurityPrincipalTablePartGrant( + String principalName, boolean isGroup, boolean isRole) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listAllMSecurityPrincipalTablePartGrant"); + Query query = pm.newQuery(MSecurityTablePartition.class, + "principalName == t1 && isGroup == t2 && isRole == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mSecurityTabPartList = (List) query.execute( + principalName, isGroup, isRole); + LOG.debug("Done executing query for listAllMSecurityPrincipalTablePartGrant"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listAllMSecurityPrincipalTablePartGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + public List listMSecurityTabOrPartColumnGrant(String userName, + boolean isRole, boolean isGroup, String dbName, String tabName, + String partName, String columnName) { + List mSecCol = null; + if (partName != null) { + mSecCol = this.listMSecurityPrincipalPartitionColumnGrant(userName, + isGroup, isRole, dbName, tabName, partName, columnName); + } else { + mSecCol = this.listMSecurityPrincipalTableColumnGrant(userName, isGroup, + isRole, dbName, tabName, columnName, true); + } + return mSecCol; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalTableColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String columnName, boolean tableOnly) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalColumnGrant"); + String queryStr = "principalName == t1 && isGroup == t2 && isRole == t3 && " + + "table.tableName == t4 && table.database.name == t5 && columnName == t6 "; + if (tableOnly) { + queryStr = queryStr + " && partition == null"; + } + Query query = pm.newQuery(MSecurityColumn.class, queryStr); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5, java.lang.String t6"); + mSecurityColList = (List) query.executeWithArray( + principalName, isGroup, isRole, tableName, dbName, columnName); + LOG.debug("Done executing query for listMSecurityPrincipalColumnGrant"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listMSecurityPrincipalColumnGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalPartitionColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partitionName, String columnName) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalPartitionColumnGrant"); + Query query = pm.newQuery( + MSecurityColumn.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && table.tableName == t4 && table.database.name == t5 && " + + "partition.partitionName == t6 && columnName == t7"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5, java.lang.String t6, java.lang.String t7"); + + mSecurityColList = (List) query.executeWithArray( + principalName, isGroup, isRole, tableName, dbName, partitionName, + columnName); + LOG.debug("Done executing query for listMSecurityPrincipalPartitionColumnGrant"); + pm.retrieveAll(mSecurityColList); + + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityPrincipalPartitionColumnGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + private List listAllMSecurityPrincipalColumnGrant( + String principalName, boolean isGroup, boolean isRole) { + boolean success = false; + List mSecurityColumnList = null; + try { + openTransaction(); + LOG.debug("Executing listAllMSecurityPrincipalColumnGrant"); + Query query = pm.newQuery(MSecurityColumn.class, + "principalName == t1 && isGroup == t2 && isRole == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mSecurityColumnList = (List) query.execute( + principalName, isGroup, isRole); + LOG.debug("Done executing query for listAllMSecurityPrincipalColumnGrant"); + pm.retrieveAll(mSecurityColumnList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listAllMSecurityPrincipalColumnGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColumnList; + } + } Index: metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (revision 1044070) +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (working copy) @@ -19,6 +19,7 @@ package org.apache.hadoop.hive.metastore; import java.util.List; +import java.util.Map; import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.hive.metastore.api.Database; @@ -27,8 +28,16 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.Type; +import org.apache.hadoop.hive.metastore.model.MSecurityColumn; +import org.apache.hadoop.hive.metastore.model.MSecurityDB; +import org.apache.hadoop.hive.metastore.model.MSecurityTablePartition; +import org.apache.hadoop.hive.metastore.model.MSecurityUser; +import org.apache.hadoop.hive.metastore.model.MSecurityUserRoleMap; public interface RawStore extends Configurable { @@ -131,5 +140,82 @@ public abstract List getPartitionsByFilter( String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException; + + public abstract boolean addRole(String rowName, String ownerName, + String dbName) throws InvalidObjectException, MetaException, + NoSuchObjectException; + + public abstract boolean removeRole(String roleName, String dbName) throws MetaException, NoSuchObjectException; + + public abstract boolean addRoleMember(Role role, String userName, boolean isRole, boolean isGroup) + throws MetaException, NoSuchObjectException; + + public abstract boolean removeRoleMember(Role role, String userName, boolean isRole, boolean isGroup) + throws MetaException, NoSuchObjectException; + public abstract PrincipalPrivilegeSet getUserPrivilegeSet(String userName, + List groupNames) throws InvalidObjectException, MetaException; + + public abstract PrincipalPrivilegeSet getDBPrivilegeSet (String dbName, String userName, + List groupNames) throws InvalidObjectException, MetaException; + + public abstract PrincipalPrivilegeSet getTablePrivilegeSet (String dbName, String tableName, + String userName, List groupNames) throws InvalidObjectException, MetaException; + + public abstract PrincipalPrivilegeSet getPartitionPrivilegeSet (String dbName, String tableName, + String partition, String userName, List groupNames) throws InvalidObjectException, MetaException; + + public abstract PrincipalPrivilegeSet getColumnPrivilegeSet (String dbName, String tableName, String partitionName, + String columnName, String userName, List groupNames) throws InvalidObjectException, MetaException; + + public abstract List listMSecurityPrincipalUserGrant(String principlaName, + boolean isRole, boolean isGroup); + + public abstract List listMSecurityPrincipalDBGrant(String principalName, + boolean isGroup, boolean isRole, String dbName); + + public abstract List listMSecurityPrincipalTableGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName); + + public abstract List listMSecurityPrincipalPartitionGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName); + + public List listMSecurityTabOrPartColumnGrant(String userName, + boolean isRole, boolean isGroup, String dbName, String tabName, + String partName, String column); + + public abstract List listMSecurityPrincipalTableColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String columnName, boolean tableOnly); + + public abstract List listMSecurityPrincipalPartitionColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName, String columnName); + + public abstract boolean grantPrivileges (String userName, boolean isRole, boolean isGroup, PrivilegeBag privileges, String grantor) + throws InvalidObjectException, MetaException, NoSuchObjectException; + + public abstract boolean revokePrivileges (String userName, boolean isRole, boolean isGroup, PrivilegeBag privileges) + throws InvalidObjectException, MetaException; + + public abstract org.apache.hadoop.hive.metastore.api.Role getRole(String roleName, String dbName) throws NoSuchObjectException; + + public List listRoles(String principalName, + boolean isRole, boolean isGroup, String databaseName); + + public boolean revokeAllPrivileges(String userName, boolean isRole, + boolean isGroup, boolean removeUserPriv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException; + + public abstract Partition getPartitionWithAuth(String dbName, String tblName, + List partVals, String user_name, List group_names) + throws MetaException, NoSuchObjectException, InvalidObjectException; + + public abstract List getPartitionsWithAuth(String dbName, + String tblName, short maxParts, String userName, List groupNames) + throws MetaException, NoSuchObjectException, InvalidObjectException;; + } Index: metastore/src/model/package.jdo =================================================================== --- metastore/src/model/package.jdo (revision 1044070) +++ metastore/src/model/package.jdo (working copy) @@ -357,5 +357,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityColumn.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityColumn.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityColumn.java (revision 0) @@ -0,0 +1,180 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityColumn { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MTable table; + + private MPartition partition; + + private String columnName; + + private String privileges; + + private int createTime; + + private String grantor; + + public MSecurityColumn() { + } + + /** + * @param principalName + * @param isRole + * @param isGroup + * @param table + * @param partition + * @param columnName + * @param privileges + * @param createTime + * @param grantor + */ + public MSecurityColumn(String principalName, boolean isRole, boolean isGroup, + MTable table, MPartition partition, String columnName, String privileges, int createTime, + String grantor) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.table = table; + this.partition = partition; + this.columnName = columnName; + this.privileges = privileges; + this.createTime = createTime; + this.grantor = grantor; + } + + /** + * @return true if this user name is a role + */ + public boolean getIsRole() { + return isRole; + } + + /** + * @param isRole is this user name a role? + */ + public void setIsRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return true if this user name is a group, false else + */ + public boolean getIsGroup() { + return isGroup; + } + + /** + * @param isGroup true if is this user name a group + */ + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return column name + */ + public String getColumnName() { + return columnName; + } + + /** + * @param columnName column name + */ + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + /** + * @return a set of privileges this user/role/group has + */ + public String getPrivileges() { + return privileges; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivileges(String dbPrivileges) { + this.privileges = dbPrivileges; + } + + /** + * @return create time + */ + public int getCreateTime() { + return createTime; + } + + /** + * @param createTime create time + */ + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public MTable getTable() { + return table; + } + + public void setTable(MTable table) { + this.table = table; + } + + public MPartition getPartition() { + return partition; + } + + public void setPartition(MPartition partition) { + this.partition = partition; + } + + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityDB.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityDB.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityDB.java (revision 0) @@ -0,0 +1,140 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityDB { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MDatabase database; + + private int createTime; + + private String privileges; + + private String grantor; + + public MSecurityDB() { + } + + public MSecurityDB(String principalName, boolean isRole, boolean isGroup, + MDatabase database, String dbPrivileges, int createTime, String grantor) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.database = database; + this.privileges = dbPrivileges; + this.createTime = createTime; + this.grantor = grantor; + } + + /** + * @return user name, role name, or group name + */ + public String getPrincipalName() { + return principalName; + } + + /** + * @param userName user/role/group name + */ + public void setPrincipalName(String userName) { + this.principalName = userName; + } + + /** + * @return true if this user name is a role + */ + public boolean getIsRole() { + return isRole; + } + + /** + * @param isRole is this user name a role? + */ + public void setIsRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return true if this user name is a group, false else + */ + public boolean getIsGroup() { + return isGroup; + } + + /** + * @param isGroup is this user name a group + */ + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return a set of privileges this user/role/group has + */ + public String getPrivileges() { + return privileges; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivileges(String dbPrivileges) { + this.privileges = dbPrivileges; + } + + public MDatabase getDatabase() { + return database; + } + + public void setDatabase(MDatabase database) { + this.database = database; + } + + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + public int getCreateTime() { + return createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityRoleEntity.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityRoleEntity.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityRoleEntity.java (revision 0) @@ -0,0 +1,96 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityRoleEntity { + + private String roleName; + + private int createTime; + + private String ownerName; + + private MDatabase database; + + public MSecurityRoleEntity() { + } + + public MSecurityRoleEntity(String roleName, int createTime, String ownerName, + MDatabase database) { + super(); + this.roleName = roleName; + this.createTime = createTime; + this.ownerName = ownerName; + this.database = database; + } + + /** + * @return role name + */ + public String getRoleName() { + return roleName; + } + + /** + * @param roleName + */ + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + /** + * @return create time + */ + public int getCreateTime() { + return createTime; + } + + /** + * @param createTime + * role create time + */ + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + /** + * @return the principal name who created this role + */ + public String getOwnerName() { + return ownerName; + } + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + /** + * @return the database this role belongs to + */ + public MDatabase getDatabase() { + return database; + } + + /** + * @param database + */ + public void setDatabase(MDatabase database) { + this.database = database; + } +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityTablePartition.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityTablePartition.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityTablePartition.java (revision 0) @@ -0,0 +1,158 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityTablePartition { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MTable table; + + private MPartition partition; + + private String privileges; + + private int createTime; + + private String grantor; + + public MSecurityTablePartition() { + } + + public MSecurityTablePartition(String principalName, boolean isRole, + boolean isGroup, MTable table, MPartition partition, String privileges, + int createTime, String grantor) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.table = table; + this.partition = partition; + this.privileges = privileges; + this.createTime = createTime; + this.grantor = grantor; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + /** + * @return true if this user name is a role + */ + public boolean getIsRole() { + return isRole; + } + + /** + * @param isRole is this user name a role? + */ + public void setIsRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return true if this user name is a group, false else + */ + public boolean getIsGroup() { + return isGroup; + } + + /** + * @param isGroup true if is this user name a group + */ + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return a set of privileges this user/role/group has + */ + public String getPrivileges() { + return privileges; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivileges(String dbPrivileges) { + this.privileges = dbPrivileges; + } + + /** + * @return create time + */ + public int getCreateTime() { + return createTime; + } + + /** + * @param createTime create time + */ + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + /** + * @return + */ + public String getGrantor() { + return grantor; + } + + /** + * @param grantor + */ + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + public MTable getTable() { + return table; + } + + public void setTable(MTable table) { + this.table = table; + } + + public MPartition getPartition() { + return partition; + } + + public void setPartition(MPartition partition) { + this.partition = partition; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUser.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUser.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUser.java (revision 0) @@ -0,0 +1,128 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +/** + * User global level privileges + */ +public class MSecurityUser { + + //principal name, can be a user, group, or role + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private String privileges; + + private int createTime; + + private String grantor; + + public MSecurityUser() { + super(); + } + + public MSecurityUser(String userName, boolean isRole, boolean isGroup, + String dbPrivileges, int createTime, String grantor) { + super(); + this.principalName = userName; + this.isRole = isRole; + this.isGroup = isGroup; + this.privileges = dbPrivileges; + this.createTime = createTime; + this.grantor = grantor; + } + + /** + * @return is this user name a role name? + */ + public boolean getIsRole() { + return isRole; + } + + /** + * @param isRole this user name is a role name? + */ + public void setIsRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return is this user name a group name? + */ + public boolean getIsGroup() { + return isGroup; + } + + /** + * @param isGroup this user name a group name + */ + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return a set of global privileges granted to this user + */ + public String getPrivileges() { + return privileges; + } + + /** + * @param dbPrivileges set of global privileges to user + */ + public void setPrivileges(String dbPrivileges) { + this.privileges = dbPrivileges; + } + + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public int getCreateTime() { + return createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUserRoleMap.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUserRoleMap.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUserRoleMap.java (revision 0) @@ -0,0 +1,110 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityUserRoleMap { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MSecurityRoleEntity role; + + private int addTime; + + public MSecurityUserRoleMap() { + } + + public MSecurityUserRoleMap(String principalName, boolean isRole, + boolean isGroup, MSecurityRoleEntity role, int addTime) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.role = role; + this.addTime = addTime; + } + + /** + * @return principal name + */ + public String getPrincipalName() { + return principalName; + } + + /** + * @param userName principal name + */ + public void setPrincipalName(String userName) { + this.principalName = userName; + } + + /** + * @return is role + */ + public boolean isRole() { + return isRole; + } + + /** + * @param isRole + */ + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return is group + */ + public boolean isGroup() { + return isGroup; + } + + /** + * @param isGroup + */ + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return add time + */ + public int getAddTime() { + return addTime; + } + + /** + * @param addTime + */ + public void setAddTime(int addTime) { + this.addTime = addTime; + } + + public MSecurityRoleEntity getRole() { + return role; + } + + public void setRole(MSecurityRoleEntity role) { + this.role = role; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/Driver.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/Driver.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/Driver.java (working copy) @@ -49,6 +49,7 @@ import org.apache.hadoop.hive.ql.exec.ExecDriver; import org.apache.hadoop.hive.ql.exec.FetchTask; import org.apache.hadoop.hive.ql.exec.Operator; +import org.apache.hadoop.hive.ql.exec.TableScanOperator; import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.exec.TaskFactory; import org.apache.hadoop.hive.ql.exec.TaskResult; @@ -69,22 +70,29 @@ import org.apache.hadoop.hive.ql.lockmgr.HiveLockObject; import org.apache.hadoop.hive.ql.lockmgr.HiveLockObject.HiveLockObjectData; import org.apache.hadoop.hive.ql.lockmgr.LockException; +import org.apache.hadoop.hive.ql.metadata.AuthorizationException; import org.apache.hadoop.hive.ql.metadata.DummyPartition; +import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.metadata.HiveUtils; import org.apache.hadoop.hive.ql.metadata.Partition; import org.apache.hadoop.hive.ql.metadata.Table; +import org.apache.hadoop.hive.ql.optimizer.ppr.PartitionPruner; import org.apache.hadoop.hive.ql.parse.ASTNode; import org.apache.hadoop.hive.ql.parse.AbstractSemanticAnalyzerHook; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.ErrorMsg; import org.apache.hadoop.hive.ql.parse.HiveSemanticAnalyzerHookContext; import org.apache.hadoop.hive.ql.parse.HiveSemanticAnalyzerHookContextImpl; +import org.apache.hadoop.hive.ql.parse.ParseContext; import org.apache.hadoop.hive.ql.parse.ParseDriver; import org.apache.hadoop.hive.ql.parse.ParseException; import org.apache.hadoop.hive.ql.parse.ParseUtils; +import org.apache.hadoop.hive.ql.parse.PrunedPartitionList; +import org.apache.hadoop.hive.ql.parse.SemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.SemanticAnalyzerFactory; import org.apache.hadoop.hive.ql.parse.SemanticException; +import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.hadoop.hive.ql.parse.VariableSubstitution; import org.apache.hadoop.hive.ql.plan.TableDesc; import org.apache.hadoop.hive.ql.processors.CommandProcessor; @@ -375,8 +383,20 @@ if (plan.getFetchTask() != null) { plan.getFetchTask().initialize(conf, plan, null); } + + //do the authorization check + if (HiveConf.getBoolVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_ENABLED)) { + try { + doAuthorization(sem); + } catch (AuthorizationException authExp) { + console.printError("Authrization failed:" + authExp.getMessage() + + ". Use show grant to get more details."); + return 403; + } + } - return (0); + return 0; } catch (SemanticException e) { errorMessage = "FAILED: Error in semantic analysis: " + e.getMessage(); SQLState = ErrorMsg.findSQLState(e.getMessage()); @@ -398,6 +418,138 @@ } } + private boolean doAuthorization(BaseSemanticAnalyzer sem) + throws HiveException, AuthorizationException { + HashSet inputs = sem.getInputs(); + HashSet outputs = sem.getOutputs(); + SessionState ss = SessionState.get(); + HiveOperation op = ss.getHiveOperation(); + Hive db = sem.getDb(); + boolean pass = true; + if (op != null) { + if (op.equals(HiveOperation.CREATETABLE_AS_SELECT) + || op.equals(HiveOperation.CREATETABLE)) { + pass = ss.getAuthorizer().authorize( + db.getDatabase(db.getCurrentDatabase()), null, + HiveOperation.CREATETABLE_AS_SELECT.getOutputRequiredPrivileges()); + } + if (outputs != null && outputs.size() > 0) { + for (WriteEntity write : outputs) { + + if (write.getType() == WriteEntity.Type.PARTITION) { + Partition part = db.getPartition(write.getTable(), write + .getPartition().getSpec(), false); + if (part != null) { + pass = pass + && ss.getAuthorizer().authorize(write.getPartition(), null, + op.getOutputRequiredPrivileges()); + continue; + } + } + + if (write.getTable() != null) { + pass = pass + && ss.getAuthorizer().authorize(write.getTable(), null, + op.getOutputRequiredPrivileges()); + } + + if (!pass) { + break; + } + } + + } + } + + if (pass && inputs != null && inputs.size() > 0) { + + Map> tab2Cols = new HashMap>(); + Map> part2Cols = new HashMap>(); + + for (ReadEntity read : inputs) { + boolean part = read.getPartition() != null; + if (part) { + part2Cols.put(read.getPartition(), new ArrayList()); + } else { + tab2Cols.put(read.getTable(), new ArrayList()); + } + } + + if (op.equals(HiveOperation.CREATETABLE_AS_SELECT) + || op.equals(HiveOperation.QUERY)) { + SemanticAnalyzer querySem = (SemanticAnalyzer) sem; + ParseContext parseCtx = querySem.getParseContext(); + Map tsoTopMap = parseCtx.getTopToTable(); + + for (Map.Entry> topOpMap : querySem + .getParseContext().getTopOps().entrySet()) { + Operator topOp = topOpMap.getValue(); + if (topOp instanceof TableScanOperator + && tsoTopMap.containsKey(topOp)) { + TableScanOperator tableScanOp = (TableScanOperator) topOp; + Table tbl = tsoTopMap.get(tableScanOp); + List neededColumnIds = tableScanOp.getNeededColumnIDs(); + List columns = tbl.getCols(); + List cols = new ArrayList(); + if (neededColumnIds != null && neededColumnIds.size() > 0) { + for (int i = 0; i < neededColumnIds.size(); i++) { + cols.add(columns.get(neededColumnIds.get(i)).getName()); + } + } else { + for (int i = 0; i < columns.size(); i++) { + cols.add(columns.get(i).getName()); + } + } + if (tbl.isPartitioned()) { + String alias_id = topOpMap.getKey(); + PrunedPartitionList partsList = PartitionPruner.prune(parseCtx + .getTopToTable().get(topOp), parseCtx.getOpToPartPruner() + .get(topOp), parseCtx.getConf(), alias_id, parseCtx + .getPrunedPartitions()); + Set parts = new HashSet(); + parts.addAll(partsList.getConfirmedPartns()); + parts.addAll(partsList.getUnknownPartns()); + for (Partition part : parts) { + part2Cols.put(part, cols); + } + } else { + tab2Cols.put(tbl, cols); + } + } + } + } + + for (ReadEntity read : inputs) { + if (read.getPartition() != null) { + List cols = part2Cols.get(read.getPartition()); + if (cols != null && cols.size() > 0) { + pass = pass + && ss.getAuthorizer().authorize(read.getPartition().getTable(), + read.getPartition(), cols, op.getInputRequiredPrivileges(), + null); + } else { + pass = pass + && ss.getAuthorizer().authorize(read.getPartition(), + op.getInputRequiredPrivileges(), null); + } + } else if (read.getTable() != null) { + List cols = tab2Cols.get(read.getTable()); + if (cols != null && cols.size() > 0) { + pass = pass + && ss.getAuthorizer().authorize(read.getTable(), null, cols, + op.getInputRequiredPrivileges(), null); + } else { + pass = pass + && ss.getAuthorizer().authorize(read.getTable(), + op.getInputRequiredPrivileges(), null); + } + } + } + + } + return pass; + } + /** * @return The current query plan associated with this Driver, if any. */ @@ -755,8 +907,6 @@ boolean noName = StringUtils.isEmpty(conf.getVar(HiveConf.ConfVars.HADOOPJOBNAME)); int maxlen = conf.getIntVar(HiveConf.ConfVars.HIVEJOBNAMELENGTH); - int curJobNo = 0; - String queryId = plan.getQueryId(); String queryStr = plan.getQueryStr(); Index: ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (working copy) @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -56,6 +57,7 @@ import org.apache.hadoop.hive.metastore.TableType; import org.apache.hadoop.hive.metastore.Warehouse; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; +import org.apache.hadoop.hive.metastore.api.ColumnPrivilegeBag; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Index; @@ -63,6 +65,13 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Order; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; +import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.ql.Context; import org.apache.hadoop.hive.ql.DriverContext; import org.apache.hadoop.hive.ql.QueryPlan; @@ -99,10 +108,18 @@ import org.apache.hadoop.hive.ql.plan.DropDatabaseDesc; import org.apache.hadoop.hive.ql.plan.DropIndexDesc; import org.apache.hadoop.hive.ql.plan.DropTableDesc; +import org.apache.hadoop.hive.ql.plan.GrantDesc; +import org.apache.hadoop.hive.ql.plan.GrantRevokeRoleDDL; import org.apache.hadoop.hive.ql.plan.LockTableDesc; import org.apache.hadoop.hive.ql.plan.MsckDesc; +import org.apache.hadoop.hive.ql.plan.PrincipalDesc; +import org.apache.hadoop.hive.ql.plan.PrivilegeDesc; +import org.apache.hadoop.hive.ql.plan.PrivilegeObjectDesc; +import org.apache.hadoop.hive.ql.plan.RevokeDesc; +import org.apache.hadoop.hive.ql.plan.RoleDDLDesc; import org.apache.hadoop.hive.ql.plan.ShowDatabasesDesc; import org.apache.hadoop.hive.ql.plan.ShowFunctionsDesc; +import org.apache.hadoop.hive.ql.plan.ShowGrantDesc; import org.apache.hadoop.hive.ql.plan.ShowIndexesDesc; import org.apache.hadoop.hive.ql.plan.ShowLocksDesc; import org.apache.hadoop.hive.ql.plan.ShowPartitionsDesc; @@ -111,6 +128,7 @@ import org.apache.hadoop.hive.ql.plan.SwitchDatabaseDesc; import org.apache.hadoop.hive.ql.plan.UnlockTableDesc; import org.apache.hadoop.hive.ql.plan.api.StageType; +import org.apache.hadoop.hive.ql.security.authorization.Privilege; import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.Deserializer; import org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe; @@ -121,6 +139,7 @@ import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.hive.shims.HadoopShims; import org.apache.hadoop.hive.shims.ShimLoader; +import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.ToolRunner; /** * DDLTask implementation. @@ -295,7 +314,33 @@ if (showParts != null) { return showPartitions(db, showParts); } - + + RoleDDLDesc roleDDLDesc = work.getRoleDDLDesc(); + if (roleDDLDesc != null) { + return roleDDL(roleDDLDesc); + } + + GrantDesc grantDesc = work.getGrantDesc(); + if (grantDesc != null) { + return grantOrRevokePrivileges(grantDesc.getPrincipals(), grantDesc.getPrivileges(), grantDesc.getPrivilegeSubjectDesc(), true); + } + + RevokeDesc revokeDesc = work.getRevokeDesc(); + if (revokeDesc != null) { + return grantOrRevokePrivileges(revokeDesc.getPrincipals(), revokeDesc + .getPrivileges(), revokeDesc.getPrivilegeSubjectDesc(), false); + } + + ShowGrantDesc showGrantDesc = work.getShowGrantDesc(); + if (showGrantDesc != null) { + return showGrants(showGrantDesc); + } + + GrantRevokeRoleDDL grantOrRevokeRoleDDL = work.getGrantRevokeRoleDDL(); + if (grantOrRevokeRoleDDL != null) { + return grantOrRevokeRole(grantOrRevokeRoleDDL); + } + ShowIndexesDesc showIndexes = work.getShowIndexesDesc(); if (showIndexes != null) { return showIndexes(db, showIndexes); @@ -319,6 +364,385 @@ return 0; } + private int grantOrRevokeRole(GrantRevokeRoleDDL grantOrRevokeRoleDDL) + throws HiveException { + try { + boolean grantRole = grantOrRevokeRoleDDL.getGrant(); + List principals = grantOrRevokeRoleDDL.getPrincipalDesc(); + List roles = grantOrRevokeRoleDDL.getRoles(); + for (PrincipalDesc principal : principals) { + String userName = principal.getName(); + boolean isRole = principal.getType() == PrincipalDesc.PrincipalType.ROLE; + boolean isGroup = principal.getType() == PrincipalDesc.PrincipalType.GROUP; + for (String roleName : roles) { + if (grantRole) { + db.addRoleMember(roleName, userName, isRole, isGroup); + } else { + db.removeRoleMember(roleName, userName, isRole, isGroup); + } + } + } + } catch (Exception e) { + e.printStackTrace(); + throw new HiveException(e); + } + return 0; + } + + private int showGrants(ShowGrantDesc showGrantDesc) throws HiveException { + try { + Path resFile = new Path(showGrantDesc.getResFile()); + FileSystem fs = resFile.getFileSystem(conf); + DataOutput outStream = fs.create(resFile); + PrincipalDesc principalDesc = showGrantDesc.getPrincipalDesc(); + boolean isGroup = (principalDesc.getType()== PrincipalDesc.PrincipalType.GROUP); + boolean isRole = (principalDesc.getType()== PrincipalDesc.PrincipalType.ROLE); + PrivilegeObjectDesc hiveObjectDesc = showGrantDesc.getHiveObj(); + String principalName = principalDesc.getName(); + if (hiveObjectDesc == null) { + //show user level privileges + List users = db.showUserLevelGrant(principalName, + isGroup, isRole); + if (users != null && users.size() > 0) { + boolean first = true; + for(SecurityUser usr: users) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, null, null, null, null, + usr.getPrivileges(), usr.getCreateTime(), usr.getGrantor()); + + } + } + } else { + String obj = hiveObjectDesc.getObject(); + boolean notFound = true; + String dbName = null; + String tableName = null; + Table tableObj = null; + Database dbObj = null; + + if (hiveObjectDesc.getTable()) { + String[] dbTab = obj.split("\\."); + if (dbTab.length == 2) { + dbName = dbTab[0]; + tableName = dbTab[1]; + } else { + dbName = db.getCurrentDatabase(); + tableName = obj; + } + dbObj = db.getDatabase(dbName); + tableObj = db.getTable(dbName, tableName); + notFound = (dbObj == null || tableObj == null); + } else { + dbName = hiveObjectDesc.getObject(); + dbObj = db.getDatabase(dbName); + notFound = (dbObj == null); + } + if (notFound) { + throw new HiveException(obj + " can not be found"); + } + + String partName = null; + if (hiveObjectDesc.getPartSpec() != null) { + partName = Warehouse + .makePartName(hiveObjectDesc.getPartSpec(), false); + } + + if (!hiveObjectDesc.getTable()) { + // show database level privileges + List dbs = db.showDBLevelGrant(principalName, isGroup, + isRole, dbName); + if (dbs != null && dbs.size() > 0) { + boolean first = true; + for(SecurityDB db: dbs) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, dbName, null, null, null, + db.getPrivileges(), db.getCreateTime(), db.getGrantor()); + + } + } + + } else { + if (showGrantDesc.getColumns() != null) { + // show column level privileges + for (String columnName : showGrantDesc.getColumns()) { + List columnss = db.showColumnGrant(principalName, + isGroup, isRole, dbName, tableName, partName, columnName); + if (columnss != null && columnss.size() > 0) { + boolean first = true; + for (SecurityColumn col : columnss) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, dbName, tableName, partName, columnName, + col.getPrivileges(), col.getCreateTime(), col.getGrantor()); + } + } + } + } else if (hiveObjectDesc.getPartSpec() != null) { + // show partition level privileges + List parts = db.showPartitionGrant(principalName, + isGroup, isRole, dbName, tableName, partName); + if (parts != null && parts.size() > 0) { + boolean first = true; + for(SecurityTablePartition part: parts) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, dbName, tableName, partName, null, + part.getPrivileges(), part.getCreateTime(), part.getGrantor()); + + } + } + } + else { + // show table level privileges + List tbls = db.showTableLevelGrant( + principalName, isGroup, isRole, dbName, tableName); + if (tbls!= null && tbls.size() > 0) { + boolean first = true; + for(SecurityTablePartition tbl: tbls) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, dbName, tableName, null, null, + tbl.getPrivileges(), tbl.getCreateTime(), tbl.getGrantor()); + + } + } + } + } + } + ((FSDataOutputStream) outStream).close(); + } catch (FileNotFoundException e) { + LOG.info("show table status: " + stringifyException(e)); + return 1; + } catch (IOException e) { + LOG.info("show table status: " + stringifyException(e)); + return 1; + } catch (Exception e) { + e.printStackTrace(); + throw new HiveException(e); + } + return 0; + } + + private int grantOrRevokePrivileges(List principals, + List privileges, PrivilegeObjectDesc privSubjectDesc, + boolean grant) { + if (privileges == null || privileges.size() == 0) { + console.printError("No privilege found."); + return 1; + } + + String dbName = null; + String tableName = null; + Table tableObj = null; + Database dbObj = null; + + try { + + if (privSubjectDesc != null) { + if (privSubjectDesc.getPartSpec() != null && grant) { + throw new HiveException("Grant does not support partition level."); + } + String obj = privSubjectDesc.getObject(); + boolean notFound = true; + if (privSubjectDesc.getTable()) { + String[] dbTab = obj.split("\\."); + if (dbTab.length == 2) { + dbName = dbTab[0]; + tableName = dbTab[1]; + } else { + dbName = db.getCurrentDatabase(); + tableName = obj; + } + dbObj = db.getDatabase(dbName); + tableObj = db.getTable(dbName, tableName); + notFound = (dbObj == null || tableObj == null); + } else { + dbName = privSubjectDesc.getObject(); + dbObj = db.getDatabase(dbName); + notFound = (dbObj == null); + } + if (notFound) { + throw new HiveException(obj + " can not be found"); + } + } + + PrivilegeBag privBag = new PrivilegeBag(); + String userPrivs = ""; + if (privSubjectDesc == null) { + boolean first = true; + for (int idx = 0; idx < privileges.size(); idx++) { + Privilege priv = privileges.get(idx).getPrivilege(); + if (privileges.get(idx).getColumns() != null + && privileges.get(idx).getColumns().size() > 0) { + throw new HiveException( + "For user-level privielges, column sets should be null. columns=" + + privileges.get(idx).getColumns().toString()); + } + if (!first) { + userPrivs = userPrivs + StringUtils.COMMA; + } else { + first = false; + } + userPrivs = userPrivs + priv.getPriv(); + } + privBag.setUserPrivileges(userPrivs); + } else { + List columnPrivBags = new ArrayList(); + Map dbPrivs = new HashMap(); + Map tabPrivs = new HashMap(); + Map partPrivs = new HashMap(); + org.apache.hadoop.hive.metastore.api.Partition partObj = null; + + if ((!tableObj.isPartitioned()) + && privSubjectDesc.getPartSpec() != null) { + throw new HiveException( + "Table is partitioned, but partition spec found. partSpec=" + + privSubjectDesc.getPartSpec().toString()); + } + + String partName = null; + if (privSubjectDesc.getPartSpec() != null) { + partObj = db.getPartition(tableObj, privSubjectDesc.getPartSpec(), false).getTPartition(); + partName = Warehouse.makePartName(tableObj.getPartCols(), + partObj.getValues()); + } + + for (PrivilegeDesc privDesc : privileges) { + List columns = privDesc.getColumns(); + Privilege priv = privDesc.getPrivilege(); + if (columns != null && columns.size() > 0) { + if (!priv.supportColumnLevel()) { + throw new HiveException(priv.getPriv() + + " does not support column level."); + } + if (privSubjectDesc == null || tableName == null) { + throw new HiveException( + "For user-level/database-level privielges, column sets should be null. columns=" + + columns); + } + Map columnPrivileges = new HashMap(); + for (int i = 0; i < columns.size(); i++) { + columnPrivileges.put(columns.get(i), priv.getPriv()); + } + ColumnPrivilegeBag columnPrivBag = new ColumnPrivilegeBag(dbName, + tableName, partName, columnPrivileges); + columnPrivBags.add(columnPrivBag); + } else { + if (privSubjectDesc.getTable()) { + if (privSubjectDesc.getPartSpec() != null && !grant) { + partPrivs.put(partObj, priv.getPriv()); + } else { + tabPrivs.put(tableObj.getTTable(), priv.getPriv()); + } + } else { + dbPrivs.put(dbObj, priv.getPriv()); + } + } + } + + if (columnPrivBags.size() > 0) { + privBag.setColumnPrivileges(columnPrivBags); + } + if (tabPrivs.size() > 0) { + privBag.setTablePrivileges(tabPrivs); + } + + if (partPrivs != null && partPrivs.size() > 0) { + privBag.setPartitionPrivileges(partPrivs); + } + if (dbPrivs.size() > 0) { + privBag.setDbPrivileges(dbPrivs); + } + } + + for (PrincipalDesc principal : principals) { + boolean isRole = (principal.getType() == PrincipalDesc.PrincipalType.ROLE); + boolean isGroup = (principal.getType() == PrincipalDesc.PrincipalType.GROUP); + if (grant) { + db + .grantPrivileges(principal.getName(), isRole, isGroup, privBag, + ""); + } else { + db + .revokePrivileges(principal.getName(), isRole, isGroup, privBag, + ""); + } + } + } catch (Exception e) { + console.printError("Error: " + e.getMessage()); + return 1; + } + + return 0; + } + + private int roleDDL(RoleDDLDesc roleDDLDesc) { + RoleDDLDesc.RoleOperation operation = roleDDLDesc.getOperation(); + try { + if (operation.equals(RoleDDLDesc.RoleOperation.CREATE_ROLE)) { + db.createRole(roleDDLDesc.getName()); + } else if (operation.equals(RoleDDLDesc.RoleOperation.DROP_ROLE)) { + db.dropRole(roleDDLDesc.getName()); + } else if (operation.equals(RoleDDLDesc.RoleOperation.SHOW_ROLE_GRANT)) { + List roles = db.showRoleGrant(roleDDLDesc.getName(), + roleDDLDesc.getRole(), roleDDLDesc.getGroup()); + if (roles != null && roles.size() > 0) { + Path resFile = new Path(roleDDLDesc.getResFile()); + FileSystem fs = resFile.getFileSystem(conf); + DataOutput outStream = fs.create(resFile); + for (Role role : roles) { + outStream.writeBytes("role name:" + role.getRoleName()); + outStream.write(terminator); + outStream.writeBytes("database:" + role.getDatabase().getName()); + outStream.write(terminator); + } + ((FSDataOutputStream) outStream).close(); + } + } else { + throw new HiveException("Unkown role operation " + + operation.getOperationName()); + } + } catch (HiveException e) { + e.printStackTrace(); + console.printError("Error in role operation " + + operation.getOperationName() + " on role name " + + roleDDLDesc.getName() + ", error message " + e.getMessage()); + return 1; + } catch (IOException e) { + LOG.info("role ddl exception: " + stringifyException(e)); + return 1; + } + + return 0; + } + private int dropIndex(Hive db, DropIndexDesc dropIdx) throws HiveException { db.dropIndex(db.getCurrentDatabase(), dropIdx.getTableName(), dropIdx.getIndexName(), true); @@ -407,7 +831,7 @@ Partition part = db .getPartition(tbl, addPartitionDesc.getPartSpec(), false); - work.getOutputs().add(new WriteEntity(part)); + work.getOutputs().add(new WriteEntity(part, true)); return 0; } @@ -438,7 +862,7 @@ throw new HiveException("Uable to update table"); } work.getInputs().add(new ReadEntity(tbl)); - work.getOutputs().add(new WriteEntity(tbl)); + work.getOutputs().add(new WriteEntity(tbl, true)); } else { Partition part = db.getPartition(tbl, touchDesc.getPartSpec(), false); if (part == null) { @@ -450,7 +874,7 @@ throw new HiveException(e); } work.getInputs().add(new ReadEntity(part)); - work.getOutputs().add(new WriteEntity(part)); + work.getOutputs().add(new WriteEntity(part, true)); } return 0; } @@ -1865,6 +2289,43 @@ return 0; } + + public static void writeGrantInfor(DataOutput outStream, boolean isGroup, + boolean isRole, String principalName, String dbName, String tableName, + String partName, String columnName, String privileges, int createTime, + String grantor) throws IOException { + + if (dbName != null) { + writeKeyValuePair(outStream, "database", dbName); + } + if (tableName != null) { + writeKeyValuePair(outStream, "table", tableName); + } + if (partName != null) { + writeKeyValuePair(outStream, "partition", partName); + } + if (columnName != null) { + writeKeyValuePair(outStream, "columnName", columnName); + } + + writeKeyValuePair(outStream, "userName", principalName); + writeKeyValuePair(outStream, "isRole", "" + isRole); + writeKeyValuePair(outStream, "isGroup", "" + isGroup); + writeKeyValuePair(outStream, "privileges", privileges); + writeKeyValuePair(outStream, "grantTime", "" + createTime); + if (grantor != null) { + writeKeyValuePair(outStream, "grantor", grantor); + } + } + + private static void writeKeyValuePair(DataOutput outStream, String key, + String value) throws IOException { + outStream.write(terminator); + outStream.writeBytes(key); + outStream.write(separator); + outStream.writeBytes(value); + outStream.write(separator); + } private void writeFileSystemStats(DataOutput outStream, List locations, Path tabLoc, boolean partSpecified, int indent) throws IOException { Index: ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java (working copy) @@ -174,7 +174,7 @@ .getTableName(), tbd.getReplace(), new Path(tbd.getTmpDir()), tbd.getHoldDDLTime()); if (work.getOutputs() != null) { - work.getOutputs().add(new WriteEntity(table)); + work.getOutputs().add(new WriteEntity(table, true)); } } else { LOG.info("Partition is: " + tbd.getPartitionSpec().toString()); @@ -210,7 +210,7 @@ for (LinkedHashMap partSpec: dp) { Partition partn = db.getPartition(table, partSpec, false); - WriteEntity enty = new WriteEntity(partn); + WriteEntity enty = new WriteEntity(partn, true); if (work.getOutputs() != null) { work.getOutputs().add(enty); } @@ -243,7 +243,7 @@ dc = new DataContainer(table.getTTable(), partn.getTPartition()); // add this partition to post-execution hook if (work.getOutputs() != null) { - work.getOutputs().add(new WriteEntity(partn)); + work.getOutputs().add(new WriteEntity(partn, true)); } } } Index: ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java (working copy) @@ -233,7 +233,7 @@ reportProgress(); numMapRowsRead++; - + // the big table has reached a new key group. try to let the small tables // catch up with the big table. if (nextKeyGroup) { Index: ql/src/java/org/apache/hadoop/hive/ql/metadata/AuthorizationException.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/metadata/AuthorizationException.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/AuthorizationException.java (revision 0) @@ -0,0 +1,55 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.metadata; + +public class AuthorizationException extends RuntimeException { + /** + */ + private static final long serialVersionUID = 1L; + + public AuthorizationException() { + super(); + } + + /** + * Constructs an {@link AuthorizationException} with the specified detail + * message. + * + * @param s + * the detail message. + */ + public AuthorizationException(String message) { + super(message); + } + + /** + * Constructs an {@link AuthorizationException} with the specified cause. + * + * @param cause + * the cause + */ + public AuthorizationException(Throwable cause) { + super(cause); + } + + + public AuthorizationException(String message, Throwable cause) { + super(message, cause); + } +} Index: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (working copy) @@ -58,13 +58,24 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Index; +import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Order; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.SerDeInfo; +import org.apache.hadoop.hive.metastore.model.MSecurityUser; import org.apache.hadoop.hive.ql.exec.Utilities; import org.apache.hadoop.hive.ql.index.HiveIndexHandler; +import org.apache.hadoop.hive.ql.session.CreateTableAutomaticGrant; +import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.serde2.Deserializer; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; @@ -86,7 +97,7 @@ private HiveConf conf = null; private IMetaStoreClient metaStoreClient; private String currentDatabase; - + private static ThreadLocal hiveDB = new ThreadLocal() { @Override protected synchronized Object initialValue() { @@ -432,7 +443,28 @@ if (tbl.getParameters() != null) { tbl.getParameters().remove(Constants.DDL_TIME); } - getMSC().createTable(tbl.getTTable()); + org.apache.hadoop.hive.metastore.api.Table tTbl = tbl.getTTable(); + PrincipalPrivilegeSet principalPrivs = new PrincipalPrivilegeSet(); + SessionState ss = SessionState.get(); + CreateTableAutomaticGrant grants = ss.getCreateTableGrants(); + if (grants!= null) { + principalPrivs.setUserPrivileges(grants.getUserGrants()); + principalPrivs.setGroupPrivileges(grants.getGroupGrants()); + principalPrivs.setRolePrivileges(grants.getRoleGrants()); + String ownerGrant = grants.getOwnerGrants(); + if (ss.getAuthenticator() != null && ownerGrant != null) { + if (principalPrivs.getUserPrivileges() == null) { + Map userPrivs = new HashMap(); + userPrivs.put(ss.getAuthenticator().getUserName(), ownerGrant); + principalPrivs.setUserPrivileges(userPrivs); + } else { + principalPrivs.getUserPrivileges().put( + ss.getAuthenticator().getUserName(), ownerGrant); + } + } + tTbl.setPrivileges(principalPrivs); + } + getMSC().createTable(tTbl); } catch (AlreadyExistsException e) { if (!ifNotExists) { throw new HiveException(e); @@ -763,7 +795,7 @@ } catch (NoSuchObjectException e) { if (throwException) { LOG.error(StringUtils.stringifyException(e)); - throw new InvalidTableException("Table not found ", tableName); + throw new InvalidTableException("Table " + tableName + " not found ", tableName); } return null; } catch (Exception e) { @@ -903,6 +935,39 @@ } } + public boolean grantPrivileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges, String grantor) + throws HiveException { + try { + return getMSC().grant_privileges(userName, isRole, isGroup, privileges, + grantor); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param userName + * principal name + * @param isRole + * is the given principal name a role + * @param isGroup + * is the given principal name a group + * @param privileges + * a bag of privileges + * @return + * @throws HiveException + */ + public boolean revokePrivileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges, String grantor) + throws HiveException { + try { + return getMSC().revoke_privileges(userName, isRole, isGroup, privileges); + } catch (Exception e) { + throw new HiveException(e); + } + } + /** * Query metadata to see if a database with the given name already exists. * @@ -1180,7 +1245,8 @@ } org.apache.hadoop.hive.metastore.api.Partition tpart = null; try { - tpart = getMSC().getPartition(tbl.getDbName(), tbl.getTableName(), pvals); + tpart = getMSC().getPartitionWithAuthInfo(tbl.getDbName(), + tbl.getTableName(), pvals, getUserName(), getGroupNames()); } catch (NoSuchObjectException nsoe) { // this means no partition exists for the given partition // key value pairs - thrift cannot handle null return values, hence @@ -1272,8 +1338,8 @@ if (tbl.isPartitioned()) { List tParts; try { - tParts = getMSC().listPartitions(tbl.getDbName(), tbl.getTableName(), - (short) -1); + tParts = getMSC().listPartitionsWithAuthInfo(tbl.getDbName(), tbl.getTableName(), + (short) -1, getUserName(), getGroupNames()); } catch (Exception e) { LOG.error(StringUtils.stringifyException(e)); throw new HiveException(e); @@ -1325,8 +1391,8 @@ List partitions = null; try { - partitions = getMSC().listPartitions(tbl.getDbName(), tbl.getTableName(), - partialPvals, (short) -1); + partitions = getMSC().listPartitionsWithAuthInfo(tbl.getDbName(), tbl.getTableName(), + partialPvals, (short) -1, getUserName(), getGroupNames()); } catch (Exception e) { throw new HiveException(e); } @@ -1396,6 +1462,218 @@ public void setCurrentDatabase(String currentDatabase) { this.currentDatabase = currentDatabase; } + + public void createRole(String roleName) throws HiveException { + try { + getMSC().create_role(roleName, "", this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public void dropRole(String roleName) throws HiveException { + try { + getMSC().drop_role(roleName, this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showRoleGrant(String principalName, boolean isRole, + boolean isGroup) throws HiveException { + try { + return getMSC().list_roles(principalName, isRole, isGroup, this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public boolean addRoleMember(String roleName, String userName, + boolean isRole, boolean isGroup) throws HiveException { + try { + return getMSC().add_role_member(roleName, userName, isRole, isGroup, + this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public boolean removeRoleMember(String roleName, String userName, + boolean isRole, boolean isGroup) throws HiveException { + try { + return getMSC().remove_role_member(roleName, userName, isRole, isGroup, + this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List listRoles(String userName, boolean isRole, boolean isGroup) + throws HiveException { + try { + return getMSC().list_roles(userName, isRole, isGroup, this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showUserLevelGrant(String principalName, + boolean isRole, boolean isGroup) throws HiveException { + try { + return getMSC().list_security_user_grant(principalName, isRole, isGroup); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_user_privilege_set(String user_name, + List group_names) throws HiveException { + try { + return getMSC().get_user_privilege_set(user_name, group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param db_name + * database name + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_db_privilege_set(String db_name, + String user_name, List group_names) throws HiveException { + try { + return getMSC().get_db_privilege_set(db_name, user_name, group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param db_name + * db name + * @param table_name + * table name + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_table_privilege_set(String db_name, + String table_name, String user_name, List group_names) + throws HiveException{ + try { + return getMSC().get_table_privilege_set(db_name, table_name, user_name, + group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param db_name + * db name + * @param table_name + * table name + * @param part_name + * partition name + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_partition_privilege_set(String db_name, + String table_name, String part_name, String user_name, + List group_names) throws HiveException { + try { + return getMSC().get_partition_privilege_set(db_name, table_name, part_name, user_name, + group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param db_name + * database name + * @param table_name + * table name + * @param part_name + * partition name + * @param column_name + * column name + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_column_privilege_set(String db_name, + String table_name, String part_name, String column_name, + String user_name, List group_names) throws HiveException { + try { + return getMSC().get_column_privilege_set(db_name, table_name, part_name, + column_name, user_name, group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showDBLevelGrant(String principalName, + boolean isGroup, boolean isRole, String dbName) throws HiveException { + try { + return getMSC().list_security_db_grant(principalName, isGroup, isRole, + dbName); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showTableLevelGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName) throws HiveException { + try { + return getMSC().list_security_table_grant(principalName, isGroup, + isRole, dbName, tableName); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showPartitionGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName) throws HiveException { + try { + return getMSC().list_security_partition_grant(principalName, isGroup, + isRole, dbName, tableName, partName); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showColumnGrant(String principal_name, + boolean isGroup, boolean isRole, String dbName, String tableName, + String partName, String columnName) throws HiveException { + try { + return getMSC().list_security_column_grant(principal_name, isGroup, + isRole, dbName, tableName, partName, columnName); + } catch (Exception e) { + throw new HiveException(e); + } + } static private void checkPaths(FileSystem fs, FileStatus[] srcs, Path destf, boolean replace) throws HiveException { @@ -1636,6 +1914,22 @@ } return metaStoreClient; } + + private String getUserName() { + SessionState ss = SessionState.get(); + if (ss != null && ss.getAuthenticator() != null) { + return ss.getAuthenticator().getUserName(); + } + return null; + } + + private List getGroupNames() { + SessionState ss = SessionState.get(); + if (ss != null && ss.getAuthenticator() != null) { + return ss.getAuthenticator().getGroupNames(); + } + return null; + } public static List getFieldsFromDeserializer(String name, Deserializer serde) throws HiveException { Index: ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (working copy) @@ -71,7 +71,7 @@ protected Context ctx; protected HashMap idToTableNameMap; - + public static int HIVE_COLUMN_ORDER_ASC = 1; public static int HIVE_COLUMN_ORDER_DESC = 0; @@ -719,4 +719,8 @@ } return partSpec; } + + public Hive getDb() { + return db; + } } Index: ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (working copy) @@ -71,6 +71,13 @@ import org.apache.hadoop.hive.ql.plan.AlterTableSimpleDesc; import org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc; import org.apache.hadoop.hive.ql.plan.CreateIndexDesc; +import org.apache.hadoop.hive.ql.plan.GrantDesc; +import org.apache.hadoop.hive.ql.plan.GrantRevokeRoleDDL; +import org.apache.hadoop.hive.ql.plan.PrincipalDesc; +import org.apache.hadoop.hive.ql.plan.PrivilegeDesc; +import org.apache.hadoop.hive.ql.plan.PrivilegeObjectDesc; +import org.apache.hadoop.hive.ql.plan.RevokeDesc; +import org.apache.hadoop.hive.ql.plan.RoleDDLDesc; import org.apache.hadoop.hive.ql.plan.DDLWork; import org.apache.hadoop.hive.ql.plan.DescDatabaseDesc; import org.apache.hadoop.hive.ql.plan.DescFunctionDesc; @@ -83,6 +90,7 @@ import org.apache.hadoop.hive.ql.plan.MsckDesc; import org.apache.hadoop.hive.ql.plan.ShowDatabasesDesc; import org.apache.hadoop.hive.ql.plan.ShowFunctionsDesc; +import org.apache.hadoop.hive.ql.plan.ShowGrantDesc; import org.apache.hadoop.hive.ql.plan.ShowIndexesDesc; import org.apache.hadoop.hive.ql.plan.ShowLocksDesc; import org.apache.hadoop.hive.ql.plan.ShowPartitionsDesc; @@ -91,6 +99,10 @@ import org.apache.hadoop.hive.ql.plan.SwitchDatabaseDesc; import org.apache.hadoop.hive.ql.plan.TableDesc; import org.apache.hadoop.hive.ql.plan.UnlockTableDesc; +import org.apache.hadoop.hive.ql.plan.AlterTableDesc.AlterTableTypes; +import org.apache.hadoop.hive.ql.security.authorization.Privilege; +import org.apache.hadoop.hive.ql.security.authorization.PrivilegeRegistry; +import org.apache.hadoop.hive.ql.plan.AlterIndexDesc.AlterIndexTypes; import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.mapred.TextInputFormat; @@ -254,11 +266,236 @@ analyzeDropDatabase(ast); } else if (ast.getToken().getType() == TOK_SWITCHDATABASE) { analyzeSwitchDatabase(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_CREATEROLE) { + analyzeCreateRole(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_DROPROLE) { + analyzeDropRole(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_SHOW_ROLE_GRANT) { + ctx.setResFile(new Path(ctx.getLocalTmpFileURI())); + analyzeShowRoleGrant(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_GRANT_ROLE) { + anaylzeGrantRevokeRole(true, ast); + } else if (ast.getToken().getType() == HiveParser.TOK_REVOKE_ROLE) { + anaylzeGrantRevokeRole(false, ast); + } else if (ast.getToken().getType() == HiveParser.TOK_GRANT) { + analyzeGrant(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_SHOW_GRANT) { + ctx.setResFile(new Path(ctx.getLocalTmpFileURI())); + analyzeShowGrant(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_REVOKE) { + analyzeRevoke(ast); } else { throw new SemanticException("Unsupported command."); } } + private void anaylzeGrantRevokeRole(boolean grant, ASTNode ast) { + List principalDesc = analyzePrinciplaListDef( + (ASTNode) ast.getChild(0)); + List roles = new ArrayList(); + for (int i = 1; i < ast.getChildCount(); i++) { + roles.add(unescapeIdentifier(ast.getChild(i).getText())); + } + + GrantRevokeRoleDDL grantRevokeRoleDDL = new GrantRevokeRoleDDL(grant, roles, principalDesc); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + grantRevokeRoleDDL), conf)); + } + + private void analyzeShowGrant(ASTNode ast) throws SemanticException { + PrivilegeObjectDesc privHiveObj = null; + + ASTNode principal = (ASTNode) ast.getChild(0); + PrincipalDesc.PrincipalType type = null; + switch (principal.getType()) { + case HiveParser.TOK_USER: + type = PrincipalDesc.PrincipalType.USER; + break; + case HiveParser.TOK_GROUP: + type = PrincipalDesc.PrincipalType.GROUP; + break; + case HiveParser.TOK_ROLE: + type = PrincipalDesc.PrincipalType.ROLE; + break; + } + String principlaName = unescapeIdentifier(principal.getChild(0).getText()); + PrincipalDesc principalDesc = new PrincipalDesc(principlaName, type); + List cols = null; + if (ast.getChildCount() > 1) { + ASTNode child = (ASTNode) ast.getChild(1); + if (child.getToken().getType() == HiveParser.TOK_PRIV_OBJECT_COL) { + privHiveObj = new PrivilegeObjectDesc(); + privHiveObj.setObject(unescapeIdentifier(child.getChild(0).getText())); + if (child.getChildCount() > 1) { + for (int i = 1; i < child.getChildCount(); i++) { + ASTNode grandChild = (ASTNode) child.getChild(i); + if (grandChild.getToken().getType() == HiveParser.TOK_PARTSPEC) { + privHiveObj.setPartSpec(DDLSemanticAnalyzer.getPartSpec(grandChild)); + } else if (grandChild.getToken().getType() == HiveParser.TOK_TABCOLNAME) { + cols = getColumnNames((ASTNode) grandChild); + } else { + privHiveObj.setTable(child.getChild(i) != null); + } + } + } + } + } + + if (privHiveObj == null && cols != null) { + throw new SemanticException( + "For user-level privielges, column sets should be null. columns=" + + cols.toString()); + } + + ShowGrantDesc showGrant = new ShowGrantDesc(ctx.getResFile().toString(), + principalDesc, privHiveObj, cols); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + showGrant), conf)); + } + + private void analyzeGrant(ASTNode ast) throws SemanticException { + List privilegeDesc = analyzePrivilegeListDef( + (ASTNode) ast.getChild(0)); + List principalDesc = analyzePrinciplaListDef( + (ASTNode) ast.getChild(1)); + boolean grantOption = false; + PrivilegeObjectDesc subjectObj = null; + + if (ast.getChildCount() > 2) { + for (int i = 2; i < ast.getChildCount(); i++) { + ASTNode astChild = (ASTNode) ast.getChild(i); + if (astChild.getType() == HiveParser.TOK_GRANT_WITH_OPTION) { + grantOption = true; + } else if (astChild.getType() == HiveParser.TOK_PRIV_OBJECT) { + subjectObj = analyzePrivilegeObject(astChild); + } + } + } + + GrantDesc grantDesc = new GrantDesc(subjectObj, privilegeDesc, principalDesc, grantOption); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + grantDesc), conf)); + } + + private void analyzeRevoke(ASTNode ast) throws SemanticException { + List privilegeDesc = analyzePrivilegeListDef( + (ASTNode) ast.getChild(0)); + List principalDesc = analyzePrinciplaListDef( + (ASTNode) ast.getChild(1)); + PrivilegeObjectDesc hiveObj = null; + if (ast.getChildCount() > 2) { + ASTNode astChild = (ASTNode) ast.getChild(2); + hiveObj = analyzePrivilegeObject(astChild); + } + + RevokeDesc revokeDesc = new RevokeDesc(privilegeDesc, principalDesc, hiveObj); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + revokeDesc), conf)); + } + + + private PrivilegeObjectDesc analyzePrivilegeObject(ASTNode ast) + throws SemanticException { + PrivilegeObjectDesc subject = new PrivilegeObjectDesc(); + subject.setObject(unescapeIdentifier(ast.getChild(0).getText())); + if (ast.getChildCount() > 1) { + for (int i =0;i< ast.getChildCount();i++) { + ASTNode astChild = (ASTNode) ast.getChild(i); + if (astChild.getToken().getType() == HiveParser.TOK_PARTSPEC) { + subject.setPartSpec(DDLSemanticAnalyzer.getPartSpec(astChild)); + } else { + subject.setTable(ast.getChild(0) != null); + } + } + } + return subject; + } + + private List analyzePrinciplaListDef(ASTNode node) { + List principalList = new ArrayList(); + + for (int i = 0; i < node.getChildCount(); i++) { + ASTNode child = (ASTNode) node.getChild(i); + PrincipalDesc.PrincipalType type = null; + switch (child.getType()) { + case HiveParser.TOK_USER: + type = PrincipalDesc.PrincipalType.USER; + break; + case HiveParser.TOK_GROUP: + type = PrincipalDesc.PrincipalType.GROUP; + break; + case HiveParser.TOK_ROLE: + type = PrincipalDesc.PrincipalType.ROLE; + break; + } + String principlaName = unescapeIdentifier(child.getChild(0).getText()); + PrincipalDesc principalDesc = new PrincipalDesc(principlaName, type); + principalList.add(principalDesc); + } + + return principalList; + } + + private List analyzePrivilegeListDef(ASTNode node) + throws SemanticException { + List ret = new ArrayList(); + for (int i = 0; i < node.getChildCount(); i++) { + ASTNode privilegeDef = (ASTNode) node.getChild(i); + + String privilegeStr = unescapeIdentifier(privilegeDef.getChild(0) + .getText()); + Privilege privObj = PrivilegeRegistry.getPrivilege(privilegeStr); + if (privObj == null) { + throw new SemanticException("undefined privilege " + privilegeStr); + } + List cols = null; + if (privilegeDef.getChildCount() > 1) { + cols = getColumnNames((ASTNode) privilegeDef.getChild(1)); + } + PrivilegeDesc privilegeDesc = new PrivilegeDesc(privObj, cols); + ret.add(privilegeDesc); + } + return ret; + } + + private void analyzeCreateRole(ASTNode ast) { + String roleName = unescapeIdentifier(ast.getChild(0).getText()); + RoleDDLDesc createRoleDesc = new RoleDDLDesc(roleName, + RoleDDLDesc.RoleOperation.CREATE_ROLE); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + createRoleDesc), conf)); + } + + private void analyzeDropRole(ASTNode ast) { + String roleName = unescapeIdentifier(ast.getChild(0).getText()); + RoleDDLDesc createRoleDesc = new RoleDDLDesc(roleName, + RoleDDLDesc.RoleOperation.DROP_ROLE); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + createRoleDesc), conf)); + } + + private void analyzeShowRoleGrant(ASTNode ast) { + ASTNode child = (ASTNode) ast.getChild(0); + boolean isRole = false; + boolean isGroup = false; + switch (child.getType()) { + case HiveParser.TOK_USER: + break; + case HiveParser.TOK_GROUP: + isGroup = true; + break; + case HiveParser.TOK_ROLE: + isRole = true; + break; + } + String principalName = unescapeIdentifier(child.getChild(0).getText()); + RoleDDLDesc createRoleDesc = new RoleDDLDesc(principalName, isRole, isGroup, + RoleDDLDesc.RoleOperation.SHOW_ROLE_GRANT); + createRoleDesc.setResFile(ctx.getResFile().toString()); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + createRoleDesc), conf)); + } + private void analyzeCreateDatabase(ASTNode ast) throws SemanticException { String dbName = unescapeIdentifier(ast.getChild(0).getText()); boolean ifNotExists = false; Index: ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (working copy) @@ -189,6 +189,23 @@ TOK_LATERAL_VIEW; TOK_TABALIAS; TOK_ANALYZE; +TOK_CREATEROLE; +TOK_DROPROLE; +TOK_GRANT; +TOK_REVOKE; +TOK_SHOW_GRANT; +TOK_PRIVILEGE_LIST; +TOK_PRIVILEGE; +TOK_PRINCIPAL_NAME; +TOK_USER; +TOK_GROUP; +TOK_ROLE; +TOK_GRANT_WITH_OPTION; +TOK_PRIV_OBJECT; +TOK_PRIV_OBJECT_COL; +TOK_GRANT_ROLE; +TOK_REVOKE_ROLE; +TOK_SHOW_ROLE_GRANT; TOK_SHOWINDEXES; TOK_INDEXCOMMENT; TOK_DESCDATABASE; @@ -263,6 +280,14 @@ | analyzeStatement | lockStatement | unlockStatement + | createRoleStatement + | dropRoleStatement + | grantPrivileges + | revokePrivileges + | showGrants + | showRoleGrants + | grantRole + | revokeRole ; ifExists @@ -721,6 +746,114 @@ : KW_UNLOCK KW_TABLE Identifier partitionSpec? -> ^(TOK_UNLOCKTABLE Identifier partitionSpec?) ; +createRoleStatement +@init { msgs.push("create role"); } +@after { msgs.pop(); } + : KW_CREATE KW_ROLE roleName=Identifier + -> ^(TOK_CREATEROLE $roleName) + ; + +dropRoleStatement +@init {msgs.push("drop role");} +@after {msgs.pop();} + : KW_DROP KW_ROLE roleName=Identifier + -> ^(TOK_DROPROLE $roleName) + ; + +grantPrivileges +@init {msgs.push("grant privileges");} +@after {msgs.pop();} + : KW_GRANT privList=privilegeList + privilegeObject? + KW_TO principalSpecification + (KW_WITH withOption)? + -> ^(TOK_GRANT $privList principalSpecification privilegeObject? withOption?) + ; + +revokePrivileges +@init {msgs.push("revoke privileges");} +@afer {msgs.pop();} + : KW_REVOKE privilegeList privilegeObject? KW_FROM principalSpecification + -> ^(TOK_REVOKE privilegeList principalSpecification privilegeObject?) + ; + +grantRole +@init {msgs.push("grant role");} +@after {msgs.pop();} + : KW_GRANT KW_ROLE Identifier (COMMA Identifier)* KW_TO principalSpecification + -> ^(TOK_GRANT_ROLE principalSpecification Identifier+) + ; + +revokeRole +@init {msgs.push("grant role");} +@after {msgs.pop();} + : KW_REVOKE KW_ROLE Identifier (COMMA Identifier)* KW_FROM principalSpecification + -> ^(TOK_REVOKE_ROLE principalSpecification Identifier+) + ; + +showRoleGrants +@init {msgs.push("show grants");} +@after {msgs.pop();} + : KW_SHOW KW_ROLE KW_GRANT principalName + -> ^(TOK_SHOW_ROLE_GRANT principalName) + ; + +showGrants +@init {msgs.push("show grants");} +@after {msgs.pop();} + : KW_SHOW KW_GRANT principalName privilegeIncludeColObject? + -> ^(TOK_SHOW_GRANT principalName privilegeIncludeColObject?) + ; + +privilegeIncludeColObject +@init {msgs.push("privilege object including columns");} +@after {msgs.pop();} + : KW_ON (table=KW_TABLE|KW_DATABASE) Identifier (LPAREN cols=columnNameList RPAREN)? partitionSpec? + -> ^(TOK_PRIV_OBJECT_COL Identifier $table? $cols? partitionSpec?) + ; + +privilegeObject +@init {msgs.push("privilege subject");} +@after {msgs.pop();} + : KW_ON (table=KW_TABLE|KW_DATABASE) Identifier partitionSpec? + -> ^(TOK_PRIV_OBJECT Identifier $table? partitionSpec?) + ; + +privilegeList +@init {msgs.push("grant privilege list");} +@after {msgs.pop();} + : privlegeDef (COMMA privlegeDef)* + -> ^(TOK_PRIVILEGE_LIST privlegeDef+) + ; + +privlegeDef +@init {msgs.push("grant privilege");} +@after {msgs.pop();} + : Identifier (LPAREN cols=columnNameList RPAREN)? + -> ^(TOK_PRIVILEGE Identifier $cols?) + ; + +principalSpecification +@init { msgs.push("user/group/role name list"); } +@after { msgs.pop(); } + : principalName (COMMA principalName)* -> ^(TOK_PRINCIPAL_NAME principalName+) + ; + +principalName +@init {msgs.push("user|group|role name");} +@after {msgs.pop();} + : KW_USER Identifier -> ^(TOK_USER Identifier) + | KW_GROUP Identifier -> ^(TOK_GROUP Identifier) + | KW_ROLE Identifier -> ^(TOK_ROLE Identifier) + ; + +withOption +@init {msgs.push("grant with option");} +@after {msgs.pop();} + : KW_GRANT KW_OPTION + -> ^(TOK_GRANT_WITH_OPTION) + ; + metastoreCheck @init { msgs.push("metastore check statement"); } @after { msgs.pop(); } @@ -1965,6 +2098,10 @@ KW_COMPUTE: 'COMPUTE'; KW_STATISTICS: 'STATISTICS'; KW_USE: 'USE'; +KW_USER: 'USER'; +KW_ROLE: 'ROLE'; +KW_OPTION: 'OPTION'; + // Operators // NOTE: if you add a new function/operator, add it to sysFuncNames so that describe function _FUNC_ will work. Index: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (working copy) @@ -18,8 +18,6 @@ package org.apache.hadoop.hive.ql.parse; -import static org.apache.hadoop.util.StringUtils.stringifyException; - import java.io.IOException; import java.io.Serializable; import java.util.ArrayList; @@ -125,6 +123,7 @@ import org.apache.hadoop.hive.ql.plan.FilterDesc; import org.apache.hadoop.hive.ql.plan.ForwardDesc; import org.apache.hadoop.hive.ql.plan.GroupByDesc; +import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.hadoop.hive.ql.plan.JoinCondDesc; import org.apache.hadoop.hive.ql.plan.JoinDesc; import org.apache.hadoop.hive.ql.plan.LateralViewForwardDesc; @@ -888,7 +887,7 @@ } catch (HiveException e) { // Has to use full name to make sure it does not conflict with // org.apache.commons.lang.StringUtils - LOG.error(stringifyException(e)); + LOG.error(org.apache.hadoop.util.StringUtils.stringifyException(e)); throw new SemanticException(e.getMessage(), e); } } @@ -924,7 +923,7 @@ // an old SQL construct which has been eliminated in a later Hive // version, so we need to provide full debugging info to help // with fixing the view definition. - LOG.error(stringifyException(e)); + LOG.error(org.apache.hadoop.util.StringUtils.stringifyException(e)); StringBuilder sb = new StringBuilder(); sb.append(e.getMessage()); ErrorMsg.renderOrigin(sb, viewOrigin); @@ -5873,7 +5872,7 @@ tsDesc.setStatsAggPrefix(k); // set up WritenEntity for replication - outputs.add(new WriteEntity(tab)); + outputs.add(new WriteEntity(tab, true)); // add WriteEntity for each matching partition if (tab.isPartitioned()) { @@ -5884,7 +5883,7 @@ if (partitions != null) { for (Partition partn : partitions) { // inputs.add(new ReadEntity(partn)); // is this needed at all? - outputs.add(new WriteEntity(partn)); + outputs.add(new WriteEntity(partn, true)); } } } @@ -6141,7 +6140,7 @@ } catch (HiveException e) { // Has to use full name to make sure it does not conflict with // org.apache.commons.lang.StringUtils - LOG.error(stringifyException(e)); + LOG.error(org.apache.hadoop.util.StringUtils.stringifyException(e)); throw new SemanticException(e.getMessage(), e); } @@ -6497,6 +6496,9 @@ ASTNode child = ast; LOG.info("Starting Semantic Analysis"); + + //overwrite this if needed. + SessionState.get().setCommandType(HiveOperation.QUERY); // analyze create table command if (ast.getToken().getType() == HiveParser.TOK_CREATETABLE) { @@ -6509,12 +6511,13 @@ // analyze create view command if (ast.getToken().getType() == HiveParser.TOK_CREATEVIEW) { child = analyzeCreateView(ast, qb); + SessionState.get().setCommandType(HiveOperation.CREATEVIEW); if (child == null) { return; } viewSelect = child; } - + // continue analyzing from the child ASTNode. doPhase1(child, qb, initPhase1Ctx()); LOG.info("Completed phase 1 of Semantic Analysis"); @@ -7057,6 +7060,9 @@ storageFormat.storageHandler, shared.serdeProps, tblProps, ifNotExists); validateCreateTable(crtTblDesc); + // outputs is empty, which means this create table happens in the current + // database. + SessionState.get().setCommandType(HiveOperation.CREATETABLE); rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), crtTblDesc), conf)); break; @@ -7064,6 +7070,7 @@ case CTLT: // create table like CreateTableLikeDesc crtTblLikeDesc = new CreateTableLikeDesc(tableName, isExt, location, ifNotExists, likeTableName); + SessionState.get().setCommandType(HiveOperation.CREATETABLE); rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), crtTblLikeDesc), conf)); break; @@ -7088,6 +7095,8 @@ tblProps, ifNotExists); qb.setTableDesc(crtTblDesc); + SessionState.get().setCommandType(HiveOperation.CREATETABLE_AS_SELECT); + return selectStmt; default: throw new SemanticException("Unrecognized command."); Index: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java (working copy) @@ -21,6 +21,7 @@ import java.util.HashMap; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.hadoop.hive.ql.session.SessionState; /** @@ -29,63 +30,74 @@ */ public final class SemanticAnalyzerFactory { - static HashMap commandType = new HashMap(); - static HashMap tablePartitionCommandType = new HashMap(); + static HashMap commandType = new HashMap(); + static HashMap tablePartitionCommandType = new HashMap(); static { - commandType.put(HiveParser.TOK_EXPLAIN, "EXPLAIN"); - commandType.put(HiveParser.TOK_LOAD, "LOAD"); - commandType.put(HiveParser.TOK_CREATEDATABASE, "CREATEDATABASE"); - commandType.put(HiveParser.TOK_DROPDATABASE, "DROPDATABASE"); - commandType.put(HiveParser.TOK_SWITCHDATABASE, "SWITCHDATABASE"); - commandType.put(HiveParser.TOK_CREATETABLE, "CREATETABLE"); - commandType.put(HiveParser.TOK_DROPTABLE, "DROPTABLE"); - commandType.put(HiveParser.TOK_DESCTABLE, "DESCTABLE"); - commandType.put(HiveParser.TOK_DESCFUNCTION, "DESCFUNCTION"); - commandType.put(HiveParser.TOK_MSCK, "MSCK"); - commandType.put(HiveParser.TOK_ALTERTABLE_ADDCOLS, "ALTERTABLE_ADDCOLS"); - commandType.put(HiveParser.TOK_ALTERTABLE_REPLACECOLS, "ALTERTABLE_REPLACECOLS"); - commandType.put(HiveParser.TOK_ALTERTABLE_RENAMECOL, "ALTERTABLE_RENAMECOL"); - commandType.put(HiveParser.TOK_ALTERTABLE_RENAME, "ALTERTABLE_RENAME"); - commandType.put(HiveParser.TOK_ALTERTABLE_DROPPARTS, "ALTERTABLE_DROPPARTS"); - commandType.put(HiveParser.TOK_ALTERTABLE_ADDPARTS, "ALTERTABLE_ADDPARTS"); - commandType.put(HiveParser.TOK_ALTERTABLE_TOUCH, "ALTERTABLE_TOUCH"); - commandType.put(HiveParser.TOK_ALTERTABLE_ARCHIVE, "ALTERTABLE_ARCHIVE"); - commandType.put(HiveParser.TOK_ALTERTABLE_UNARCHIVE, "ALTERTABLE_UNARCHIVE"); - commandType.put(HiveParser.TOK_ALTERTABLE_PROPERTIES, "ALTERTABLE_PROPERTIES"); - commandType.put(HiveParser.TOK_ALTERTABLE_SERIALIZER, "ALTERTABLE_SERIALIZER"); - commandType.put(HiveParser.TOK_ALTERTABLE_SERDEPROPERTIES, "ALTERTABLE_SERDEPROPERTIES"); - commandType.put(HiveParser.TOK_ALTERINDEX_REBUILD, "ALTERINDEX_REBUILD"); - commandType.put(HiveParser.TOK_ALTERINDEX_PROPERTIES, "ALTERINDEX_PROPS"); - commandType.put(HiveParser.TOK_SHOWDATABASES, "SHOWDATABASES"); - commandType.put(HiveParser.TOK_SHOWTABLES, "SHOWTABLES"); - commandType.put(HiveParser.TOK_SHOW_TABLESTATUS, "SHOW_TABLESTATUS"); - commandType.put(HiveParser.TOK_SHOWFUNCTIONS, "SHOWFUNCTIONS"); - commandType.put(HiveParser.TOK_SHOWPARTITIONS, "SHOWPARTITIONS"); - commandType.put(HiveParser.TOK_SHOWINDEXES, "SHOWINDEXES"); - commandType.put(HiveParser.TOK_SHOWLOCKS, "SHOWLOCKS"); - commandType.put(HiveParser.TOK_CREATEFUNCTION, "CREATEFUNCTION"); - commandType.put(HiveParser.TOK_DROPFUNCTION, "DROPFUNCTION"); - commandType.put(HiveParser.TOK_CREATEVIEW, "CREATEVIEW"); - commandType.put(HiveParser.TOK_DROPVIEW, "DROPVIEW"); - commandType.put(HiveParser.TOK_CREATEINDEX, "CREATEINDEX"); - commandType.put(HiveParser.TOK_DROPINDEX, "DROPINDEX"); - commandType.put(HiveParser.TOK_ALTERVIEW_PROPERTIES, "ALTERVIEW_PROPERTIES"); - commandType.put(HiveParser.TOK_QUERY, "QUERY"); - commandType.put(HiveParser.TOK_LOCKTABLE, "LOCKTABLE"); - commandType.put(HiveParser.TOK_UNLOCKTABLE, "UNLOCKTABLE"); + commandType.put(HiveParser.TOK_EXPLAIN, HiveOperation.EXPLAIN); + commandType.put(HiveParser.TOK_LOAD, HiveOperation.LOAD); + commandType.put(HiveParser.TOK_CREATEDATABASE, HiveOperation.CREATEDATABASE); + commandType.put(HiveParser.TOK_DROPDATABASE, HiveOperation.DROPDATABASE); + commandType.put(HiveParser.TOK_SWITCHDATABASE, HiveOperation.SWITCHDATABASE); + commandType.put(HiveParser.TOK_CREATETABLE, HiveOperation.CREATETABLE); + commandType.put(HiveParser.TOK_DROPTABLE, HiveOperation.DROPTABLE); + commandType.put(HiveParser.TOK_DESCTABLE, HiveOperation.DESCTABLE); + commandType.put(HiveParser.TOK_DESCFUNCTION, HiveOperation.DESCFUNCTION); + commandType.put(HiveParser.TOK_MSCK, HiveOperation.MSCK); + commandType.put(HiveParser.TOK_ALTERTABLE_ADDCOLS, HiveOperation.ALTERTABLE_ADDCOLS); + commandType.put(HiveParser.TOK_ALTERTABLE_REPLACECOLS, HiveOperation.ALTERTABLE_REPLACECOLS); + commandType.put(HiveParser.TOK_ALTERTABLE_RENAMECOL, HiveOperation.ALTERTABLE_RENAMECOL); + commandType.put(HiveParser.TOK_ALTERTABLE_RENAME, HiveOperation.ALTERTABLE_RENAME); + commandType.put(HiveParser.TOK_ALTERTABLE_DROPPARTS, HiveOperation.ALTERTABLE_DROPPARTS); + commandType.put(HiveParser.TOK_ALTERTABLE_ADDPARTS, HiveOperation.ALTERTABLE_ADDPARTS); + commandType.put(HiveParser.TOK_ALTERTABLE_TOUCH, HiveOperation.ALTERTABLE_TOUCH); + commandType.put(HiveParser.TOK_ALTERTABLE_ARCHIVE, HiveOperation.ALTERTABLE_ARCHIVE); + commandType.put(HiveParser.TOK_ALTERTABLE_UNARCHIVE, HiveOperation.ALTERTABLE_UNARCHIVE); + commandType.put(HiveParser.TOK_ALTERTABLE_PROPERTIES, HiveOperation.ALTERTABLE_PROPERTIES); + commandType.put(HiveParser.TOK_ALTERTABLE_SERIALIZER, HiveOperation.ALTERTABLE_SERIALIZER); + commandType.put(HiveParser.TOK_ALTERTABLE_SERDEPROPERTIES, HiveOperation.ALTERTABLE_SERDEPROPERTIES); + commandType.put(HiveParser.TOK_ALTERTABLE_CLUSTER_SORT, HiveOperation.ALTERTABLE_CLUSTER_SORT); + commandType.put(HiveParser.TOK_SHOWDATABASES, HiveOperation.SHOWDATABASES); + commandType.put(HiveParser.TOK_SHOWTABLES, HiveOperation.SHOWTABLES); + commandType.put(HiveParser.TOK_SHOW_TABLESTATUS, HiveOperation.SHOW_TABLESTATUS); + commandType.put(HiveParser.TOK_SHOWFUNCTIONS, HiveOperation.SHOWFUNCTIONS); + commandType.put(HiveParser.TOK_SHOWINDEXES, HiveOperation.SHOWINDEXES); + commandType.put(HiveParser.TOK_SHOWPARTITIONS, HiveOperation.SHOWPARTITIONS); + commandType.put(HiveParser.TOK_SHOWLOCKS, HiveOperation.SHOWLOCKS); + commandType.put(HiveParser.TOK_CREATEFUNCTION, HiveOperation.CREATEFUNCTION); + commandType.put(HiveParser.TOK_DROPFUNCTION, HiveOperation.DROPFUNCTION); + commandType.put(HiveParser.TOK_CREATEVIEW, HiveOperation.CREATEVIEW); + commandType.put(HiveParser.TOK_DROPVIEW, HiveOperation.DROPVIEW); + commandType.put(HiveParser.TOK_CREATEINDEX, HiveOperation.CREATEINDEX); + commandType.put(HiveParser.TOK_DROPINDEX, HiveOperation.DROPINDEX); + commandType.put(HiveParser.TOK_ALTERINDEX_REBUILD, HiveOperation.ALTERINDEX_REBUILD); + commandType.put(HiveParser.TOK_ALTERVIEW_PROPERTIES, HiveOperation.ALTERVIEW_PROPERTIES); + commandType.put(HiveParser.TOK_QUERY, HiveOperation.QUERY); + commandType.put(HiveParser.TOK_LOCKTABLE, HiveOperation.LOCKTABLE); + commandType.put(HiveParser.TOK_UNLOCKTABLE, HiveOperation.UNLOCKTABLE); + commandType.put(HiveParser.TOK_CREATEROLE, HiveOperation.CREATEROLE); + commandType.put(HiveParser.TOK_DROPROLE, HiveOperation.DROPROLE); + commandType.put(HiveParser.TOK_GRANT, HiveOperation.GRANT_PRIVILEGE); + commandType.put(HiveParser.TOK_REVOKE, HiveOperation.REVOKE_PRIVILEGE); + commandType.put(HiveParser.TOK_SHOW_GRANT, HiveOperation.SHOW_GRANT); + commandType.put(HiveParser.TOK_GRANT_ROLE, HiveOperation.GRANT_ROLE); + commandType.put(HiveParser.TOK_REVOKE_ROLE, HiveOperation.REVOKE_ROLE); + commandType.put(HiveParser.TOK_SHOW_ROLE_GRANT, HiveOperation.SHOW_ROLE_GRANT); } static { - tablePartitionCommandType.put(HiveParser.TOK_ALTERTABLE_ALTERPARTS_PROTECTMODE, - new String[] { "ALTERTABLE_PROTECTMODE", "ALTERPARTITION_PROTECTMODE" }); + tablePartitionCommandType.put( + HiveParser.TOK_ALTERTABLE_ALTERPARTS_PROTECTMODE, + new HiveOperation[] { HiveOperation.ALTERTABLE_PROTECTMODE, + HiveOperation.ALTERPARTITION_PROTECTMODE }); tablePartitionCommandType.put(HiveParser.TOK_ALTERTABLE_FILEFORMAT, - new String[] { "ALTERTABLE_FILEFORMAT", "ALTERPARTITION_FILEFORMAT" }); + new HiveOperation[] { HiveOperation.ALTERTABLE_FILEFORMAT, + HiveOperation.ALTERPARTITION_FILEFORMAT }); tablePartitionCommandType.put(HiveParser.TOK_ALTERTABLE_LOCATION, - new String[] { "ALTERTABLE_LOCATION", "ALTERPARTITION_LOCATION" }); + new HiveOperation[] { HiveOperation.ALTERTABLE_LOCATION, + HiveOperation.ALTERPARTITION_LOCATION }); } - public static BaseSemanticAnalyzer get(HiveConf conf, ASTNode tree) throws SemanticException { if (tree.getToken() == null) { @@ -134,9 +146,17 @@ case HiveParser.TOK_ALTERTABLE_UNARCHIVE: case HiveParser.TOK_LOCKTABLE: case HiveParser.TOK_UNLOCKTABLE: + case HiveParser.TOK_CREATEROLE: + case HiveParser.TOK_DROPROLE: + case HiveParser.TOK_GRANT: + case HiveParser.TOK_REVOKE: + case HiveParser.TOK_SHOW_GRANT: + case HiveParser.TOK_GRANT_ROLE: + case HiveParser.TOK_REVOKE_ROLE: + case HiveParser.TOK_SHOW_ROLE_GRANT: return new DDLSemanticAnalyzer(conf); case HiveParser.TOK_ALTERTABLE_PARTITION: - String commandType = null; + HiveOperation commandType = null; Integer type = ((ASTNode) tree.getChild(1)).getToken().getType(); if (tree.getChild(0).getChildCount() > 1) { commandType = tablePartitionCommandType.get(type)[1]; @@ -154,7 +174,7 @@ } } - private static void setSessionCommandType(String commandType) { + private static void setSessionCommandType(HiveOperation commandType) { if (SessionState.get() != null) { SessionState.get().setCommandType(commandType); } Index: ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java (working copy) @@ -58,6 +58,12 @@ private ShowIndexesDesc showIndexesDesc; private DescDatabaseDesc descDbDesc; + private RoleDDLDesc roleDDLDesc; + private GrantDesc grantDesc; + private ShowGrantDesc showGrantDesc; + private RevokeDesc revokeDesc; + private GrantRevokeRoleDDL grantRevokeRoleDDL; + /** * ReadEntitites that are passed to the hooks. */ @@ -328,6 +334,36 @@ } public DDLWork(HashSet inputs, HashSet outputs, + RoleDDLDesc roleDDLDesc) { + this(inputs, outputs); + this.roleDDLDesc = roleDDLDesc; + } + + public DDLWork(HashSet inputs, HashSet outputs, + GrantDesc grantDesc) { + this(inputs, outputs); + this.grantDesc = grantDesc; + } + + public DDLWork(HashSet inputs, HashSet outputs, + ShowGrantDesc showGrant) { + this(inputs, outputs); + this.showGrantDesc = showGrant; + } + + public DDLWork(HashSet inputs, HashSet outputs, + RevokeDesc revokeDesc) { + this(inputs, outputs); + this.revokeDesc = revokeDesc; + } + + public DDLWork(HashSet inputs, HashSet outputs, + GrantRevokeRoleDDL grantRevokeRoleDDL) { + this(inputs, outputs); + this.grantRevokeRoleDDL = grantRevokeRoleDDL; + } + + public DDLWork(HashSet inputs, HashSet outputs, ShowIndexesDesc showIndexesDesc) { this(inputs, outputs); this.showIndexesDesc = showIndexesDesc; @@ -740,4 +776,68 @@ this.dropIdxDesc = dropIdxDesc; } + /** + * @return role ddl desc + */ + public RoleDDLDesc getRoleDDLDesc() { + return roleDDLDesc; + } + + /** + * @param roleDDLDesc role ddl desc + */ + public void setRoleDDLDesc(RoleDDLDesc roleDDLDesc) { + this.roleDDLDesc = roleDDLDesc; + } + + /** + * @return grant desc + */ + public GrantDesc getGrantDesc() { + return grantDesc; + } + + /** + * @param grantDesc grant desc + */ + public void setGrantDesc(GrantDesc grantDesc) { + this.grantDesc = grantDesc; + } + + /** + * @return show grant desc + */ + public ShowGrantDesc getShowGrantDesc() { + return showGrantDesc; + } + + /** + * @param showGrantDesc + */ + public void setShowGrantDesc(ShowGrantDesc showGrantDesc) { + this.showGrantDesc = showGrantDesc; + } + + public RevokeDesc getRevokeDesc() { + return revokeDesc; + } + + public void setRevokeDesc(RevokeDesc revokeDesc) { + this.revokeDesc = revokeDesc; + } + + /** + * @return + */ + public GrantRevokeRoleDDL getGrantRevokeRoleDDL() { + return grantRevokeRoleDDL; + } + + /** + * @param grantRevokeRoleDDL + */ + public void setGrantRevokeRoleDDL(GrantRevokeRoleDDL grantRevokeRoleDDL) { + this.grantRevokeRoleDDL = grantRevokeRoleDDL; + } + } Index: ql/src/java/org/apache/hadoop/hive/ql/plan/GrantDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/GrantDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/GrantDesc.java (revision 0) @@ -0,0 +1,107 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; +import java.util.List; + +@Explain(displayName = "Grant") +public class GrantDesc extends DDLDesc implements Serializable, Cloneable { + + private static final long serialVersionUID = 1L; + + private List privileges; + + private List principals; + + private boolean grantOption; + + private PrivilegeObjectDesc privilegeSubjectDesc; + + public GrantDesc(PrivilegeObjectDesc privilegeSubject, + List privilegeDesc, List principalDesc, + boolean grantOption) { + super(); + this.privilegeSubjectDesc = privilegeSubject; + this.privileges = privilegeDesc; + this.principals = principalDesc; + this.grantOption = grantOption; + } + + /** + * @return privileges + */ + @Explain(displayName = "Privileges") + public List getPrivileges() { + return privileges; + } + + /** + * @param privileges + */ + public void setPrivileges(List privileges) { + this.privileges = privileges; + } + + /** + * @return principals + */ + @Explain(displayName = "Principals") + public List getPrincipals() { + return principals; + } + + /** + * @param principals + */ + public void setPrincipals(List principals) { + this.principals = principals; + } + + /** + * @return grant option + */ + @Explain(displayName = "grant option") + public boolean isGrantOption() { + return grantOption; + } + + /** + * @param grantOption + */ + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + /** + * @return privilege subject + */ + @Explain(displayName="privilege subject") + public PrivilegeObjectDesc getPrivilegeSubjectDesc() { + return privilegeSubjectDesc; + } + + /** + * @param privilegeSubjectDesc + */ + public void setPrivilegeSubjectDesc(PrivilegeObjectDesc privilegeSubjectDesc) { + this.privilegeSubjectDesc = privilegeSubjectDesc; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/GrantRevokeRoleDDL.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/GrantRevokeRoleDDL.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/GrantRevokeRoleDDL.java (revision 0) @@ -0,0 +1,78 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.util.List; + +@Explain(displayName="grant or revoke roles") +public class GrantRevokeRoleDDL { + + private boolean grant; + + private List principalDesc; + + private List roles; + + public GrantRevokeRoleDDL() { + } + + public GrantRevokeRoleDDL(boolean grant, List roles, List principalDesc) { + super(); + this.grant = grant; + this.principalDesc = principalDesc; + this.roles = roles; + } + + /** + * @return grant or revoke privileges + */ + @Explain(displayName="grant (or revoke)") + public boolean getGrant() { + return grant; + } + + public void setGrant(boolean grant) { + this.grant = grant; + } + + /** + * @return a list of principals + */ + @Explain(displayName="principals") + public List getPrincipalDesc() { + return principalDesc; + } + + public void setPrincipalDesc(List principalDesc) { + this.principalDesc = principalDesc; + } + + /** + * @return a list of roles + */ + @Explain(displayName="roles") + public List getRoles() { + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java (revision 0) @@ -0,0 +1,182 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import org.apache.hadoop.hive.ql.security.authorization.Privilege; + +public enum HiveOperation { + + EXPLAIN("EXPLAIN", null, null), + LOAD("LOAD", null, new Privilege[]{Privilege.ALTER_DATA}), + CREATEDATABASE("CREATEDATABASE", null, null), + DROPDATABASE("DROPDATABASE", null, null), + SWITCHDATABASE("SWITCHDATABASE", null, null), + DROPTABLE ("DROPTABLE", null, new Privilege[]{Privilege.DROP}), + DESCTABLE("DESCTABLE", null, null), + DESCFUNCTION("DESCFUNCTION", null, null), + MSCK("MSCK", null, null), + ALTERTABLE_ADDCOLS("ALTERTABLE_ADDCOLS", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_REPLACECOLS("ALTERTABLE_REPLACECOLS", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_RENAMECOL("ALTERTABLE_RENAMECOL", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_RENAME("ALTERTABLE_RENAME", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_DROPPARTS("ALTERTABLE_DROPPARTS", new Privilege[]{Privilege.DROP}, null), + ALTERTABLE_ADDPARTS("ALTERTABLE_ADDPARTS", new Privilege[]{Privilege.CREATE}, null), + ALTERTABLE_TOUCH("ALTERTABLE_TOUCH", null, null), + ALTERTABLE_ARCHIVE("ALTERTABLE_ARCHIVE", new Privilege[]{Privilege.ALTER_DATA}, null), + ALTERTABLE_UNARCHIVE("ALTERTABLE_UNARCHIVE", new Privilege[]{Privilege.ALTER_DATA}, null), + ALTERTABLE_PROPERTIES("ALTERTABLE_PROPERTIES", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_SERIALIZER("ALTERTABLE_SERIALIZER", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_SERDEPROPERTIES("ALTERTABLE_SERDEPROPERTIES", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_CLUSTER_SORT("ALTERTABLE_CLUSTER_SORT", new Privilege[]{Privilege.ALTER_METADATA}, null), + SHOWDATABASES("SHOWDATABASES", new Privilege[]{Privilege.SHOW_DATABASE}, null), + SHOWTABLES("SHOWTABLES", null, null), + SHOW_TABLESTATUS("SHOW_TABLESTATUS", null, null), + SHOWFUNCTIONS("SHOWFUNCTIONS", null, null), + SHOWINDEXES("SHOWINDEXES", null, null), + SHOWPARTITIONS("SHOWPARTITIONS", null, null), + SHOWLOCKS("SHOWLOCKS", null, null), + CREATEFUNCTION("CREATEFUNCTION", null, null), + DROPFUNCTION("DROPFUNCTION", null, null), + CREATEVIEW("CREATEVIEW", null, null), + DROPVIEW("DROPVIEW", null, null), + CREATEINDEX("CREATEINDEX", null, null), + DROPINDEX("DROPINDEX", null, null), + ALTERINDEX_REBUILD("ALTERINDEX_REBUILD", null, null), + ALTERVIEW_PROPERTIES("ALTERVIEW_PROPERTIES", null, null), + LOCKTABLE("LOCKTABLE", new Privilege[]{Privilege.LOCK}, null), + UNLOCKTABLE("UNLOCKTABLE", new Privilege[]{Privilege.LOCK}, null), + CREATEROLE("CREATEROLE", null, null), + DROPROLE("DROPROLE", null, null), + GRANT_PRIVILEGE("GRANT_PRIVILEGE", null, null), + REVOKE_PRIVILEGE("REVOKE_PRIVILEGE", null, null), + SHOW_GRANT("SHOW_GRANT", null, null), + GRANT_ROLE("GRANT_ROLE", null, null), + REVOKE_ROLE("REVOKE_ROLE", null, null), + SHOW_ROLE_GRANT("SHOW_ROLE_GRANT", null, null), + ALTERTABLE_PROTECTMODE("ALTERTABLE_PROTECTMODE", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERPARTITION_PROTECTMODE("ALTERPARTITION_PROTECTMODE", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_FILEFORMAT("ALTERTABLE_FILEFORMAT", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERPARTITION_FILEFORMAT("ALTERPARTITION_FILEFORMAT", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_LOCATION("ALTERTABLE_LOCATION", new Privilege[]{Privilege.ALTER_DATA}, null), + ALTERPARTITION_LOCATION("ALTERPARTITION_LOCATION", new Privilege[]{Privilege.ALTER_DATA}, null), + CREATETABLE("CREATETABLE", null, new Privilege[]{Privilege.CREATE}), + CREATETABLE_AS_SELECT("CREATETABLE_AS_SELECT", new Privilege[]{Privilege.SELECT}, new Privilege[]{Privilege.CREATE}), + QUERY("QUERY", new Privilege[]{Privilege.SELECT}, new Privilege[]{Privilege.ALTER_DATA, Privilege.CREATE}), + ; + + private String operationName; + + private Privilege[] inputRequiredPrivileges; + + private Privilege[] outputRequiredPrivileges; + + public Privilege[] getInputRequiredPrivileges() { + return inputRequiredPrivileges; + } + + public Privilege[] getOutputRequiredPrivileges() { + return outputRequiredPrivileges; + } + + public String getOperationName() { + return operationName; + } + + private HiveOperation(String operationName, + Privilege[] inputRequiredPrivileges, Privilege[] outputRequiredPrivileges) { + this.operationName = operationName; + this.inputRequiredPrivileges = inputRequiredPrivileges; + this.outputRequiredPrivileges = outputRequiredPrivileges; + } + + public static class PrivilegeAgreement { + + private Privilege[] inputUserLevelRequiredPriv; + private Privilege[] inputDBLevelRequiredPriv; + private Privilege[] inputTableLevelRequiredPriv; + private Privilege[] inputColumnLevelRequiredPriv; + private Privilege[] outputUserLevelRequiredPriv; + private Privilege[] outputDBLevelRequiredPriv; + private Privilege[] outputTableLevelRequiredPriv; + private Privilege[] outputColumnLevelRequiredPriv; + + public PrivilegeAgreement putUserLevelRequiredPriv( + Privilege[] inputUserLevelRequiredPriv, + Privilege[] outputUserLevelRequiredPriv) { + this.inputUserLevelRequiredPriv = inputUserLevelRequiredPriv; + this.outputUserLevelRequiredPriv = outputUserLevelRequiredPriv; + return this; + } + + public PrivilegeAgreement putDBLevelRequiredPriv( + Privilege[] inputDBLevelRequiredPriv, + Privilege[] outputDBLevelRequiredPriv) { + this.inputDBLevelRequiredPriv = inputDBLevelRequiredPriv; + this.outputDBLevelRequiredPriv = outputDBLevelRequiredPriv; + return this; + } + + public PrivilegeAgreement putTableLevelRequiredPriv( + Privilege[] inputTableLevelRequiredPriv, + Privilege[] outputTableLevelRequiredPriv) { + this.inputTableLevelRequiredPriv = inputTableLevelRequiredPriv; + this.outputTableLevelRequiredPriv = outputTableLevelRequiredPriv; + return this; + } + + public PrivilegeAgreement putColumnLevelRequiredPriv( + Privilege[] inputColumnLevelPriv, Privilege[] outputColumnLevelPriv) { + this.inputColumnLevelRequiredPriv = inputColumnLevelPriv; + this.outputColumnLevelRequiredPriv = outputColumnLevelPriv; + return this; + } + + public Privilege[] getInputUserLevelRequiredPriv() { + return inputUserLevelRequiredPriv; + } + + public Privilege[] getInputDBLevelRequiredPriv() { + return inputDBLevelRequiredPriv; + } + + public Privilege[] getInputTableLevelRequiredPriv() { + return inputTableLevelRequiredPriv; + } + + public Privilege[] getInputColumnLevelRequiredPriv() { + return inputColumnLevelRequiredPriv; + } + + public Privilege[] getOutputUserLevelRequiredPriv() { + return outputUserLevelRequiredPriv; + } + + public Privilege[] getOutputDBLevelRequiredPriv() { + return outputDBLevelRequiredPriv; + } + + public Privilege[] getOutputTableLevelRequiredPriv() { + return outputTableLevelRequiredPriv; + } + + public Privilege[] getOutputColumnLevelRequiredPriv() { + return outputColumnLevelRequiredPriv; + } + } +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/PrincipalDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/PrincipalDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/PrincipalDesc.java (revision 0) @@ -0,0 +1,64 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; + +@Explain(displayName = "Principal") +public class PrincipalDesc implements Serializable, Cloneable { + + private static final long serialVersionUID = 1L; + + public static enum PrincipalType { + USER, GROUP, ROLE; + } + + private String name; + + private PrincipalType type; + + public PrincipalDesc(String name, PrincipalType type) { + super(); + this.name = name; + this.type = type; + } + + public PrincipalDesc() { + super(); + } + + @Explain(displayName="name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Explain(displayName="type") + public PrincipalType getType() { + return type; + } + + public void setType(PrincipalType type) { + this.type = type; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeDesc.java (revision 0) @@ -0,0 +1,74 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; +import java.util.List; + +import org.apache.hadoop.hive.ql.security.authorization.Privilege; + +@Explain(displayName = "Privilege") +public class PrivilegeDesc implements Serializable, Cloneable { + private static final long serialVersionUID = 1L; + + private Privilege privilege; + + private List columns; + + public PrivilegeDesc(Privilege privilege, List columns) { + super(); + this.privilege = privilege; + this.columns = columns; + } + + public PrivilegeDesc() { + super(); + } + + /** + * @return privilege definition + */ + @Explain(displayName = "privilege") + public Privilege getPrivilege() { + return privilege; + } + + /** + * @param privilege + */ + public void setPrivilege(Privilege privilege) { + this.privilege = privilege; + } + + /** + * @return columns on which the given privilege take affect. + */ + @Explain(displayName = "columns") + public List getColumns() { + return columns; + } + + /** + * @param columns + */ + public void setColumns(List columns) { + this.columns = columns; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeObjectDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeObjectDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeObjectDesc.java (revision 0) @@ -0,0 +1,70 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.util.HashMap; + +@Explain(displayName="privilege subject") +public class PrivilegeObjectDesc { + + private boolean table; + + private String object; + + private HashMap partSpec; + + public PrivilegeObjectDesc(boolean isTable, String object, + HashMap partSpec) { + super(); + this.table = isTable; + this.object = object; + this.partSpec = partSpec; + } + + public PrivilegeObjectDesc() { + } + + @Explain(displayName="is table") + public boolean getTable() { + return table; + } + + public void setTable(boolean isTable) { + this.table = isTable; + } + + @Explain(displayName="object") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + @Explain(displayName="partition spec") + public HashMap getPartSpec() { + return partSpec; + } + + public void setPartSpec(HashMap partSpec) { + this.partSpec = partSpec; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java (revision 0) @@ -0,0 +1,70 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; +import java.util.List; + +@Explain(displayName="Revoke") +public class RevokeDesc extends DDLDesc implements Serializable, Cloneable { + + private static final long serialVersionUID = 1L; + + private List privileges; + + private List principals; + + private PrivilegeObjectDesc privilegeSubjectDesc; + + public RevokeDesc(){ + } + + public RevokeDesc(List privileges, + List principals, PrivilegeObjectDesc privilegeSubjectDesc) { + super(); + this.privileges = privileges; + this.principals = principals; + this.privilegeSubjectDesc = privilegeSubjectDesc; + } + + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(List privileges) { + this.privileges = privileges; + } + + public List getPrincipals() { + return principals; + } + + public void setPrincipals(List principals) { + this.principals = principals; + } + + public PrivilegeObjectDesc getPrivilegeSubjectDesc() { + return privilegeSubjectDesc; + } + + public void setPrivilegeSubjectDesc(PrivilegeObjectDesc privilegeSubjectDesc) { + this.privilegeSubjectDesc = privilegeSubjectDesc; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/RoleDDLDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/RoleDDLDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/RoleDDLDesc.java (revision 0) @@ -0,0 +1,115 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; + +@Explain(displayName = "Create Role") +public class RoleDDLDesc extends DDLDesc implements Serializable { + + private static final long serialVersionUID = 1L; + + private String name; + + private boolean role; + + private boolean group; + + private RoleOperation operation; + + private String resFile; + + public static enum RoleOperation { + DROP_ROLE("drop_role"), CREATE_ROLE("create_role"), SHOW_ROLE_GRANT("show_roles"); + private String operationName; + + private RoleOperation() { + } + + private RoleOperation(String operationName) { + this.operationName = operationName; + } + + public String getOperationName() { + return operationName; + } + + public String toString () { + return this.operationName; + } + } + + public RoleDDLDesc(){ + } + + public RoleDDLDesc(String roleName, RoleOperation operation) { + this(roleName, false, false, operation); + } + + public RoleDDLDesc(String principalName, boolean isRole, boolean isGroup, + RoleOperation operation) { + this.name = principalName; + this.role = isRole; + this.group = isGroup; + this.operation = operation; + } + + @Explain(displayName = "name") + public String getName() { + return name; + } + + public void setName(String roleName) { + this.name = roleName; + } + + @Explain(displayName = "role operation") + public RoleOperation getOperation() { + return operation; + } + + public void setOperation(RoleOperation operation) { + this.operation = operation; + } + + public boolean getRole() { + return role; + } + + public void setRole(boolean role) { + this.role = role; + } + + public boolean getGroup() { + return group; + } + + public void setGroup(boolean group) { + this.group = group; + } + + public String getResFile() { + return resFile; + } + + public void setResFile(String resFile) { + this.resFile = resFile; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/ShowGrantDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/ShowGrantDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ShowGrantDesc.java (revision 0) @@ -0,0 +1,78 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.plan; + +import java.util.List; + +@Explain(displayName="show grant desc") +public class ShowGrantDesc { + + private PrincipalDesc principalDesc; + + private PrivilegeObjectDesc hiveObj; + + private List columns; + + private String resFile; + + public ShowGrantDesc(){ + } + + public ShowGrantDesc(String resFile, PrincipalDesc principalDesc, + PrivilegeObjectDesc subjectObj, List columns) { + this.resFile = resFile; + this.principalDesc = principalDesc; + this.hiveObj = subjectObj; + this.columns = columns; + } + + @Explain(displayName="principal desc") + public PrincipalDesc getPrincipalDesc() { + return principalDesc; + } + + public void setPrincipalDesc(PrincipalDesc principalDesc) { + this.principalDesc = principalDesc; + } + + @Explain(displayName="object") + public PrivilegeObjectDesc getHiveObj() { + return hiveObj; + } + + public void setHiveObj(PrivilegeObjectDesc subjectObj) { + this.hiveObj = subjectObj; + } + + public String getResFile() { + return resFile; + } + + public void setResFile(String resFile) { + this.resFile = resFile; + } + + public List getColumns() { + return columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/Authenticator.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/Authenticator.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/Authenticator.java (revision 0) @@ -0,0 +1,35 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security; + +import java.util.List; + +import org.apache.hadoop.conf.Configuration; + +public interface Authenticator { + + public String getUserName(); + + public List getGroupNames(); + + public boolean detroy(); + + public void init(Configuration conf); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/AuthenticatorFactory.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/AuthenticatorFactory.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/AuthenticatorFactory.java (revision 0) @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public class AuthenticatorFactory { + + @SuppressWarnings("unchecked") + public static Authenticator getAuthenticator(Configuration conf) + throws HiveException { + + String clsStr = HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHENTICATOR_MANAGER); + + Authenticator ret = null; + try { + Class cls = null; + if (clsStr == null || clsStr.trim().equals("")) { + cls = HadoopDefaultAuthenticator.class; + } else { + cls = (Class) Class + .forName(clsStr); + } + if (cls != null) { + ret = cls.newInstance(); + ret.init(conf); + } + } catch (Exception e) { + throw new HiveException(e); + } + + return ret; + } +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/HadoopDefaultAuthenticator.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/HadoopDefaultAuthenticator.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/HadoopDefaultAuthenticator.java (revision 0) @@ -0,0 +1,71 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security; + +import java.util.Arrays; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.shims.ShimLoader; +import org.apache.hadoop.security.UserGroupInformation; + +public class HadoopDefaultAuthenticator implements Authenticator { + + private String userName; + private List groupNames; + + @Override + public List getGroupNames() { + return groupNames; + } + + @Override + public String getUserName() { + return userName; + } + + @Override + public void init(Configuration conf) { + UserGroupInformation ugi = null; + try { + ugi = ShimLoader.getHadoopShims().getUGIForConf(conf); + } catch (Exception e) { + throw new RuntimeException(e); + } + + if (ugi == null) { + throw new RuntimeException( + "Can not initialize HadoopDefaultAuthenticator."); + } + + this.userName = ugi.getUserName(); + if (ugi.getGroupNames() != null) { + this.groupNames = Arrays.asList(ugi.getGroupNames()); + } + + System.out.println("User Name is :" + this.getUserName()); + System.out.println("Group Names are :" + this.getGroupNames()); + } + + @Override + public boolean detroy() { + return true; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationManagerFactory.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationManagerFactory.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationManagerFactory.java (revision 0) @@ -0,0 +1,56 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.security.Authenticator; + +public class AuthorizationManagerFactory { + + @SuppressWarnings("unchecked") + public static AuthorizationProviderManager getAuthorizeProviderManager( + Configuration conf, Authenticator authenticator) throws HiveException { + + String clsStr = HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER); + + AuthorizationProviderManager ret = null; + try { + Class cls = null; + if (clsStr == null || clsStr.trim().equals("")) { + cls = DefaultAuthorizationProviderManager.class; + } else { + cls = (Class) Class + .forName(clsStr); + } + if (cls != null) { + ret = cls.newInstance(); + ret.init(conf); + } + } catch (Exception e) { + throw new HiveException(e); + } + + ret.setAuthenticator(authenticator); + return ret; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProvider.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProvider.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProvider.java (revision 0) @@ -0,0 +1,41 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.Table; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public interface AuthorizationProvider { + + public void init(Configuration conf) throws HiveException; + + public boolean access(Table table, PrincipalPrivilegeSet privs); + + public boolean access(Partition part, PrincipalPrivilegeSet privs); + + public boolean access(Table table, FieldSchema column, PrincipalPrivilegeSet privs); + + public boolean access(PrincipalPrivilegeSet privs); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProviderManager.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProviderManager.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProviderManager.java (revision 0) @@ -0,0 +1,144 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.ql.metadata.AuthorizationException; +import org.apache.hadoop.hive.ql.metadata.Hive; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.metadata.Partition; +import org.apache.hadoop.hive.ql.metadata.Table; +import org.apache.hadoop.hive.ql.security.Authenticator; + +/** + * Hive's authorization provider manager's interface. + */ +public abstract class AuthorizationProviderManager { + + protected Authenticator authenticator; + + protected Hive hive_db; + + public void init(Configuration conf) throws HiveException { + hive_db = Hive.get(new HiveConf(conf, AuthorizationProviderManager.class)); + } + + protected Authenticator getAuthenticator() { + return authenticator; + } + + protected void setAuthenticator(Authenticator authenticator) { + this.authenticator = authenticator; + } + + /** + * Authorization user level privileges. + * + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Privilege[] readRequiredPriv, + Privilege[] writeRequiredPriv) throws HiveException, + AuthorizationException; + + /** + * Authorization privileges against a database object. + * + * @param db + * database + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Database db, Privilege[] readRequiredPriv, + Privilege[] writeRequiredPriv) throws HiveException, + AuthorizationException; + + /** + * Authorization privileges against a hive table object. + * + * @param table + * table object + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Table table, Privilege[] readRequiredPriv, + Privilege[] writeRequiredPriv) throws HiveException, + AuthorizationException; + + /** + * Authorization privileges against a hive partition object. + * + * @param part + * partition object + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Partition part, + Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv) + throws HiveException, AuthorizationException; + + /** + * Authorization privileges against a list of columns. If the partition object + * is not null, look at the column grants for the given partition. Otherwise + * look at the table column grants. + * + * @param table + * table object + * @param part + * partition object + * @param columns + * a list of columns + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Table table, Partition part, + List columns, Privilege[] readRequiredPriv, + Privilege[] writeRequiredPriv) throws HiveException, + AuthorizationException; + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/DefaultAuthorizationProviderManager.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/DefaultAuthorizationProviderManager.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/DefaultAuthorizationProviderManager.java (revision 0) @@ -0,0 +1,433 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.ql.metadata.AuthorizationException; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.metadata.Partition; +import org.apache.hadoop.hive.ql.metadata.Table; +import org.apache.hadoop.util.StringUtils; + +public class DefaultAuthorizationProviderManager extends + AuthorizationProviderManager { + + static class BitSetChecker { + + boolean[] inputCheck = null; + boolean[] outputCheck = null; + + public static BitSetChecker getBitSetChecker(Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) { + BitSetChecker checker = new BitSetChecker(); + if (inputRequiredPriv != null) { + checker.inputCheck = new boolean[inputRequiredPriv.length]; + for (int i = 0; i < checker.inputCheck.length; i++) { + checker.inputCheck[i] = false; + } + } + if (outputRequiredPriv != null) { + checker.outputCheck = new boolean[outputRequiredPriv.length]; + for (int i = 0; i < checker.outputCheck.length; i++) { + checker.outputCheck[i] = false; + } + } + + return checker; + } + + } + + @Override + public boolean authorize(Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) throws HiveException, AuthorizationException { + + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + boolean pass = authorizeUserPriv(inputRequiredPriv, inputCheck, outputRequiredPriv, + outputCheck); + checkAndThrowAuthorizationException(inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck, null, null, null, null); + return pass; + } + + @Override + public boolean authorize(Database db, Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) throws HiveException, AuthorizationException { + + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + boolean pass = authorizeUserAndDBPriv(db, inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck); + + checkAndThrowAuthorizationException(inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck, db.getName(), null, null, null); + + return pass; + } + + @Override + public boolean authorize(Table table, Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) throws HiveException { + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + boolean pass = authorizeUserDBAndTable(table, inputRequiredPriv, + outputRequiredPriv, inputCheck, outputCheck); + checkAndThrowAuthorizationException(inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck, table.getDbName(), table.getTableName(), + null, null); + + return pass; + } + + @Override + public boolean authorize(Partition part, Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) throws HiveException { + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + if (authorizeUserDbAndPartition(part, inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck)){ + return true; + } + + checkAndThrowAuthorizationException(inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck, part.getTable().getDbName(), part + .getTable().getTableName(), part.getName(), null); + + return false; + } + + @Override + public boolean authorize(Table table, Partition part, List columns, + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv) + throws HiveException { + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + String partName = null; + if (part != null) { + partName = part.getName(); + } + + if (partName == null) { + if (authorizeUserDBAndTable(table, inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck)) { + return true; + } + } else { + if (authorizeUserDbAndPartition(part, inputRequiredPriv, + outputRequiredPriv, inputCheck, outputCheck)) { + return true; + } + } + + for (String col : columns) { + + BitSetChecker checker2 = BitSetChecker.getBitSetChecker( + inputRequiredPriv, outputRequiredPriv); + boolean[] inputCheck2 = checker2.inputCheck; + boolean[] outputCheck2 = checker2.outputCheck; + + PrincipalPrivilegeSet partColumnPrivileges = hive_db + .get_column_privilege_set(table.getDbName(), table.getTableName(), + partName, col, this.getAuthenticator().getUserName(), this + .getAuthenticator().getGroupNames()); + + authorizePrivileges(partColumnPrivileges, inputRequiredPriv, inputCheck2, + outputRequiredPriv, outputCheck2); + + if (inputCheck2 != null) { + booleanArrayOr(inputCheck2, inputCheck); + } + if (outputCheck2 != null) { + booleanArrayOr(inputCheck2, inputCheck); + } + + checkAndThrowAuthorizationException(inputRequiredPriv, + outputRequiredPriv, inputCheck2, outputCheck2, table.getDbName(), + table.getTableName(), partName, col); + } + + return true; + } + + protected boolean authorizeUserPriv(Privilege[] inputRequiredPriv, + boolean[] inputCheck, Privilege[] outputRequiredPriv, + boolean[] outputCheck) throws HiveException { + PrincipalPrivilegeSet privileges = hive_db.get_user_privilege_set(this + .getAuthenticator().getUserName(), this.getAuthenticator() + .getGroupNames()); + return authorizePrivileges(privileges, inputRequiredPriv, inputCheck, + outputRequiredPriv, outputCheck); + } + + private boolean authorizeUserAndDBPriv(Database db, + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv, + boolean[] inputCheck, boolean[] outputCheck) throws HiveException { + if (authorizeUserPriv(inputRequiredPriv, inputCheck, outputRequiredPriv, + outputCheck)) { + return true; + } + + PrincipalPrivilegeSet dbPrivileges = hive_db.get_db_privilege_set(db + .getName(), this.getAuthenticator().getUserName(), this + .getAuthenticator().getGroupNames()); + + if (authorizePrivileges(dbPrivileges, inputRequiredPriv, inputCheck, + outputRequiredPriv, outputCheck)) { + return true; + } + + return false; + } + + private boolean authorizeUserDBAndTable(Table table, + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv, + boolean[] inputCheck, boolean[] outputCheck) throws HiveException { + + if (authorizeUserAndDBPriv(hive_db.getDatabase(table.getDbName()), + inputRequiredPriv, outputRequiredPriv, inputCheck, outputCheck)) { + return true; + } + + PrincipalPrivilegeSet tablePrivileges = hive_db.get_table_privilege_set( + table.getDbName(), table.getTableName(), this.getAuthenticator() + .getUserName(), this.getAuthenticator().getGroupNames()); + + if (authorizePrivileges(tablePrivileges, inputRequiredPriv, inputCheck, + outputRequiredPriv, outputCheck)) { + return true; + } + + return false; + } + + private boolean authorizeUserDbAndPartition(Partition part, + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv, + boolean[] inputCheck, boolean[] outputCheck) throws HiveException { + + if (authorizeUserAndDBPriv( + hive_db.getDatabase(part.getTable().getDbName()), inputRequiredPriv, + outputRequiredPriv, inputCheck, outputCheck)) { + return true; + } + + PrincipalPrivilegeSet partPrivileges = part.getTPartition().getPrivileges(); + if(partPrivileges == null) { + partPrivileges = hive_db + .get_partition_privilege_set(part.getTable().getDbName(), part + .getTable().getTableName(), part.getName(), this.getAuthenticator() + .getUserName(), this.getAuthenticator().getGroupNames()); + } + + if (authorizePrivileges(partPrivileges, inputRequiredPriv, inputCheck, + outputRequiredPriv, outputCheck)) { + return true; + } + + return false; + } + + protected boolean authorizePrivileges(PrincipalPrivilegeSet privileges, + Privilege[] inputPriv, boolean[] inputCheck, Privilege[] outputPriv, + boolean[] outputCheck) throws HiveException { + + boolean pass = true; + if (inputPriv != null) { + pass = pass && matchPrivs(inputPriv, privileges, inputCheck); + } + if (outputPriv != null) { + pass = pass && matchPrivs(outputPriv, privileges, outputCheck); + } + return pass; + } + + /** + * try to match an array of privileges from user/groups/roles grants. + * + * @param container + */ + private boolean matchPrivs(Privilege[] inputPriv, + PrincipalPrivilegeSet privileges, boolean[] check) { + + if (inputPriv == null) + return true; + + /* + * user grants + */ + Set privSet = new HashSet(); + if (privileges.getUserPrivileges() != null + && privileges.getUserPrivileges().size() > 0) { + Collection userPrivs = privileges.getUserPrivileges().values(); + if (userPrivs != null && userPrivs.size() > 0) { + for (String priv : userPrivs) { + if (priv == null || priv.trim().equals("")) + continue; + + String[] privs = priv.split(StringUtils.COMMA_STR); + for (String p : privs) { + if (p.equals(Privilege.ALL)) { + setBooleanArray(check, true); + return true; + } + privSet.add(p.toLowerCase()); + } + } + } + } + + /* + * group grants + */ + if (privileges.getGroupPrivileges() != null + && privileges.getGroupPrivileges().size() > 0) { + Collection groupPrivs = privileges.getGroupPrivileges().values(); + if (groupPrivs != null && groupPrivs.size() > 0) { + for (String priv : groupPrivs) { + if (priv == null || priv.trim().equals("")) + continue; + + String[] privs = priv.split(StringUtils.COMMA_STR); + for (String p : privs) { + if (p.equals(Privilege.ALL)) { + setBooleanArray(check, true); + return true; + } + privSet.add(p.toLowerCase()); + } + } + } + } + + /* + * roles grants + */ + if (privileges.getRolePrivileges() != null + && privileges.getRolePrivileges().size() > 0) { + Collection rolePrivs = privileges.getRolePrivileges().values(); + if (rolePrivs != null && rolePrivs.size() > 0) { + for (String priv : rolePrivs) { + if (priv == null || priv.trim().equals("")) + continue; + + String[] privs = priv.split(StringUtils.COMMA_STR); + for (String p : privs) { + if (p.equals(Privilege.ALL)) { + setBooleanArray(check, true); + return true; + } + privSet.add(p.toLowerCase()); + } + } + } + } + + for (int i = 0; i < inputPriv.length; i++) { + String toMatch = inputPriv[i].getPriv(); + if (!check[i]) { + check[i] = privSet.contains(toMatch.toLowerCase()); + } + } + + return firstFalseIndex(check) <0; + } + + private static void setBooleanArray(boolean[] check, boolean b) { + for (int i = 0; i < check.length; i++) { + check[i] = b; + } + } + + private static void booleanArrayOr(boolean[] output, boolean[] input) { + for (int i = 0; i < output.length && i < input.length; i++) { + output[i] = output[i] || input[i]; + } + } + + private void checkAndThrowAuthorizationException( + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv, + boolean[] inputCheck, boolean[] outputCheck,String dbName, + String tableName, String partitionName, String columnName) { + + String hiveObject = "{ "; + if (dbName != null) { + hiveObject = hiveObject + "database:" + dbName; + } + if (tableName != null) { + hiveObject = hiveObject + ", table:" + tableName; + } + if (partitionName != null) { + hiveObject = hiveObject + ", partitionName:" + partitionName; + } + if (columnName != null) { + hiveObject = hiveObject + ", columnName:" + columnName; + } + hiveObject = hiveObject + "}"; + + if (inputCheck != null) { + int input = this.firstFalseIndex(inputCheck); + if (input >= 0) { + throw new AuthorizationException("No privilege '" + + inputRequiredPriv[input].getPriv() + "' found for inputs " + + hiveObject); + } + } + + if (outputCheck != null) { + int output = this.firstFalseIndex(outputCheck); + if (output >= 0) { + throw new AuthorizationException("No privilege '" + + outputRequiredPriv[output].getPriv() + "' found for outputs " + + hiveObject); + } + } + } + + private int firstFalseIndex(boolean[] inputCheck) { + if (inputCheck != null) { + for (int i = 0; i < inputCheck.length; i++) { + if (!inputCheck[i]) { + return i; + } + } + } + return -1; + } +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/Privilege.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/Privilege.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/Privilege.java (revision 0) @@ -0,0 +1,94 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.EnumSet; + +public class Privilege { + + private String priv; + + private EnumSet supportedScopeSet; + + private Privilege(String priv, EnumSet scopeSet) { + super(); + this.priv = priv; + this.supportedScopeSet = scopeSet; + } + + public Privilege(String priv) { + super(); + this.priv = priv; + + } + + public String getPriv() { + return priv; + } + + public void setPriv(String priv) { + this.priv = priv; + } + + public boolean supportColumnLevel() { + return supportedScopeSet != null + && supportedScopeSet.contains(PrivilegeScope.COLUMN_LEVEL_SCOPE); + } + + public boolean supportDBLevel() { + return supportedScopeSet != null + && supportedScopeSet.contains(PrivilegeScope.DB_LEVEL_SCOPE); + } + + public boolean supportTableLevel() { + return supportedScopeSet != null + && supportedScopeSet.contains(PrivilegeScope.TABLE_LEVEL_SCOPE); + } + + public Privilege() { + } + + public static Privilege ALL = new Privilege("All", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege ALTER_METADATA = new Privilege("Alter", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege ALTER_DATA = new Privilege("Update", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege CREATE = new Privilege("Create", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege DROP = new Privilege("Drop", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege INDEX = new Privilege("Index", + PrivilegeScope.ALLSCOPE); + + public static Privilege LOCK = new Privilege("Lock", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege SELECT = new Privilege("Select", + PrivilegeScope.ALLSCOPE); + + public static Privilege SHOW_DATABASE = new Privilege("Show_Database", + EnumSet.of(PrivilegeScope.USER_LEVEL_SCOPE)); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeRegistry.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeRegistry.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeRegistry.java (revision 0) @@ -0,0 +1,47 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.HashMap; +import java.util.Map; + +public class PrivilegeRegistry { + + protected static Map Registry = new HashMap(); + + static { + Registry.put(Privilege.ALL.getPriv().toLowerCase(), Privilege.ALL); + Registry.put(Privilege.ALTER_DATA.getPriv().toLowerCase(), + Privilege.ALTER_DATA); + Registry.put(Privilege.ALTER_METADATA.getPriv().toLowerCase(), + Privilege.ALTER_METADATA); + Registry.put(Privilege.CREATE.getPriv().toLowerCase(), Privilege.CREATE); + Registry.put(Privilege.DROP.getPriv().toLowerCase(), Privilege.DROP); + Registry.put(Privilege.INDEX.getPriv().toLowerCase(), Privilege.INDEX); + Registry.put(Privilege.LOCK.getPriv().toLowerCase(), Privilege.LOCK); + Registry.put(Privilege.SELECT.getPriv().toLowerCase(), Privilege.SELECT); + Registry.put(Privilege.SHOW_DATABASE.getPriv().toLowerCase(), + Privilege.SHOW_DATABASE); + } + + public static Privilege getPrivilege(String privilegeName) { + return Registry.get(privilegeName.toLowerCase()); + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeScope.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeScope.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeScope.java (revision 0) @@ -0,0 +1,57 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.EnumSet; + +/** + * PrivilegeScope describes a hive defined privilege's scope + * (global/database/table/column). For example some hive privileges are + * db-level only, some are global, and some are table only. + */ +public enum PrivilegeScope { + + USER_LEVEL_SCOPE((short) 0x01), + DB_LEVEL_SCOPE((short) 0x02), + TABLE_LEVEL_SCOPE((short) 0x04), + COLUMN_LEVEL_SCOPE((short) 0x08); + + private short mode; + + private PrivilegeScope(short mode) { + this.mode = mode; + } + + public short getMode() { + return mode; + } + + public void setMode(short mode) { + this.mode = mode; + } + + public static EnumSet ALLSCOPE = EnumSet.of( + PrivilegeScope.USER_LEVEL_SCOPE, PrivilegeScope.DB_LEVEL_SCOPE, + PrivilegeScope.TABLE_LEVEL_SCOPE, PrivilegeScope.COLUMN_LEVEL_SCOPE); + + public static EnumSet ALLSCOPE_EXCEPT_COLUMN = EnumSet.of( + PrivilegeScope.USER_LEVEL_SCOPE, PrivilegeScope.DB_LEVEL_SCOPE, + PrivilegeScope.TABLE_LEVEL_SCOPE); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/session/CreateTableAutomaticGrant.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/session/CreateTableAutomaticGrant.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/session/CreateTableAutomaticGrant.java (revision 0) @@ -0,0 +1,107 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.session; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.security.authorization.Privilege; +import org.apache.hadoop.hive.ql.security.authorization.PrivilegeRegistry; + +public class CreateTableAutomaticGrant { + private String ownerGrants; + private Map userGrants; + private Map groupGrants; + private Map roleGrants; + + public static CreateTableAutomaticGrant create(HiveConf conf) + throws HiveException { + CreateTableAutomaticGrant grants = new CreateTableAutomaticGrant(); + String ownerGrantsInConfig = HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_TABLE_OWNER_GRANTS); + + if (ownerGrantsInConfig != null && !ownerGrantsInConfig.trim().equals("")) { + checkPrivilege(ownerGrantsInConfig); + grants.ownerGrants = ownerGrantsInConfig; + } + grants.userGrants = getGrantMap(HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_TABLE_USER_GRANTS)); + grants.groupGrants = getGrantMap(HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_TABLE_GROUP_GRANTS)); + grants.roleGrants = getGrantMap(HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_TABLE_ROLE_GRANTS)); + return grants; + } + + private static Map getGrantMap(String grantMapStr) + throws HiveException { + if (grantMapStr != null && !grantMapStr.trim().equals("")) { + String[] grantArrayStr = grantMapStr.split(";"); + Map grantsMap = new HashMap(); + for (String grantStr : grantArrayStr) { + String[] principalListAndPrivList = grantStr.split(":"); + if (principalListAndPrivList.length != 2 + || principalListAndPrivList[0] == null + || principalListAndPrivList[0].trim().equals("")) { + throw new HiveException( + "Can not understand the config privilege definition " + grantStr); + } + String userList = principalListAndPrivList[0]; + String privList = principalListAndPrivList[1]; + checkPrivilege(privList); + String[] users = userList.split(","); + for (String user : users) { + grantsMap.put(user, privList); + } + } + return grantsMap; + } + return null; + } + + private static void checkPrivilege(String ownerGrantsInConfig) + throws HiveException { + String[] ownerGrantArray = ownerGrantsInConfig.split(","); + // verify the config + for (String ownerGrant : ownerGrantArray) { + Privilege prive = PrivilegeRegistry.getPrivilege(ownerGrant); + if (prive == null) { + throw new HiveException("Privilege " + ownerGrant + " is not found."); + } + } + } + + public String getOwnerGrants() { + return ownerGrants; + } + + public Map getUserGrants() { + return userGrants; + } + + public Map getGroupGrants() { + return groupGrants; + } + + public Map getRoleGrants() { + return roleGrants; + } +} \ No newline at end of file Index: ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (revision 1044070) +++ ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (working copy) @@ -40,6 +40,12 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.exec.Utilities; import org.apache.hadoop.hive.ql.history.HiveHistory; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.plan.HiveOperation; +import org.apache.hadoop.hive.ql.security.Authenticator; +import org.apache.hadoop.hive.ql.security.AuthenticatorFactory; +import org.apache.hadoop.hive.ql.security.authorization.AuthorizationManagerFactory; +import org.apache.hadoop.hive.ql.security.authorization.AuthorizationProviderManager; import org.apache.hadoop.hive.ql.util.DosToUnix; import org.apache.log4j.LogManager; import org.apache.log4j.PropertyConfigurator; @@ -77,8 +83,14 @@ /** * type of the command. */ - private String commandType; - + private HiveOperation commandType; + + private AuthorizationProviderManager authorizer; + + private Authenticator authenticator; + + private CreateTableAutomaticGrant createTableGrants; + /** * Lineage state. */ @@ -150,11 +162,16 @@ /** * start a new session and set it to current session. + * @throws HiveException */ - public static SessionState start(HiveConf conf) { + public static SessionState start(HiveConf conf) throws HiveException { SessionState ss = new SessionState(conf); ss.getConf().setVar(HiveConf.ConfVars.HIVESESSIONID, makeSessionId()); ss.hiveHist = new HiveHistory(ss); + ss.authenticator = AuthenticatorFactory.getAuthenticator(conf); + ss.authorizer = AuthorizationManagerFactory.getAuthorizeProviderManager( + conf, ss.authenticator); + ss.createTableGrants = CreateTableAutomaticGrant.create(conf); tss.set(ss); return (ss); } @@ -163,6 +180,7 @@ * set current session to existing session object if a thread is running * multiple sessions - it must call this method with the new session object * when switching from one session to another. + * @throws HiveException */ public static SessionState start(SessionState startSs) { @@ -176,6 +194,18 @@ if (startSs.hiveHist == null) { startSs.hiveHist = new HiveHistory(startSs); } + + try { + startSs.authenticator = AuthenticatorFactory.getAuthenticator(startSs + .getConf()); + startSs.authorizer = AuthorizationManagerFactory + .getAuthorizeProviderManager(startSs.getConf(), startSs.authenticator); + startSs.createTableGrants = CreateTableAutomaticGrant.create(startSs + .getConf()); + } catch (HiveException e) { + throw new RuntimeException(e); + } + return startSs; } @@ -539,10 +569,38 @@ } public String getCommandType() { + return commandType.getOperationName(); + } + + public HiveOperation getHiveOperation() { return commandType; } - public void setCommandType(String commandType) { + public void setCommandType(HiveOperation commandType) { this.commandType = commandType; } + + public AuthorizationProviderManager getAuthorizer() { + return authorizer; + } + + public void setAuthorizer(AuthorizationProviderManager authorizer) { + this.authorizer = authorizer; + } + + public Authenticator getAuthenticator() { + return authenticator; + } + + public void setAuthenticator(Authenticator authenticator) { + this.authenticator = authenticator; + } + + public CreateTableAutomaticGrant getCreateTableGrants() { + return createTableGrants; + } + + public void setCreateTableGrants(CreateTableAutomaticGrant createTableGrants) { + this.createTableGrants = createTableGrants; + } } Index: ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (revision 1044070) +++ ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (working copy) @@ -24,10 +24,12 @@ import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.PrintStream; import java.io.Serializable; +import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Arrays; import java.util.Deque; @@ -389,6 +391,9 @@ } public void createSources() throws Exception { + + startSessionState(); + // Create a bunch of tables with columns key and value LinkedList cols = new LinkedList(); cols.add("key"); @@ -490,7 +495,8 @@ testWarehouse = conf.getVar(HiveConf.ConfVars.METASTOREWAREHOUSE); // conf.logVars(System.out); // System.out.flush(); - + + SessionState.start(conf); db = Hive.get(conf); fs = FileSystem.get(conf); drv = new Driver(conf); @@ -541,6 +547,8 @@ createSources(); } + HiveConf.setVar(conf, HiveConf.ConfVars.HIVE_AUTHENTICATOR_MANAGER, + "org.apache.hadoop.hive.ql.security.DummpyAuthenticator"); CliSessionState ss = new CliSessionState(conf); assert ss != null; ss.in = System.in; @@ -554,7 +562,7 @@ ss.err = ss.out; ss.setIsSilent(true); SessionState oldSs = SessionState.get(); - if (oldSs != null) { + if (oldSs != null && oldSs.out != null && oldSs.out != System.out) { oldSs.out.close(); } SessionState.start(ss); @@ -566,6 +574,19 @@ cliDriver.processInitFiles(ss); } + private CliSessionState startSessionState() + throws FileNotFoundException, UnsupportedEncodingException { + + HiveConf.setVar(conf, HiveConf.ConfVars.HIVE_AUTHENTICATOR_MANAGER, + "org.apache.hadoop.hive.ql.security.DummpyAuthenticator"); + + CliSessionState ss = new CliSessionState(conf); + assert ss != null; + + SessionState.start(ss); + return ss; + } + public int executeOne(String tname) { String q = qMap.get(tname); @@ -898,6 +919,7 @@ "-I", "at junit", "-I", "Caused by:", "-I", "LOCK_QUERYID:", + "-I", "grantTime", "-I", "[.][.][.] [0-9]* more", (new File(logDir, tname + ".out")).getPath(), outFileName }; Index: ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSemanticAnalyzerHookLoading.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSemanticAnalyzerHookLoading.java (revision 1044070) +++ ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSemanticAnalyzerHookLoading.java (working copy) @@ -27,6 +27,7 @@ import org.apache.hadoop.hive.metastore.MetaStoreUtils; import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; +import org.apache.hadoop.hive.ql.session.SessionState; public class TestSemanticAnalyzerHookLoading extends TestCase { @@ -35,6 +36,7 @@ HiveConf conf = new HiveConf(this.getClass()); conf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, DummySemanticAnalyzerHook.class.getName()); conf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + SessionState.start(conf); Driver driver = new Driver(conf); driver.run("drop table testDL"); Index: ql/src/test/org/apache/hadoop/hive/ql/security/DummpyAuthenticator.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/security/DummpyAuthenticator.java (revision 0) +++ ql/src/test/org/apache/hadoop/hive/ql/security/DummpyAuthenticator.java (revision 0) @@ -0,0 +1,39 @@ +package org.apache.hadoop.hive.ql.security; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; + +public class DummpyAuthenticator implements Authenticator { + + private List groupNames; + private String userName; + + public DummpyAuthenticator() { + this.groupNames = new ArrayList(); + groupNames.add("hive_test_group1"); + groupNames.add("hive_test_group2"); + userName = "hive_test_user"; + } + + @Override + public boolean detroy() { + return true; + } + + @Override + public List getGroupNames() { + return groupNames; + } + + @Override + public String getUserName() { + return userName; + } + + @Override + public void init(Configuration conf) { + } + +} Index: ql/src/test/queries/clientnegative/authorization_part.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_part.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_part.q (revision 0) @@ -0,0 +1,32 @@ +create table authorization_part_fail (key int, value string) partitioned by (ds string); +set hive.security.authorization.enabled=true; + +grant `Create` on table authorization_part_fail to user hive_test_user; +grant `Update` on table authorization_part_fail to user hive_test_user; +grant `Drop` on table authorization_part_fail to user hive_test_user; +grant `select` on table src to user hive_test_user; + +-- column grant to group + +grant `select`(key) on table authorization_part_fail to group hive_test_group1; +grant `select` on table authorization_part_fail to group hive_test_group1; + +show grant group hive_test_group1 on table authorization_part_fail; + +insert overwrite table authorization_part_fail partition (ds='2010') select key, value from src; +show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part_fail partition (ds='2010'); +select key, value from authorization_part_fail where ds='2010' order by key limit 20; + +insert overwrite table authorization_part_fail partition (ds='2011') select key, value from src; +show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2011'); +show grant group hive_test_group1 on table authorization_part_fail partition (ds='2011'); +select key, value from authorization_part_fail where ds='2011' order by key limit 20; + +select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20; + +revoke `select` on table authorization_part_fail partition (ds='2010') from group hive_test_group1; + +select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20; + +drop table authorization_part_fail; \ No newline at end of file Index: ql/src/test/queries/clientpositive/authorization_1.q =================================================================== --- ql/src/test/queries/clientpositive/authorization_1.q (revision 0) +++ ql/src/test/queries/clientpositive/authorization_1.q (revision 0) @@ -0,0 +1,87 @@ +create table src_autho_test as select * from src; +set hive.security.authorization.enabled=true; +grant `drop` on table src_autho_test to user hive_test_user; + +--table grant to user + +grant `select` on table src_autho_test to user hive_test_user; + +show grant user hive_test_user on table src_autho_test; +show grant user hive_test_user on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select` on table src_autho_test from user hive_test_user; +show grant user hive_test_user on table src_autho_test; +show grant user hive_test_user on table src_autho_test(key); + +--column grant to user + +grant `select`(key) on table src_autho_test to user hive_test_user; + +show grant user hive_test_user on table src_autho_test; +show grant user hive_test_user on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select`(key) on table src_autho_test from user hive_test_user; +show grant user hive_test_user on table src_autho_test; +show grant user hive_test_user on table src_autho_test(key); + +--table grant to group + +grant `select` on table src_autho_test to group hive_test_group1; + +show grant group hive_test_group1 on table src_autho_test; +show grant group hive_test_group1 on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select` on table src_autho_test from group hive_test_group1; +show grant group hive_test_group1 on table src_autho_test; +show grant group hive_test_group1 on table src_autho_test(key); + +--column grant to group + +grant `select`(key) on table src_autho_test to group hive_test_group1; + +show grant group hive_test_group1 on table src_autho_test; +show grant group hive_test_group1 on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select`(key) on table src_autho_test from group hive_test_group1; +show grant group hive_test_group1 on table src_autho_test; +show grant group hive_test_group1 on table src_autho_test(key); + +--role +create role src_role; +grant role src_role to user hive_test_user; +show role grant user hive_test_user; + +--column grant to role + +grant `select`(key) on table src_autho_test to role src_role; + +show grant role src_role on table src_autho_test; +show grant role src_role on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select`(key) on table src_autho_test from role src_role; + +--table grant to role + +grant `select` on table src_autho_test to role src_role; + +select key from src_autho_test order by key limit 20; + +show grant role src_role on table src_autho_test; +show grant role src_role on table src_autho_test(key); +revoke `select` on table src_autho_test from role src_role; + +-- drop role +drop role src_role; + +set hive.security.authorization.enabled=false; +drop table src_autho_test; \ No newline at end of file Index: ql/src/test/queries/clientpositive/authorization_2.q =================================================================== --- ql/src/test/queries/clientpositive/authorization_2.q (revision 0) +++ ql/src/test/queries/clientpositive/authorization_2.q (revision 0) @@ -0,0 +1,107 @@ +create table authorization_part (key int, value string) partitioned by (ds string); +set hive.security.authorization.enabled=true; + +-- column grant to user +grant `Create` on table authorization_part to user hive_test_user; +grant `Update` on table authorization_part to user hive_test_user; +grant `Drop` on table authorization_part to user hive_test_user; +grant `select` on table src to user hive_test_user; + +show grant user hive_test_user on table authorization_part; + +alter table authorization_part add partition (ds='2010'); +show grant user hive_test_user on table authorization_part partition (ds='2010'); + +grant `select`(key) on table authorization_part to user hive_test_user; +alter table authorization_part drop partition (ds='2010'); +insert overwrite table authorization_part partition (ds='2010') select key, value from src; +show grant user hive_test_user on table authorization_part(key) partition (ds='2010'); +show grant user hive_test_user on table authorization_part(key); +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select`(key) on table authorization_part from user hive_test_user; +show grant user hive_test_user on table authorization_part(key); +show grant user hive_test_user on table authorization_part(key) partition (ds='2010'); + +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select`(key) on table authorization_part partition (ds='2010') from user hive_test_user; +show grant user hive_test_user on table authorization_part(key) partition (ds='2010'); + +alter table authorization_part drop partition (ds='2010'); + +-- table grant to user +show grant user hive_test_user on table authorization_part; + +alter table authorization_part add partition (ds='2010'); +show grant user hive_test_user on table authorization_part partition (ds='2010'); + +grant `select` on table authorization_part to user hive_test_user; +alter table authorization_part drop partition (ds='2010'); +insert overwrite table authorization_part partition (ds='2010') select key, value from src; +show grant user hive_test_user on table authorization_part partition (ds='2010'); +show grant user hive_test_user on table authorization_part; +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select` on table authorization_part from user hive_test_user; +show grant user hive_test_user on table authorization_part; +show grant user hive_test_user on table authorization_part partition (ds='2010'); + +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select` on table authorization_part partition (ds='2010') from user hive_test_user; +show grant user hive_test_user on table authorization_part partition (ds='2010'); + +alter table authorization_part drop partition (ds='2010'); + +-- column grant to group + +show grant group hive_test_group1 on table authorization_part; + +alter table authorization_part add partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); + +grant `select`(key) on table authorization_part to group hive_test_group1; +alter table authorization_part drop partition (ds='2010'); +insert overwrite table authorization_part partition (ds='2010') select key, value from src; +show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part(key); +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select`(key) on table authorization_part from group hive_test_group1; +show grant group hive_test_group1 on table authorization_part(key); +show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010'); + +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select`(key) on table authorization_part partition (ds='2010') from group hive_test_group1; +show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010'); + +alter table authorization_part drop partition (ds='2010'); + +-- table grant to group +show grant group hive_test_group1 on table authorization_part; + +alter table authorization_part add partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); + +grant `select` on table authorization_part to group hive_test_group1; +alter table authorization_part drop partition (ds='2010'); +insert overwrite table authorization_part partition (ds='2010') select key, value from src; +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part; +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select` on table authorization_part from group hive_test_group1; +show grant group hive_test_group1 on table authorization_part; +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); + +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select` on table authorization_part partition (ds='2010') from group hive_test_group1; +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); + + +revoke `select` on table src from user hive_test_user; +set hive.security.authorization.enabled=false; +drop table authorization_part; \ No newline at end of file Index: ql/src/test/queries/clientpositive/input19.q =================================================================== --- ql/src/test/queries/clientpositive/input19.q (revision 1044070) +++ ql/src/test/queries/clientpositive/input19.q (working copy) @@ -1,5 +1,5 @@ -create table apachelog(ipaddress STRING,identd STRING,user STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE; +create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE; LOAD DATA LOCAL INPATH '../data/files/apache.access.log' INTO TABLE apachelog; SELECT a.* FROM apachelog a; Index: ql/src/test/queries/clientpositive/show_indexes_edge_cases.q =================================================================== --- ql/src/test/queries/clientpositive/show_indexes_edge_cases.q (revision 1044070) +++ ql/src/test/queries/clientpositive/show_indexes_edge_cases.q (working copy) @@ -21,5 +21,7 @@ EXPLAIN SHOW INDEXES ON show_idx_empty; SHOW INDEXES ON show_idx_empty; +DROP INDEX idx_1 on show_idx_full; +DROP INDEX idx_2 on show_idx_full; DROP TABLE show_idx_empty; DROP TABLE show_idx_full; \ No newline at end of file Index: ql/src/test/results/clientnegative/authorization_part.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_part.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_part.q.out (revision 0) @@ -0,0 +1,221 @@ +PREHOOK: query: create table authorization_part_fail (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_part_fail (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_part_fail +PREHOOK: query: grant `Create` on table authorization_part_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Create` on table authorization_part_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Update` on table authorization_part_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Update` on table authorization_part_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Drop` on table authorization_part_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Drop` on table authorization_part_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `select` on table src to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table src to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: -- column grant to group + +grant `select`(key) on table authorization_part_fail to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: -- column grant to group + +grant `select`(key) on table authorization_part_fail to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `select` on table authorization_part_fail to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table authorization_part_fail to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_part_fail +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479194 +grantor +PREHOOK: query: insert overwrite table authorization_part_fail partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part_fail@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part_fail partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part_fail@ds=2010 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part_fail +partition ds=2010 +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479202 +grantor +PREHOOK: query: select key, value from authorization_part_fail where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part_fail@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-26-42_759_1779156117369051908/-mr-10000 +POSTHOOK: query: select key, value from authorization_part_fail where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part_fail@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-26-42_759_1779156117369051908/-mr-10000 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 val_0 +0 val_0 +0 val_0 +2 val_2 +4 val_4 +5 val_5 +5 val_5 +5 val_5 +8 val_8 +9 val_9 +10 val_10 +11 val_11 +12 val_12 +12 val_12 +15 val_15 +15 val_15 +17 val_17 +18 val_18 +18 val_18 +19 val_19 +PREHOOK: query: insert overwrite table authorization_part_fail partition (ds='2011') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part_fail@ds=2011 +POSTHOOK: query: insert overwrite table authorization_part_fail partition (ds='2011') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part_fail@ds=2011 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2011') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2011') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail partition (ds='2011') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail partition (ds='2011') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part_fail +partition ds=2011 +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479216 +grantor +PREHOOK: query: select key, value from authorization_part_fail where ds='2011' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part_fail@ds=2011 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-26-56_557_7936329148326763248/-mr-10000 +POSTHOOK: query: select key, value from authorization_part_fail where ds='2011' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part_fail@ds=2011 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-26-56_557_7936329148326763248/-mr-10000 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 val_0 +0 val_0 +0 val_0 +2 val_2 +4 val_4 +5 val_5 +5 val_5 +5 val_5 +8 val_8 +9 val_9 +10 val_10 +11 val_11 +12 val_12 +12 val_12 +15 val_15 +15 val_15 +17 val_17 +18 val_18 +18 val_18 +19 val_19 +PREHOOK: query: select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part_fail@ds=2010 +PREHOOK: Input: default@authorization_part_fail@ds=2011 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-27-02_075_8407359943032574085/-mr-10000 +POSTHOOK: query: select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part_fail@ds=2010 +POSTHOOK: Input: default@authorization_part_fail@ds=2011 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-27-02_075_8407359943032574085/-mr-10000 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 val_0 2010 +0 val_0 2010 +0 val_0 2010 +0 val_0 2011 +0 val_0 2011 +0 val_0 2011 +2 val_2 2010 +2 val_2 2011 +4 val_4 2010 +4 val_4 2011 +5 val_5 2010 +5 val_5 2010 +5 val_5 2010 +5 val_5 2011 +5 val_5 2011 +5 val_5 2011 +8 val_8 2010 +8 val_8 2011 +9 val_9 2010 +9 val_9 2011 +PREHOOK: query: revoke `select` on table authorization_part_fail partition (ds='2010') from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part_fail partition (ds='2010') from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +Authrization failed:No privilege 'Select' found for inputs { database:default, table:authorization_part_fail, partitionName:ds=2010, columnName:value}. Use show grant to get more details. Index: ql/src/test/results/clientpositive/alter4.q.out =================================================================== --- ql/src/test/results/clientpositive/alter4.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/alter4.q.out (working copy) @@ -10,13 +10,13 @@ key int value string -Detailed Table Information Table(tableName:set_bucketing_test, dbName:default, owner:thiruvel, createTime:1286800231, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:10, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286800231}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:set_bucketing_test, dbName:default, owner:heyongqiang, createTime:1290068480, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:10, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1290068480}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: ALTER TABLE set_bucketing_test NOT CLUSTERED -PREHOOK: type: null +PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@set_bucketing_test PREHOOK: Output: default@set_bucketing_test POSTHOOK: query: ALTER TABLE set_bucketing_test NOT CLUSTERED -POSTHOOK: type: null +POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@set_bucketing_test POSTHOOK: Output: default@set_bucketing_test PREHOOK: query: DESCRIBE EXTENDED set_bucketing_test @@ -26,7 +26,7 @@ key int value string -Detailed Table Information Table(tableName:set_bucketing_test, dbName:default, owner:thiruvel, createTime:1286800231, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_by=thiruvel, last_modified_time=1286800231, transient_lastDdlTime=1286800231}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:set_bucketing_test, dbName:default, owner:heyongqiang, createTime:1290068480, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_by=heyongqiang, last_modified_time=1290068480, transient_lastDdlTime=1290068480}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: -- Cleanup DROP TABLE set_bucketing_test PREHOOK: type: DROPTABLE @@ -77,13 +77,13 @@ key int value string -Detailed Table Information Table(tableName:set_bucketing_test, dbName:alter4_db, owner:thiruvel, createTime:1286800232, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/alter4_db.db/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:10, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286800232}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:set_bucketing_test, dbName:alter4_db, owner:heyongqiang, createTime:1290068481, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/alter4_db.db/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:10, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1290068481}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: ALTER TABLE set_bucketing_test NOT CLUSTERED -PREHOOK: type: null +PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: alter4_db@set_bucketing_test PREHOOK: Output: alter4_db@set_bucketing_test POSTHOOK: query: ALTER TABLE set_bucketing_test NOT CLUSTERED -POSTHOOK: type: null +POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: alter4_db@set_bucketing_test POSTHOOK: Output: alter4_db@set_bucketing_test PREHOOK: query: DESCRIBE EXTENDED set_bucketing_test @@ -93,7 +93,7 @@ key int value string -Detailed Table Information Table(tableName:set_bucketing_test, dbName:alter4_db, owner:thiruvel, createTime:1286800232, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/alter4_db.db/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_by=thiruvel, last_modified_time=1286800232, transient_lastDdlTime=1286800232}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:set_bucketing_test, dbName:alter4_db, owner:heyongqiang, createTime:1290068481, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/alter4_db.db/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_by=heyongqiang, last_modified_time=1290068481, transient_lastDdlTime=1290068481}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: DROP TABLE set_bucketing_test PREHOOK: type: DROPTABLE PREHOOK: Input: alter4_db@set_bucketing_test Index: ql/src/test/results/clientpositive/authorization_1.q.out =================================================================== --- ql/src/test/results/clientpositive/authorization_1.q.out (revision 0) +++ ql/src/test/results/clientpositive/authorization_1.q.out (revision 0) @@ -0,0 +1,435 @@ +PREHOOK: query: create table src_autho_test as select * from src +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +POSTHOOK: query: create table src_autho_test as select * from src +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: grant `drop` on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `drop` on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: --table grant to user + +grant `select` on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --table grant to user + +grant `select` on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290054119 +grantor + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290054119 +grantor +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-21-59_301_6646767296108941712/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-21-59_301_6646767296108941712/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select` on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290054119 +grantor +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: --column grant to user + +grant `select`(key) on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --column grant to user + +grant `select`(key) on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290054119 +grantor +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +columnName key +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290054125 +grantor +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-05_277_8944836447004950426/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-05_277_8944836447004950426/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select`(key) on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290054119 +grantor +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: --table grant to group + +grant `select` on table src_autho_test to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --table grant to group + +grant `select` on table src_autho_test to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290054131 +grantor +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-11_230_4053213311608085494/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-11_230_4053213311608085494/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select` on table src_autho_test from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table src_autho_test from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: --column grant to group + +grant `select`(key) on table src_autho_test to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --column grant to group + +grant `select`(key) on table src_autho_test to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-17_512_4648862264183836693/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-17_512_4648862264183836693/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select`(key) on table src_autho_test from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table src_autho_test from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: --role +create role src_role +PREHOOK: type: CREATEROLE +POSTHOOK: query: --role +create role src_role +POSTHOOK: type: CREATEROLE +PREHOOK: query: grant role src_role to user hive_test_user +PREHOOK: type: GRANT_ROLE +POSTHOOK: query: grant role src_role to user hive_test_user +POSTHOOK: type: GRANT_ROLE +PREHOOK: query: show role grant user hive_test_user +PREHOOK: type: SHOW_ROLE_GRANT +POSTHOOK: query: show role grant user hive_test_user +POSTHOOK: type: SHOW_ROLE_GRANT +role name:src_role +database:default +database:default +PREHOOK: query: --column grant to role + +grant `select`(key) on table src_autho_test to role src_role +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --column grant to role + +grant `select`(key) on table src_autho_test to role src_role +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant role src_role on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role src_role on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: show grant role src_role on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role src_role on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-23_448_4304254819185136892/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-23_448_4304254819185136892/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select`(key) on table src_autho_test from role src_role +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table src_autho_test from role src_role +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: --table grant to role + +grant `select` on table src_autho_test to role src_role +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --table grant to role + +grant `select` on table src_autho_test to role src_role +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-28_949_4896291117896236466/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-28_949_4896291117896236466/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: show grant role src_role on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role src_role on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName src_role +isRole true +isGroup false +privileges Select +grantTime 1290054148 +grantor +PREHOOK: query: show grant role src_role on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role src_role on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: revoke `select` on table src_autho_test from role src_role +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table src_autho_test from role src_role +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: -- drop role +drop role src_role +PREHOOK: type: DROPROLE +POSTHOOK: query: -- drop role +drop role src_role +POSTHOOK: type: DROPROLE +PREHOOK: query: drop table src_autho_test +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: drop table src_autho_test +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: default@src_autho_test Index: ql/src/test/results/clientpositive/authorization_2.q.out =================================================================== --- ql/src/test/results/clientpositive/authorization_2.q.out (revision 0) +++ ql/src/test/results/clientpositive/authorization_2.q.out (revision 0) @@ -0,0 +1,1179 @@ +PREHOOK: query: create table authorization_part (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_part (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_part +PREHOOK: query: -- column grant to user +grant `Create` on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: -- column grant to user +grant `Create` on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Update` on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Update` on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Drop` on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Drop` on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `select` on table src to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table src to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478979 +grantor +PREHOOK: query: alter table authorization_part add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_part +POSTHOOK: query: alter table authorization_part add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478980 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478980 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478980 +grantor +PREHOOK: query: grant `select`(key) on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select`(key) on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +PREHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +columnName key +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290478988 +grantor +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +columnName key +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290478980 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-09_416_6111547627532551311/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-09_416_6111547627532551311/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select`(key) on table authorization_part from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table authorization_part from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +columnName key +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290478988 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-15_106_6459176743162425468/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-15_106_6459176743162425468/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select`(key) on table authorization_part partition (ds='2010') from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table authorization_part partition (ds='2010') from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: -- table grant to user +show grant user hive_test_user on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: -- table grant to user +show grant user hive_test_user on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478979 +grantor +PREHOOK: query: alter table authorization_part add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_part +POSTHOOK: query: alter table authorization_part add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290479002 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290479002 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290479002 +grantor +PREHOOK: query: grant `select` on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290479010 +grantor +PREHOOK: query: show grant user hive_test_user on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290479002 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-31_355_5632846337047371530/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-31_355_5632846337047371530/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select` on table authorization_part from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478979 +grantor +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290479010 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-36_378_2102590248400137570/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-36_378_2102590248400137570/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select` on table authorization_part partition (ds='2010') from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part partition (ds='2010') from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290479010 +grantor +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: -- column grant to group + +show grant group hive_test_group1 on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: -- column grant to group + +show grant group hive_test_group1 on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_part +POSTHOOK: query: alter table authorization_part add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: grant `select`(key) on table authorization_part to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select`(key) on table authorization_part to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-51_947_8806736878127153124/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-51_947_8806736878127153124/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select`(key) on table authorization_part from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table authorization_part from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-58_540_2340950450233118013/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-58_540_2340950450233118013/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select`(key) on table authorization_part partition (ds='2010') from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table authorization_part partition (ds='2010') from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: -- table grant to group +show grant group hive_test_group1 on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: -- table grant to group +show grant group hive_test_group1 on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_part +POSTHOOK: query: alter table authorization_part add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: grant `select` on table authorization_part to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table authorization_part to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479051 +grantor +PREHOOK: query: show grant group hive_test_group1 on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479044 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-24-11_840_4929451702228517202/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-24-11_840_4929451702228517202/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select` on table authorization_part from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479051 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-24-16_319_9180718715012263989/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-24-16_319_9180718715012263989/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select` on table authorization_part partition (ds='2010') from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part partition (ds='2010') from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: revoke `select` on table src from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table src from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: drop table authorization_part +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part +POSTHOOK: query: drop table authorization_part +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] Index: ql/src/test/results/clientpositive/bucket_groupby.q.out =================================================================== --- ql/src/test/results/clientpositive/bucket_groupby.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/bucket_groupby.q.out (working copy) @@ -11,7 +11,7 @@ value string ds string -Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1288389460, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/hive-trunk/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{transient_lastDdlTime=1288389460}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:heyongqiang, createTime:1290108934, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{transient_lastDdlTime=1290108934}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: insert overwrite table clustergroupby partition (ds='100') select key, value from src sort by key PREHOOK: type: QUERY PREHOOK: Input: default@src @@ -107,11 +107,11 @@ PREHOOK: query: select key, count(1) from clustergroupby where ds='100' group by key limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=100 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-57-45_369_7380463323239974897/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-35-47_282_4113045751057786056/-mr-10000 POSTHOOK: query: select key, count(1) from clustergroupby where ds='100' group by key limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=100 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-57-45_369_7380463323239974897/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-35-47_282_4113045751057786056/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] 0 3 @@ -125,11 +125,11 @@ 113 2 114 1 PREHOOK: query: alter table clustergroupby clustered by (key) into 1 buckets -PREHOOK: type: null +PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@clustergroupby PREHOOK: Output: default@clustergroupby POSTHOOK: query: alter table clustergroupby clustered by (key) into 1 buckets -POSTHOOK: type: null +POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@clustergroupby POSTHOOK: Output: default@clustergroupby POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -144,7 +144,7 @@ value string ds string -Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1288389460, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/hive-trunk/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, last_modified_by=sdong, last_modified_time=1288389468, transient_lastDdlTime=1288389468, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:heyongqiang, createTime:1290108934, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, last_modified_by=heyongqiang, last_modified_time=1290108955, transient_lastDdlTime=1290108955, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: insert overwrite table clustergroupby partition (ds='101') select key, value from src distribute by key PREHOOK: type: QUERY PREHOOK: Input: default@src @@ -246,11 +246,11 @@ PREHOOK: query: select key, count(1) from clustergroupby where ds='101' group by key limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=101 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-57-53_750_4694546524307257085/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-06_455_5652519335128156482/-mr-10000 POSTHOOK: query: select key, count(1) from clustergroupby where ds='101' group by key limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=101 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-57-53_750_4694546524307257085/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-06_455_5652519335128156482/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -354,11 +354,11 @@ PREHOOK: query: select length(key), count(1) from clustergroupby where ds='101' group by length(key) limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=101 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-57-57_183_3467407082757519286/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-13_777_4853958758753332533/-mr-10000 POSTHOOK: query: select length(key), count(1) from clustergroupby where ds='101' group by length(key) limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=101 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-57-57_183_3467407082757519286/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-13_777_4853958758753332533/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -453,11 +453,11 @@ PREHOOK: query: select abs(length(key)), count(1) from clustergroupby where ds='101' group by abs(length(key)) limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=101 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-00_556_1225036933831928400/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-22_353_1148410217887255773/-mr-10000 POSTHOOK: query: select abs(length(key)), count(1) from clustergroupby where ds='101' group by abs(length(key)) limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=101 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-00_556_1225036933831928400/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-22_353_1148410217887255773/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -562,11 +562,11 @@ PREHOOK: query: select key, count(1) from clustergroupby where ds='101' group by key,3 limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=101 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-03_994_2628288731314011109/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-29_836_2726844280049537094/-mr-10000 POSTHOOK: query: select key, count(1) from clustergroupby where ds='101' group by key,3 limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=101 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-03_994_2628288731314011109/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-29_836_2726844280049537094/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -675,11 +675,11 @@ PREHOOK: query: select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=101 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-07_367_3684028022557451628/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-36_869_6506961229190926826/-mr-10000 POSTHOOK: query: select key, count(1) from (select value as key, key as value from clustergroupby where ds='101')subq group by key limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=101 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-07_367_3684028022557451628/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-36_869_6506961229190926826/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -777,12 +777,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=100 PREHOOK: Input: default@clustergroupby@ds=101 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-10_796_7851925785141685773/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-45_158_7554312247658259364/-mr-10000 POSTHOOK: query: select key, count(1) from clustergroupby group by key POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=100 POSTHOOK: Input: default@clustergroupby@ds=101 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-10_796_7851925785141685773/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-36-45_158_7554312247658259364/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -1185,12 +1185,12 @@ PREHOOK: query: --sort columns-- alter table clustergroupby clustered by (value) sorted by (key, value) into 1 buckets -PREHOOK: type: null +PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@clustergroupby PREHOOK: Output: default@clustergroupby POSTHOOK: query: --sort columns-- alter table clustergroupby clustered by (value) sorted by (key, value) into 1 buckets -POSTHOOK: type: null +POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@clustergroupby POSTHOOK: Output: default@clustergroupby POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -1209,7 +1209,7 @@ value string ds string -Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1288389460, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/hive-trunk/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[value], sortCols:[Order(col:key, order:1), Order(col:value, order:1)], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, last_modified_by=sdong, last_modified_time=1288389494, transient_lastDdlTime=1288389494, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:heyongqiang, createTime:1290108934, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[value], sortCols:[Order(col:key, order:1), Order(col:value, order:1)], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, last_modified_by=heyongqiang, last_modified_time=1290109014, transient_lastDdlTime=1290109014, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: insert overwrite table clustergroupby partition (ds='102') select key, value from src distribute by value sort by key, value PREHOOK: type: QUERY PREHOOK: Input: default@src @@ -1313,11 +1313,11 @@ PREHOOK: query: select key, count(1) from clustergroupby where ds='102' group by key limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=102 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-19_617_397682497046947245/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-04_173_5662986070533466247/-mr-10000 POSTHOOK: query: select key, count(1) from clustergroupby where ds='102' group by key limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=102 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-19_617_397682497046947245/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-04_173_5662986070533466247/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -1423,11 +1423,11 @@ PREHOOK: query: select value, count(1) from clustergroupby where ds='102' group by value limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=102 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-23_046_1077430162048304187/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-11_984_9094618456601035974/-mr-10000 POSTHOOK: query: select value, count(1) from clustergroupby where ds='102' group by value limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=102 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-23_046_1077430162048304187/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-11_984_9094618456601035974/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -1543,11 +1543,11 @@ PREHOOK: query: select key, count(1) from clustergroupby where ds='102' group by key, value limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=102 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-28_476_3643193095660435074/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-18_617_5093814006573436611/-mr-10000 POSTHOOK: query: select key, count(1) from clustergroupby where ds='102' group by key, value limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=102 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-28_476_3643193095660435074/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-18_617_5093814006573436611/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -1565,11 +1565,11 @@ 113 2 114 1 PREHOOK: query: alter table clustergroupby clustered by (value, key) sorted by (key) into 1 buckets -PREHOOK: type: null +PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@clustergroupby PREHOOK: Output: default@clustergroupby POSTHOOK: query: alter table clustergroupby clustered by (value, key) sorted by (key) into 1 buckets -POSTHOOK: type: null +POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@clustergroupby POSTHOOK: Output: default@clustergroupby POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -1592,7 +1592,7 @@ value string ds string -Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:sdong, createTime:1288389460, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/data/users/sdong/www/hive-trunk/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[value, key], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=3, numFiles=3, last_modified_by=sdong, last_modified_time=1288389511, transient_lastDdlTime=1288389511, numRows=1500, totalSize=17436}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:clustergroupby, dbName:default, owner:heyongqiang, createTime:1290108934, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/clustergroupby, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[value, key], sortCols:[Order(col:key, order:1)], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=3, numFiles=3, last_modified_by=heyongqiang, last_modified_time=1290109047, transient_lastDdlTime=1290109047, numRows=1500, totalSize=17436}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: insert overwrite table clustergroupby partition (ds='103') select key, value from src distribute by value, key sort by key PREHOOK: type: QUERY PREHOOK: Input: default@src @@ -1700,11 +1700,11 @@ PREHOOK: query: select key, count(1) from clustergroupby where ds='103' group by key limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=103 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-36_974_789554075807114106/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-38_066_2359801468488363119/-mr-10000 POSTHOOK: query: select key, count(1) from clustergroupby where ds='103' group by key limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=103 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-36_974_789554075807114106/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-38_066_2359801468488363119/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -1824,11 +1824,11 @@ PREHOOK: query: select key, count(1) from clustergroupby where ds='103' group by value, key limit 10 PREHOOK: type: QUERY PREHOOK: Input: default@clustergroupby@ds=103 -PREHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-40_621_2070392858793462231/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-45_975_5803139738369049064/-mr-10000 POSTHOOK: query: select key, count(1) from clustergroupby where ds='103' group by value, key limit 10 POSTHOOK: type: QUERY POSTHOOK: Input: default@clustergroupby@ds=103 -POSTHOOK: Output: file:/tmp/sdong/hive_2010-10-29_14-58-40_621_2070392858793462231/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-37-45_975_5803139738369049064/-mr-10000 POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=100).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: clustergroupby PARTITION(ds=101).key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] Index: ql/src/test/results/clientpositive/create_default_prop.q.out =================================================================== --- ql/src/test/results/clientpositive/create_default_prop.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/create_default_prop.q.out (working copy) @@ -9,7 +9,7 @@ POSTHOOK: type: DESCTABLE a string -Detailed Table Information Table(tableName:table_p1, dbName:default, owner:thiruvel, createTime:1286825949, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:a, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/table_p1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{p1=v1, transient_lastDdlTime=1286825949, P2=v21=v22=v23}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:table_p1, dbName:default, owner:heyongqiang, createTime:1290111690, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:a, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/table_p1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{p1=v1, transient_lastDdlTime=1290111690, P2=v21=v22=v23}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: CREATE TABLE table_p2 LIKE table_p1 PREHOOK: type: CREATETABLE POSTHOOK: query: CREATE TABLE table_p2 LIKE table_p1 @@ -21,12 +21,12 @@ POSTHOOK: type: DESCTABLE a string -Detailed Table Information Table(tableName:table_p2, dbName:default, owner:thiruvel, createTime:1286825949, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:a, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/table_p2, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{EXTERNAL=FALSE, p1=v1, transient_lastDdlTime=1286825949, P2=v21=v22=v23}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:table_p2, dbName:default, owner:heyongqiang, createTime:1290111690, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:a, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/table_p2, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1290111690}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: CREATE TABLE table_p3 AS SELECT * FROM table_p1 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@table_p1 POSTHOOK: query: CREATE TABLE table_p3 AS SELECT * FROM table_p1 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@table_p1 POSTHOOK: Output: default@table_p3 PREHOOK: query: DESC EXTENDED table_p3 @@ -35,4 +35,4 @@ POSTHOOK: type: DESCTABLE a string -Detailed Table Information Table(tableName:table_p3, dbName:default, owner:thiruvel, createTime:1286825953, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:a, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/table_p3, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{p3=v3, transient_lastDdlTime=1286825953}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:table_p3, dbName:default, owner:heyongqiang, createTime:1290111696, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:a, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/table_p3, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{p3=v3, transient_lastDdlTime=1290111696}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/ctas.q.out =================================================================== --- ql/src/test/results/clientpositive/ctas.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/ctas.q.out (working copy) @@ -6,15 +6,15 @@ PREHOOK: query: select * from nzhang_Tmp PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_tmp -PREHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-08-50_551_5274699533452501897/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-21-38_152_6607893365576187007/-mr-10000 POSTHOOK: query: select * from nzhang_Tmp POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_tmp -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-08-50_551_5274699533452501897/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-21-38_152_6607893365576187007/-mr-10000 PREHOOK: query: explain create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: query: explain create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT ABSTRACT SYNTAX TREE: (TOK_CREATETABLE nzhang_CTAS1 TOK_LIKETABLE (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key) k) (TOK_SELEXPR (TOK_TABLE_OR_COL value))) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL k)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL value))) (TOK_LIMIT 10)))) @@ -64,7 +64,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/nzhang/hive_2010-09-14_16-08-50_746_7813189274106710723/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-21-38_294_2534653608830924093/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -92,7 +92,7 @@ Move Operator files: hdfs directory: true - destination: pfile:///data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/nzhang_ctas1 + destination: pfile:///Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/nzhang_ctas1 Stage: Stage-3 Create Table Operator: @@ -107,20 +107,20 @@ PREHOOK: query: create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table nzhang_CTAS1 as select key k, value from src sort by k, value limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@nzhang_CTAS1 PREHOOK: query: select * from nzhang_CTAS1 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_ctas1 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-08-57_963_8224718269640555492/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-21-54_890_340708639379092873/-mr-10000 POSTHOOK: query: select * from nzhang_CTAS1 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_ctas1 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-08-57_963_8224718269640555492/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-21-54_890_340708639379092873/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -132,9 +132,9 @@ 104 val_104 104 val_104 PREHOOK: query: explain create table nzhang_ctas2 as select * from src sort by key, value limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: query: explain create table nzhang_ctas2 as select * from src sort by key, value limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT ABSTRACT SYNTAX TREE: (TOK_CREATETABLE nzhang_ctas2 TOK_LIKETABLE (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR TOK_ALLCOLREF)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL key)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL value))) (TOK_LIMIT 10)))) @@ -184,7 +184,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/nzhang/hive_2010-09-14_16-08-58_369_8941154562114122989/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-21-55_113_2975775360233211417/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -212,7 +212,7 @@ Move Operator files: hdfs directory: true - destination: pfile:///data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/nzhang_ctas2 + destination: pfile:///Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/nzhang_ctas2 Stage: Stage-3 Create Table Operator: @@ -227,20 +227,20 @@ PREHOOK: query: create table nzhang_ctas2 as select * from src sort by key, value limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table nzhang_ctas2 as select * from src sort by key, value limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@nzhang_ctas2 PREHOOK: query: select * from nzhang_ctas2 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_ctas2 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-09-06_188_7275645807830573530/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-10_092_5599426394139957980/-mr-10000 POSTHOOK: query: select * from nzhang_ctas2 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_ctas2 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-09-06_188_7275645807830573530/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-10_092_5599426394139957980/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -252,9 +252,9 @@ 104 val_104 104 val_104 PREHOOK: query: explain create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: query: explain create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT ABSTRACT SYNTAX TREE: (TOK_CREATETABLE nzhang_ctas3 TOK_LIKETABLE (TOK_TABLESERIALIZER (TOK_SERDENAME "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe")) TOK_TBLRCFILE (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (/ (TOK_TABLE_OR_COL key) 2) half_key) (TOK_SELEXPR (TOK_FUNCTION concat (TOK_TABLE_OR_COL value) "_con") conb)) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL half_key)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL conb))) (TOK_LIMIT 10)))) @@ -304,7 +304,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/nzhang/hive_2010-09-14_16-09-06_591_311725779652798393/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-10_269_5024522055775704015/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -332,7 +332,7 @@ Move Operator files: hdfs directory: true - destination: pfile:///data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/nzhang_ctas3 + destination: pfile:///Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/nzhang_ctas3 Stage: Stage-3 Create Table Operator: @@ -348,20 +348,20 @@ PREHOOK: query: create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table nzhang_ctas3 row format serde "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe" stored as RCFile as select key/2 half_key, concat(value, "_con") conb from src sort by half_key, conb limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@nzhang_ctas3 PREHOOK: query: select * from nzhang_ctas3 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_ctas3 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-09-14_409_3860619873030897976/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-26_253_5950487784027845463/-mr-10000 POSTHOOK: query: select * from nzhang_ctas3 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_ctas3 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-09-14_409_3860619873030897976/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-26_253_5950487784027845463/-mr-10000 0.0 val_0_con 0.0 val_0_con 0.0 val_0_con @@ -390,11 +390,11 @@ PREHOOK: query: select * from nzhang_ctas3 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_ctas3 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-09-15_055_2704821239289766796/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-26_587_8435204750824479169/-mr-10000 POSTHOOK: query: select * from nzhang_ctas3 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_ctas3 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-09-15_055_2704821239289766796/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-26_587_8435204750824479169/-mr-10000 0.0 val_0_con 0.0 val_0_con 0.0 val_0_con @@ -406,9 +406,9 @@ 4.0 val_8_con 4.5 val_9_con PREHOOK: query: explain create table nzhang_ctas4 row format delimited fields terminated by ',' stored as textfile as select key, value from src sort by key, value limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: query: explain create table nzhang_ctas4 row format delimited fields terminated by ',' stored as textfile as select key, value from src sort by key, value limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT ABSTRACT SYNTAX TREE: (TOK_CREATETABLE nzhang_ctas4 TOK_LIKETABLE (TOK_TABLEROWFORMAT (TOK_SERDEPROPS (TOK_TABLEROWFORMATFIELD ','))) TOK_TBLTEXTFILE (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL value))) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL key)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL value))) (TOK_LIMIT 10)))) @@ -458,7 +458,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/nzhang/hive_2010-09-14_16-09-15_571_515417720676742183/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-26_831_6665219081002226800/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -486,7 +486,7 @@ Move Operator files: hdfs directory: true - destination: pfile:///data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/nzhang_ctas4 + destination: pfile:///Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/nzhang_ctas4 Stage: Stage-3 Create Table Operator: @@ -502,20 +502,20 @@ PREHOOK: query: create table nzhang_ctas4 row format delimited fields terminated by ',' stored as textfile as select key, value from src sort by key, value limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table nzhang_ctas4 row format delimited fields terminated by ',' stored as textfile as select key, value from src sort by key, value limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@nzhang_ctas4 PREHOOK: query: select * from nzhang_ctas4 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_ctas4 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-09-22_874_9020816893750253212/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-42_599_6843607487274708798/-mr-10000 POSTHOOK: query: select * from nzhang_ctas4 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_ctas4 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-09-14_16-09-22_874_9020816893750253212/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-42_599_6843607487274708798/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -527,9 +527,9 @@ 104 val_104 104 val_104 PREHOOK: query: explain extended create table nzhang_ctas5 row format delimited fields terminated by ',' lines terminated by '\012' stored as textfile as select key, value from src sort by key, value limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: query: explain extended create table nzhang_ctas5 row format delimited fields terminated by ',' lines terminated by '\012' stored as textfile as select key, value from src sort by key, value limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT ABSTRACT SYNTAX TREE: (TOK_CREATETABLE nzhang_ctas5 TOK_LIKETABLE (TOK_TABLEROWFORMAT (TOK_SERDEPROPS (TOK_TABLEROWFORMATFIELD ',') (TOK_TABLEROWFORMATLINES '\012'))) TOK_TBLTEXTFILE (TOK_QUERY (TOK_FROM (TOK_TABREF src)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL key)) (TOK_SELEXPR (TOK_TABLE_OR_COL value))) (TOK_SORTBY (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL key)) (TOK_TABSORTCOLNAMEASC (TOK_TABLE_OR_COL value))) (TOK_LIMIT 10)))) @@ -569,9 +569,9 @@ type: string Needs Tagging: false Path -> Alias: - pfile:/data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/src [src] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/src [src] Path -> Partition: - pfile:/data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/src + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/src Partition base file name: src input format: org.apache.hadoop.mapred.TextInputFormat @@ -582,12 +582,12 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/src + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/src name src serialization.ddl struct src { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1284504429 + transient_lastDdlTime 1290111684 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -598,12 +598,12 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/src + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/src name src serialization.ddl struct src { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1284504429 + transient_lastDdlTime 1290111684 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: src name: src @@ -613,7 +613,7 @@ File Output Operator compressed: false GlobalTableId: 0 - directory: file:/tmp/nzhang/hive_2010-09-14_16-09-23_273_3246979497224742620/-mr-10002 + directory: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-42_827_2917364249718384116/-mr-10002 NumFilesPerFileSink: 1 table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -629,7 +629,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/nzhang/hive_2010-09-14_16-09-23_273_3246979497224742620/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-42_827_2917364249718384116/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -645,9 +645,9 @@ type: string Needs Tagging: false Path -> Alias: - file:/tmp/nzhang/hive_2010-09-14_16-09-23_273_3246979497224742620/-mr-10002 [file:/tmp/nzhang/hive_2010-09-14_16-09-23_273_3246979497224742620/-mr-10002] + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-42_827_2917364249718384116/-mr-10002 [file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-42_827_2917364249718384116/-mr-10002] Path -> Partition: - file:/tmp/nzhang/hive_2010-09-14_16-09-23_273_3246979497224742620/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-22-42_827_2917364249718384116/-mr-10002 Partition base file name: -mr-10002 input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -669,9 +669,9 @@ File Output Operator compressed: false GlobalTableId: 1 - directory: pfile:/data/users/nzhang/work/784/apache-hive/build/ql/scratchdir/hive_2010-09-14_16-09-23_273_3246979497224742620/-ext-10001 + directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-22-42_827_2917364249718384116/-ext-10001 NumFilesPerFileSink: 1 - Stats Publishing Key Prefix: pfile:/data/users/nzhang/work/784/apache-hive/build/ql/scratchdir/hive_2010-09-14_16-09-23_273_3246979497224742620/-ext-10001/ + Stats Publishing Key Prefix: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-22-42_827_2917364249718384116/-ext-10001/ table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -690,8 +690,8 @@ Move Operator files: hdfs directory: true - source: pfile:/data/users/nzhang/work/784/apache-hive/build/ql/scratchdir/hive_2010-09-14_16-09-23_273_3246979497224742620/-ext-10001 - destination: pfile:///data/users/nzhang/work/784/apache-hive/build/ql/test/data/warehouse/nzhang_ctas5 + source: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-22-42_827_2917364249718384116/-ext-10001 + destination: pfile:///Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/nzhang_ctas5 Stage: Stage-3 Create Table Operator: @@ -709,10 +709,10 @@ PREHOOK: query: create table nzhang_ctas5 row format delimited fields terminated by ',' lines terminated by '\012' stored as textfile as select key, value from src sort by key, value limit 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table nzhang_ctas5 row format delimited fields terminated by ',' lines terminated by '\012' stored as textfile as select key, value from src sort by key, value limit 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@nzhang_ctas5 PREHOOK: query: create table nzhang_ctas6 (key string, `to` string) @@ -731,10 +731,10 @@ POSTHOOK: Lineage: nzhang_ctas6.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: nzhang_ctas6.to SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: create table nzhang_ctas7 as select key, `to` from nzhang_ctas6 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@nzhang_ctas6 POSTHOOK: query: create table nzhang_ctas7 as select key, `to` from nzhang_ctas6 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@nzhang_ctas6 POSTHOOK: Output: default@nzhang_ctas7 POSTHOOK: Lineage: nzhang_ctas6.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] Index: ql/src/test/results/clientpositive/input19.q.out =================================================================== --- ql/src/test/results/clientpositive/input19.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/input19.q.out (working copy) @@ -1,6 +1,6 @@ -PREHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE +PREHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE PREHOOK: type: CREATETABLE -POSTHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE +POSTHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@apachelog PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/apache.access.log' INTO TABLE apachelog @@ -11,9 +11,9 @@ PREHOOK: query: SELECT a.* FROM apachelog a PREHOOK: type: QUERY PREHOOK: Input: default@apachelog -PREHOOK: Output: file:/tmp/jssarma/hive_2010-07-21_11-26-57_493_8424717254986801325/10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_13-03-09_967_1761875918055572728/-mr-10000 POSTHOOK: query: SELECT a.* FROM apachelog a POSTHOOK: type: QUERY POSTHOOK: Input: default@apachelog -POSTHOOK: Output: file:/tmp/jssarma/hive_2010-07-21_11-26-57_493_8424717254986801325/10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_13-03-09_967_1761875918055572728/-mr-10000 127.0.0.1 NULL frank 10/Oct/2000:13:55:36 -0700 GET /apache_pb.gif HTTP/1.0 200 2326 Index: ql/src/test/results/clientpositive/merge3.q.out =================================================================== --- ql/src/test/results/clientpositive/merge3.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/merge3.q.out (working copy) @@ -1,13 +1,13 @@ PREHOOK: query: create table merge_src as select key, value from srcpart where ds is not null -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 POSTHOOK: query: create table merge_src as select key, value from srcpart where ds is not null -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 @@ -40,11 +40,11 @@ PREHOOK: query: explain extended create table merge_src2 as select key, value from merge_src -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: query: explain extended create table merge_src2 as select key, value from merge_src -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-09).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -78,9 +78,9 @@ File Output Operator compressed: false GlobalTableId: 1 - directory: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10002 + directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10002 NumFilesPerFileSink: 1 - Stats Publishing Key Prefix: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10001/ + Stats Publishing Key Prefix: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10001/ table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -93,9 +93,9 @@ MultiFileSpray: false Needs Tagging: false Path -> Alias: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src [merge_src] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src [merge_src] Path -> Partition: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src Partition base file name: merge_src input format: org.apache.hadoop.mapred.TextInputFormat @@ -106,12 +106,12 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src name merge_src serialization.ddl struct merge_src { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454110 + transient_lastDdlTime 1290113676 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -122,12 +122,12 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src name merge_src serialization.ddl struct merge_src { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454110 + transient_lastDdlTime 1290113676 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src name: merge_src @@ -139,15 +139,15 @@ Move Operator files: hdfs directory: true - source: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10002 - destination: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10001 + source: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10002 + destination: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10001 Stage: Stage-0 Move Operator files: hdfs directory: true - source: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10001 - destination: pfile:///data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src2 + source: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10001 + destination: pfile:///Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src2 Stage: Stage-5 Create Table Operator: @@ -163,11 +163,11 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10002 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10002 File Output Operator compressed: false GlobalTableId: 0 - directory: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10001 + directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10001 NumFilesPerFileSink: 1 table: input format: org.apache.hadoop.mapred.TextInputFormat @@ -181,9 +181,9 @@ MultiFileSpray: false Needs Tagging: false Path -> Alias: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10002 [pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10002] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10002 [pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10002] Path -> Partition: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-01_163_8855372425957877493/-ext-10002 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-54-52_127_2413179540241952240/-ext-10002 Partition base file name: -ext-10002 input format: org.apache.hadoop.mapred.TextInputFormat @@ -203,11 +203,11 @@ PREHOOK: query: create table merge_src2 as select key, value from merge_src -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@merge_src POSTHOOK: query: create table merge_src2 as select key, value from merge_src -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@merge_src POSTHOOK: Output: default@merge_src2 POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -217,10 +217,11 @@ PREHOOK: query: select * from merge_src2 PREHOOK: type: QUERY PREHOOK: Input: default@merge_src2 -PREHOOK: Output: file:/tmp/njain/hive_2010-11-10_21-42-09_717_694531801987422048/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-55-09_570_5014264450775842045/-mr-10000 POSTHOOK: query: select * from merge_src2 POSTHOOK: type: QUERY POSTHOOK: Input: default@merge_src2 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-55-09_570_5014264450775842045/-mr-10000 POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-09).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -2284,9 +2285,9 @@ File Output Operator compressed: false GlobalTableId: 1 - directory: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10002 + directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10002 NumFilesPerFileSink: 1 - Stats Publishing Key Prefix: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10000/ + Stats Publishing Key Prefix: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10000/ table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -2296,13 +2297,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454130 + transient_lastDdlTime 1290113709 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part2 TotalFiles: 1 @@ -2310,10 +2311,10 @@ MultiFileSpray: false Needs Tagging: false Path -> Alias: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-08 [merge_src_part] - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-09 [merge_src_part] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-08 [merge_src_part] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-09 [merge_src_part] Path -> Partition: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-08 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-08 Partition base file name: ds=2008-04-08 input format: org.apache.hadoop.mapred.TextInputFormat @@ -2326,7 +2327,7 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part name merge_src_part numFiles 4 numPartitions 2 @@ -2336,7 +2337,7 @@ serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 23248 - transient_lastDdlTime 1289454120 + transient_lastDdlTime 1290113692 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -2347,7 +2348,7 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part name merge_src_part numFiles 4 numPartitions 2 @@ -2357,11 +2358,11 @@ serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 23248 - transient_lastDdlTime 1289454120 + transient_lastDdlTime 1290113692 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part name: merge_src_part - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-09 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-09 Partition base file name: ds=2008-04-09 input format: org.apache.hadoop.mapred.TextInputFormat @@ -2374,7 +2375,7 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part name merge_src_part numFiles 4 numPartitions 2 @@ -2384,7 +2385,7 @@ serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 23248 - transient_lastDdlTime 1289454120 + transient_lastDdlTime 1290113692 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -2395,7 +2396,7 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part name merge_src_part numFiles 4 numPartitions 2 @@ -2405,7 +2406,7 @@ serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 23248 - transient_lastDdlTime 1289454120 + transient_lastDdlTime 1290113692 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part name: merge_src_part @@ -2417,8 +2418,8 @@ Move Operator files: hdfs directory: true - source: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10002 - destination: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10000 + source: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10002 + destination: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10000 Stage: Stage-0 Move Operator @@ -2426,7 +2427,7 @@ partition: ds replace: true - source: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10000 + source: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10000 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -2436,29 +2437,29 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454130 + transient_lastDdlTime 1290113709 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part2 - tmp directory: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10001 + tmp directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10001 Stage: Stage-2 Stats-Aggr Operator - Stats Aggregation Key Prefix: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10000/ + Stats Aggregation Key Prefix: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10000/ Stage: Stage-3 Map Reduce Alias -> Map Operator Tree: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10002 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10002 File Output Operator compressed: false GlobalTableId: 0 - directory: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10000 + directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10000 NumFilesPerFileSink: 1 table: input format: org.apache.hadoop.mapred.TextInputFormat @@ -2469,13 +2470,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454130 + transient_lastDdlTime 1290113709 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part2 TotalFiles: 1 @@ -2483,9 +2484,9 @@ MultiFileSpray: false Needs Tagging: false Path -> Alias: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10002 [pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10002] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10002 [pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10002] Path -> Partition: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-10_192_7350266745211428565/-ext-10002 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-09_984_4986210984396331402/-ext-10002 Partition base file name: -ext-10002 input format: org.apache.hadoop.mapred.TextInputFormat @@ -2496,13 +2497,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454130 + transient_lastDdlTime 1290113709 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -2513,13 +2514,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454130 + transient_lastDdlTime 1290113709 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part2 name: merge_src_part2 @@ -2566,11 +2567,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@merge_src_part2@ds=2008-04-08 PREHOOK: Input: default@merge_src_part2@ds=2008-04-09 -PREHOOK: Output: file:/tmp/njain/hive_2010-11-10_21-42-26_758_4308514117864932351/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-55-29_875_778506553533012381/-mr-10000 POSTHOOK: query: select * from merge_src_part2 where ds is not null POSTHOOK: type: QUERY POSTHOOK: Input: default@merge_src_part2@ds=2008-04-08 POSTHOOK: Input: default@merge_src_part2@ds=2008-04-09 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-55-29_875_778506553533012381/-mr-10000 POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-09).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -4674,10 +4676,10 @@ type: string Needs Tagging: false Path -> Alias: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-08 [s:merge_src_part] - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-09 [s:merge_src_part] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-08 [s:merge_src_part] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-09 [s:merge_src_part] Path -> Partition: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-08 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-08 Partition base file name: ds=2008-04-08 input format: org.apache.hadoop.mapred.TextInputFormat @@ -4690,7 +4692,7 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part name merge_src_part numFiles 4 numPartitions 2 @@ -4700,7 +4702,7 @@ serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 23248 - transient_lastDdlTime 1289454120 + transient_lastDdlTime 1290113692 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -4711,7 +4713,7 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part name merge_src_part numFiles 4 numPartitions 2 @@ -4721,11 +4723,11 @@ serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 23248 - transient_lastDdlTime 1289454120 + transient_lastDdlTime 1290113692 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part name: merge_src_part - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-09 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part/ds=2008-04-09 Partition base file name: ds=2008-04-09 input format: org.apache.hadoop.mapred.TextInputFormat @@ -4738,7 +4740,7 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part name merge_src_part numFiles 4 numPartitions 2 @@ -4748,7 +4750,7 @@ serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 23248 - transient_lastDdlTime 1289454120 + transient_lastDdlTime 1290113692 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -4759,7 +4761,7 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part name merge_src_part numFiles 4 numPartitions 2 @@ -4769,7 +4771,7 @@ serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe totalSize 23248 - transient_lastDdlTime 1289454120 + transient_lastDdlTime 1290113692 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part name: merge_src_part @@ -4787,9 +4789,9 @@ File Output Operator compressed: false GlobalTableId: 1 - directory: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10002 + directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10002 NumFilesPerFileSink: 1 - Stats Publishing Key Prefix: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10000/ + Stats Publishing Key Prefix: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10000/ table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -4799,13 +4801,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454147 + transient_lastDdlTime 1290113731 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part2 TotalFiles: 1 @@ -4819,8 +4821,8 @@ Move Operator files: hdfs directory: true - source: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10002 - destination: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10000 + source: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10002 + destination: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10000 Stage: Stage-0 Move Operator @@ -4828,7 +4830,7 @@ partition: ds replace: true - source: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10000 + source: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10000 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -4838,29 +4840,29 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454147 + transient_lastDdlTime 1290113731 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part2 - tmp directory: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10001 + tmp directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10001 Stage: Stage-2 Stats-Aggr Operator - Stats Aggregation Key Prefix: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10000/ + Stats Aggregation Key Prefix: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10000/ Stage: Stage-3 Map Reduce Alias -> Map Operator Tree: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10002 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10002 File Output Operator compressed: false GlobalTableId: 0 - directory: pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10000 + directory: pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10000 NumFilesPerFileSink: 1 table: input format: org.apache.hadoop.mapred.TextInputFormat @@ -4871,13 +4873,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454147 + transient_lastDdlTime 1290113731 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part2 TotalFiles: 1 @@ -4885,9 +4887,9 @@ MultiFileSpray: false Needs Tagging: false Path -> Alias: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10002 [pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10002] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10002 [pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10002] Path -> Partition: - pfile:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-11-10_21-42-27_945_6969234973394510647/-ext-10002 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/scratchdir/hive_2010-11-18_12-55-31_490_2124793241058013369/-ext-10002 Partition base file name: -ext-10002 input format: org.apache.hadoop.mapred.TextInputFormat @@ -4898,13 +4900,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454147 + transient_lastDdlTime 1290113731 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -4915,13 +4917,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/merge_src_part2 + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/merge_src_part2 name merge_src_part2 partition_columns ds serialization.ddl struct merge_src_part2 { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454147 + transient_lastDdlTime 1290113731 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: merge_src_part2 name: merge_src_part2 @@ -4975,11 +4977,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@merge_src_part2@ds=2008-04-08 PREHOOK: Input: default@merge_src_part2@ds=2008-04-09 -PREHOOK: Output: file:/tmp/njain/hive_2010-11-10_21-42-43_560_3339774644672299186/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-55-56_157_6737432571027363960/-mr-10000 POSTHOOK: query: select * from merge_src_part2 where ds is not null POSTHOOK: type: QUERY POSTHOOK: Input: default@merge_src_part2@ds=2008-04-08 POSTHOOK: Input: default@merge_src_part2@ds=2008-04-09 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_12-55-56_157_6737432571027363960/-mr-10000 POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-08).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: merge_src_part PARTITION(ds=2008-04-09).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] Index: ql/src/test/results/clientpositive/query_result_fileformat.q.out =================================================================== --- ql/src/test/results/clientpositive/query_result_fileformat.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/query_result_fileformat.q.out (working copy) @@ -2,23 +2,23 @@ 1 http://asdf' value from src limit 1 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table nzhang_test1 stored as sequencefile as select 'key1' as key, 'value 1 http://asdf' value from src limit 1 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@nzhang_test1 PREHOOK: query: select * from nzhang_test1 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_test1 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-37-49_137_345185714437305649/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-18_756_4686540378600379768/-mr-10000 POSTHOOK: query: select * from nzhang_test1 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_test1 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-37-49_137_345185714437305649/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-18_756_4686540378600379768/-mr-10000 key1 value 1 @@ -26,11 +26,11 @@ PREHOOK: query: select count(*) from nzhang_test1 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_test1 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-37-49_893_2470605464847588988/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-19_306_9007845540495524130/-mr-10000 POSTHOOK: query: select count(*) from nzhang_test1 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_test1 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-37-49_893_2470605464847588988/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-19_306_9007845540495524130/-mr-10000 1 PREHOOK: query: explain select * from nzhang_test1 where key='key1' @@ -82,11 +82,11 @@ PREHOOK: query: select * from nzhang_test1 where key='key1' PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_test1 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-37-56_447_1539901914223140072/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-27_819_8034778775852480180/-mr-10000 POSTHOOK: query: select * from nzhang_test1 where key='key1' POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_test1 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-37-56_447_1539901914223140072/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-27_819_8034778775852480180/-mr-10000 key1 value 1 NULL NULL @@ -94,11 +94,11 @@ PREHOOK: query: select * from nzhang_test1 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_test1 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-38-00_606_2534525216891512327/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-32_891_5081550764397015247/-mr-10000 POSTHOOK: query: select * from nzhang_test1 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_test1 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-38-00_606_2534525216891512327/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-32_891_5081550764397015247/-mr-10000 key1 value 1 @@ -106,11 +106,11 @@ PREHOOK: query: select count(*) from nzhang_test1 PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_test1 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-38-02_968_2091791272244763520/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-33_131_934017148846831316/-mr-10000 POSTHOOK: query: select count(*) from nzhang_test1 POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_test1 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-38-02_968_2091791272244763520/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-33_131_934017148846831316/-mr-10000 1 PREHOOK: query: explain select * from nzhang_test1 where key='key1' @@ -162,11 +162,11 @@ PREHOOK: query: select * from nzhang_test1 where key='key1' PREHOOK: type: QUERY PREHOOK: Input: default@nzhang_test1 -PREHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-38-09_247_8932362895617955403/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-40_273_8393892543433536739/-mr-10000 POSTHOOK: query: select * from nzhang_test1 where key='key1' POSTHOOK: type: QUERY POSTHOOK: Input: default@nzhang_test1 -POSTHOOK: Output: file:/tmp/nzhang/hive_2010-08-30_23-38-09_247_8932362895617955403/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_10-59-40_273_8393892543433536739/-mr-10000 key1 value 1 Index: ql/src/test/results/clientpositive/rcfile_default_format.q.out =================================================================== --- ql/src/test/results/clientpositive/rcfile_default_format.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/rcfile_default_format.q.out (working copy) @@ -9,12 +9,12 @@ POSTHOOK: type: DESCTABLE key string from deserializer -Detailed Table Information Table(tableName:rcfile_default_format, dbName:default, owner:thiruvel, createTime:1286799201, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/rcfile_default_format, inputFormat:org.apache.hadoop.hive.ql.io.RCFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286799201}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:rcfile_default_format, dbName:default, owner:heyongqiang, createTime:1290106787, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/rcfile_default_format, inputFormat:org.apache.hadoop.hive.ql.io.RCFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1290106787}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: CREATE TABLE rcfile_default_format_ctas AS SELECT key,value FROM src -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: CREATE TABLE rcfile_default_format_ctas AS SELECT key,value FROM src -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@rcfile_default_format_ctas PREHOOK: query: DESCRIBE EXTENDED rcfile_default_format_ctas @@ -24,7 +24,7 @@ key string from deserializer value string from deserializer -Detailed Table Information Table(tableName:rcfile_default_format_ctas, dbName:default, owner:thiruvel, createTime:1286799204, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/rcfile_default_format_ctas, inputFormat:org.apache.hadoop.hive.ql.io.RCFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286799204}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:rcfile_default_format_ctas, dbName:default, owner:heyongqiang, createTime:1290106793, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/rcfile_default_format_ctas, inputFormat:org.apache.hadoop.hive.ql.io.RCFileInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.RCFileOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1290106793}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: CREATE TABLE rcfile_default_format_txtfile (key STRING) STORED AS TEXTFILE PREHOOK: type: CREATETABLE POSTHOOK: query: CREATE TABLE rcfile_default_format_txtfile (key STRING) STORED AS TEXTFILE @@ -46,12 +46,12 @@ POSTHOOK: Lineage: rcfile_default_format_txtfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] key string -Detailed Table Information Table(tableName:rcfile_default_format_txtfile, dbName:default, owner:thiruvel, createTime:1286799204, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/rcfile_default_format_txtfile, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{numPartitions=0, numFiles=1, transient_lastDdlTime=1286799207, numRows=500, totalSize=1906}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:rcfile_default_format_txtfile, dbName:default, owner:heyongqiang, createTime:1290106794, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/rcfile_default_format_txtfile, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{numPartitions=0, numFiles=1, transient_lastDdlTime=1290106803, numRows=500, totalSize=1906}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: CREATE TABLE textfile_default_format_ctas AS SELECT key,value FROM rcfile_default_format_ctas -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@rcfile_default_format_ctas POSTHOOK: query: CREATE TABLE textfile_default_format_ctas AS SELECT key,value FROM rcfile_default_format_ctas -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@rcfile_default_format_ctas POSTHOOK: Output: default@textfile_default_format_ctas POSTHOOK: Lineage: rcfile_default_format_txtfile.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -63,4 +63,4 @@ key string value string -Detailed Table Information Table(tableName:textfile_default_format_ctas, dbName:default, owner:thiruvel, createTime:1286799209, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/textfile_default_format_ctas, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286799209}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:textfile_default_format_ctas, dbName:default, owner:heyongqiang, createTime:1290106809, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/textfile_default_format_ctas, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1290106809}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/semijoin.q.out =================================================================== --- ql/src/test/results/clientpositive/semijoin.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/semijoin.q.out (working copy) @@ -1,18 +1,18 @@ PREHOOK: query: create table t1 as select cast(key as int) key, value from src where key <= 10 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table t1 as select cast(key as int) key, value from src where key <= 10 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@t1 PREHOOK: query: select * from t1 sort by key PREHOOK: type: QUERY PREHOOK: Input: default@t1 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-17-35_964_8659428901868696782/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-00-19_046_3895376692139653549/-mr-10000 POSTHOOK: query: select * from t1 sort by key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-17-35_964_8659428901868696782/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-00-19_046_3895376692139653549/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -25,20 +25,20 @@ 9 val_9 10 val_10 PREHOOK: query: create table t2 as select cast(2*key as int) key, value from t1 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@t1 POSTHOOK: query: create table t2 as select cast(2*key as int) key, value from t1 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@t1 POSTHOOK: Output: default@t2 PREHOOK: query: select * from t2 sort by key PREHOOK: type: QUERY PREHOOK: Input: default@t2 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-17-44_033_1385561037107185571/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-00-35_454_4705187275126291053/-mr-10000 POSTHOOK: query: select * from t2 sort by key POSTHOOK: type: QUERY POSTHOOK: Input: default@t2 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-17-44_033_1385561037107185571/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-00-35_454_4705187275126291053/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -51,22 +51,22 @@ 18 val_9 20 val_10 PREHOOK: query: create table t3 as select * from (select * from t1 union all select * from t2) b -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 POSTHOOK: query: create table t3 as select * from (select * from t1 union all select * from t2) b -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Output: default@t3 PREHOOK: query: select * from t3 sort by key, value PREHOOK: type: QUERY PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-17-56_368_4643337669577300642/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-00-56_521_5858394420847642107/-mr-10000 POSTHOOK: query: select * from t3 sort by key, value POSTHOOK: type: QUERY POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-17-56_368_4643337669577300642/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-00-56_521_5858394420847642107/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -97,11 +97,11 @@ PREHOOK: query: select * from t4 PREHOOK: type: QUERY PREHOOK: Input: default@t4 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-00_347_4261760726152540894/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-05_957_5547541419038535698/-mr-10000 POSTHOOK: query: select * from t4 POSTHOOK: type: QUERY POSTHOOK: Input: default@t4 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-00_347_4261760726152540894/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-05_957_5547541419038535698/-mr-10000 PREHOOK: query: explain select * from t1 a left semi join t2 b on a.key=b.key sort by a.key, a.value PREHOOK: type: QUERY POSTHOOK: query: explain select * from t1 a left semi join t2 b on a.key=b.key sort by a.key, a.value @@ -185,7 +185,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-18-00_543_3830170995670719849/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-06_152_355729472898392348/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -217,12 +217,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-00_658_5539359917304769093/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-06_413_6128740965053236566/-mr-10000 POSTHOOK: query: select * from t1 a left semi join t2 b on a.key=b.key sort by a.key, a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-00_658_5539359917304769093/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-06_413_6128740965053236566/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -312,7 +312,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-18-08_284_4216408335407237139/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-24_265_4466548024067433690/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -344,12 +344,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-08_398_3149624530689509743/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-24_509_4270214608701232060/-mr-10000 POSTHOOK: query: select * from t2 a left semi join t1 b on b.key=a.key sort by a.key, a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-08_398_3149624530689509743/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-24_509_4270214608701232060/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -441,7 +441,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-18-16_135_6319067187632899075/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-40_609_1842300352332686282/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -473,12 +473,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t4 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-16_255_6778253691436748699/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-40_927_8797191922320768648/-mr-10000 POSTHOOK: query: select * from t1 a left semi join t4 b on b.key=a.key sort by a.key, a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t4 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-16_255_6778253691436748699/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-40_927_8797191922320768648/-mr-10000 PREHOOK: query: explain select a.value from t1 a left semi join t3 b on (b.key = a.key and b.key < '15') sort by a.value PREHOOK: type: QUERY POSTHOOK: query: explain select a.value from t1 a left semi join t3 b on (b.key = a.key and b.key < '15') sort by a.value @@ -568,7 +568,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-18-24_857_4689023765690259253/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-57_384_3089194844599355448/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -596,12 +596,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-24_973_3041071756227440132/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-57_517_5261225666744367069/-mr-10000 POSTHOOK: query: select a.value from t1 a left semi join t3 b on (b.key = a.key and b.key < '15') sort by a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-24_973_3041071756227440132/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-01-57_517_5261225666744367069/-mr-10000 val_0 val_0 val_0 @@ -708,7 +708,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-18-34_061_8275163351633601557/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-15_938_7137978578832330282/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -740,12 +740,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-34_179_4205035139034381615/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-16_057_519725218464853726/-mr-10000 POSTHOOK: query: select * from t1 a left semi join t2 b on a.key = b.key and b.value < "val_10" sort by a.key, a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-34_179_4205035139034381615/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-16_057_519725218464853726/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -841,7 +841,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-18-43_183_3107199938637789566/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-32_044_1882268558166284283/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -869,12 +869,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-43_306_2053779749324913446/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-32_201_5180642771512887111/-mr-10000 POSTHOOK: query: select a.value from t1 a left semi join (select key from t3 where key > 5) b on a.key = b.key sort by a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-43_306_2053779749324913446/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-32_201_5180642771512887111/-mr-10000 val_10 val_8 val_9 @@ -980,7 +980,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-18-52_335_849441347171062507/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-47_618_6081419597528468690/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -1008,12 +1008,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-52_463_737069354382102340/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-48_046_789670215385615891/-mr-10000 POSTHOOK: query: select a.value from t1 a left semi join (select key , value from t2 where key > 5) b on a.key = b.key and b.value <= 'val_20' sort by a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-18-52_463_737069354382102340/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-02-48_046_789670215385615891/-mr-10000 PREHOOK: query: explain select * from t2 a left semi join (select key , value from t1 where key > 2) b on a.key = b.key sort by a.key, a.value PREHOOK: type: QUERY POSTHOOK: query: explain select * from t2 a left semi join (select key , value from t1 where key > 2) b on a.key = b.key sort by a.key, a.value @@ -1110,7 +1110,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-19-00_301_5958832649298868830/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-05_112_1019830060466266544/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -1142,12 +1142,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-00_424_4463918460829143379/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-05_322_221151979084285496/-mr-10000 POSTHOOK: query: select * from t2 a left semi join (select key , value from t1 where key > 2) b on a.key = b.key sort by a.key, a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-00_424_4463918460829143379/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-05_322_221151979084285496/-mr-10000 4 val_2 8 val_4 10 val_5 @@ -1229,7 +1229,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-19-09_365_1316122738460523098/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-20_944_438303615610048165/-mr-10002 Select Operator expressions: expr: _col0 @@ -1267,12 +1267,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-09_480_7870074811327558689/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-21_127_8134172271972764419/-mr-10000 POSTHOOK: query: select /*+ mapjoin(b) */ a.key from t3 a left semi join t1 b on a.key = b.key sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-09_480_7870074811327558689/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-21_127_8134172271972764419/-mr-10000 0 0 0 @@ -1375,7 +1375,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-19-19_175_5090290266309302820/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-43_629_5752544729482637710/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -1407,12 +1407,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-19_289_7283573667957611898/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-43_779_3560439419287948511/-mr-10000 POSTHOOK: query: select * from t1 a left semi join t2 b on a.key = 2*b.key sort by a.key, a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-19_289_7283573667957611898/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-03-43_779_3560439419287948511/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -1523,7 +1523,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-19-28_320_7044231815158137622/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-00_648_373535142060359448/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -1560,13 +1560,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-28_450_6078674943204864805/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-00_983_7977499042899650897/-mr-10000 POSTHOOK: query: select * from t1 a join t2 b on a.key = b.key left semi join t3 c on b.key = c.key sort by a.key, a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-28_450_6078674943204864805/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-00_983_7977499042899650897/-mr-10000 0 val_0 0 val_0 0 val_0 0 val_0 0 val_0 0 val_0 @@ -1676,7 +1676,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-19-38_052_8721634945636524946/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-17_051_7474953441543543987/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -1708,12 +1708,12 @@ PREHOOK: type: QUERY PREHOOK: Input: default@t1 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-38_174_5762672611483777652/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-17_231_2179425812915281444/-mr-10000 POSTHOOK: query: select * from t3 a left semi join t1 b on a.key = b.key and a.value=b.value sort by a.key, a.value POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-38_174_5762672611483777652/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-17_231_2179425812915281444/-mr-10000 0 val_0 0 val_0 0 val_0 @@ -1838,7 +1838,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-19-49_190_4624457787442565360/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-33_573_6260564714806927759/-mr-10002 Select Operator expressions: expr: _col0 @@ -1877,13 +1877,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-49_324_9174162734156458916/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-33_826_3229491168132326963/-mr-10000 POSTHOOK: query: select /*+ mapjoin(b, c) */ a.key from t3 a left semi join t1 b on a.key = b.key left semi join t2 c on a.key = c.key sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-49_324_9174162734156458916/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-33_826_3229491168132326963/-mr-10000 0 0 0 @@ -1991,7 +1991,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-19-59_535_8715349469270136515/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-55_240_4472382832724150377/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -2020,13 +2020,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-59_667_8557238197192129755/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-55_429_8454721176911576485/-mr-10000 POSTHOOK: query: select a.key from t3 a left outer join t1 b on a.key = b.key left semi join t2 c on b.key = c.key sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-19-59_667_8557238197192129755/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-04-55_429_8454721176911576485/-mr-10000 0 0 0 @@ -2146,7 +2146,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-20-09_255_2715293241143785335/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-12_866_4359353511062609004/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -2175,13 +2175,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-09_383_4275977555046345305/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-13_034_2999962254990000638/-mr-10000 POSTHOOK: query: select a.key from t1 a right outer join t3 b on a.key = b.key left semi join t2 c on b.key = c.key sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-09_383_4275977555046345305/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-13_034_2999962254990000638/-mr-10000 NULL NULL NULL @@ -2304,7 +2304,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-20-19_268_5618148586891473846/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-27_311_4743482924605624788/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -2333,13 +2333,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-19_400_3587882397101268241/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-27_421_7482213301780796952/-mr-10000 POSTHOOK: query: select a.key from t1 a full outer join t3 b on a.key = b.key left semi join t2 c on b.key = c.key sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-19_400_3587882397101268241/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-27_421_7482213301780796952/-mr-10000 NULL NULL NULL @@ -2462,7 +2462,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-20-28_728_1492881717279570087/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-43_118_4112077673076844815/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -2491,13 +2491,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-28_856_8757358207361872372/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-43_554_6913778118057933477/-mr-10000 POSTHOOK: query: select a.key from t3 a left semi join t2 b on a.key = b.key left outer join t1 c on a.key = c.key sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-28_856_8757358207361872372/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-43_554_6913778118057933477/-mr-10000 0 0 0 @@ -2620,7 +2620,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-20-38_076_4685193258029073996/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-59_032_4567135017384415264/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -2649,13 +2649,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-38_205_3988929412565665845/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-59_146_932092442279199935/-mr-10000 POSTHOOK: query: select a.key from t3 a left semi join t2 b on a.key = b.key right outer join t1 c on a.key = c.key sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-38_205_3988929412565665845/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-05-59_146_932092442279199935/-mr-10000 NULL NULL NULL @@ -2780,7 +2780,7 @@ Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-20-47_590_2999113315834306029/-mr-10002 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-06-15_877_648799003197473512/-mr-10002 Reduce Output Operator key expressions: expr: _col0 @@ -2809,13 +2809,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-47_722_4677693091558572786/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-06-15_976_6198373402363644273/-mr-10000 POSTHOOK: query: select a.key from t3 a left semi join t1 b on a.key = b.key full outer join t2 c on a.key = c.key sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-47_722_4677693091558572786/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-06-15_976_6198373402363644273/-mr-10000 NULL NULL NULL @@ -2984,7 +2984,7 @@ Stage: Stage-3 Map Reduce Alias -> Map Operator Tree: - file:/tmp/liyintang/hive_2010-11-04_13-20-57_841_8595738346509621581/-mr-10003 + file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-06-33_848_5227894741694043284/-mr-10003 Reduce Output Operator key expressions: expr: _col0 @@ -3013,13 +3013,13 @@ PREHOOK: Input: default@t1 PREHOOK: Input: default@t2 PREHOOK: Input: default@t3 -PREHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-57_976_1019112090965524872/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-06-34_080_237734989555410900/-mr-10000 POSTHOOK: query: select a.key from t3 a left semi join t2 b on a.key = b.key left outer join t1 c on a.value = c.value sort by a.key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1 POSTHOOK: Input: default@t2 POSTHOOK: Input: default@t3 -POSTHOOK: Output: file:/tmp/liyintang/hive_2010-11-04_13-20-57_976_1019112090965524872/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_11-06-34_080_237734989555410900/-mr-10000 0 0 0 Index: ql/src/test/results/clientpositive/show_indexes_edge_cases.q.out =================================================================== --- ql/src/test/results/clientpositive/show_indexes_edge_cases.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/show_indexes_edge_cases.q.out (working copy) @@ -201,6 +201,40 @@ POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +PREHOOK: query: DROP INDEX idx_comment on show_idx_empty +PREHOOK: type: DROPINDEX +POSTHOOK: query: DROP INDEX idx_comment on show_idx_empty +POSTHOOK: type: DROPINDEX +POSTHOOK: Lineage: default__show_idx_full_idx_1__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__.value2 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value2, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +PREHOOK: query: DROP INDEX idx_compound on show_idx_empty +PREHOOK: type: DROPINDEX +POSTHOOK: query: DROP INDEX idx_compound on show_idx_empty +POSTHOOK: type: DROPINDEX +POSTHOOK: Lineage: default__show_idx_full_idx_1__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__.value2 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value2, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] PREHOOK: query: DROP TABLE show_idx_empty PREHOOK: type: DROPTABLE PREHOOK: Input: default@show_idx_empty @@ -222,6 +256,40 @@ POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +PREHOOK: query: DROP INDEX idx_1 on show_idx_full +PREHOOK: type: DROPINDEX +POSTHOOK: query: DROP INDEX idx_1 on show_idx_full +POSTHOOK: type: DROPINDEX +POSTHOOK: Lineage: default__show_idx_full_idx_1__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__.value2 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value2, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +PREHOOK: query: DROP INDEX idx_2 on show_idx_full +PREHOOK: type: DROPINDEX +POSTHOOK: query: DROP INDEX idx_2 on show_idx_full +POSTHOOK: type: DROPINDEX +POSTHOOK: Lineage: default__show_idx_full_idx_1__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__.value2 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value2, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] PREHOOK: query: DROP TABLE show_idx_full PREHOOK: type: DROPTABLE PREHOOK: Input: default@show_idx_full Index: ql/src/test/results/clientpositive/stats10.q.out =================================================================== --- ql/src/test/results/clientpositive/stats10.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats10.q.out (working copy) @@ -123,11 +123,11 @@ PREHOOK: query: select * from bucket3_1 tablesample (bucket 1 out of 2) s where ds = '1' order by key PREHOOK: type: QUERY PREHOOK: Input: default@bucket3_1@ds=1 -PREHOOK: Output: file:/tmp/thiruvel/hive_2010-10-11_12-41-36_921_3883563776062594481/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_21-59-35_194_6516705847755484921/-mr-10000 POSTHOOK: query: select * from bucket3_1 tablesample (bucket 1 out of 2) s where ds = '1' order by key POSTHOOK: type: QUERY POSTHOOK: Input: default@bucket3_1@ds=1 -POSTHOOK: Output: file:/tmp/thiruvel/hive_2010-10-11_12-41-36_921_3883563776062594481/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_21-59-35_194_6516705847755484921/-mr-10000 POSTHOOK: Lineage: bucket3_1 PARTITION(ds=1).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: bucket3_1 PARTITION(ds=1).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: bucket3_1 PARTITION(ds=1).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -382,9 +382,9 @@ 498 val_498 1 498 val_498 1 PREHOOK: query: explain analyze table bucket3_1 partition (ds) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table bucket3_1 partition (ds) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: bucket3_1 PARTITION(ds=1).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: bucket3_1 PARTITION(ds=1).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: bucket3_1 PARTITION(ds=1).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -411,14 +411,14 @@ PREHOOK: query: analyze table bucket3_1 partition (ds) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@bucket3_1@ds=1 PREHOOK: Input: default@bucket3_1@ds=2 PREHOOK: Output: default@bucket3_1 PREHOOK: Output: default@bucket3_1@ds=1 PREHOOK: Output: default@bucket3_1@ds=2 POSTHOOK: query: analyze table bucket3_1 partition (ds) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@bucket3_1@ds=1 POSTHOOK: Input: default@bucket3_1@ds=2 POSTHOOK: Output: default@bucket3_1 @@ -444,7 +444,7 @@ value string ds string -Detailed Partition Information Partition(values:[1], dbName:default, tableName:bucket3_1, createTime:1286826089, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/bucket3_1/ds=1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:2, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), parameters:{numFiles=2, transient_lastDdlTime=1286826103, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[1], dbName:default, tableName:bucket3_1, createTime:1290146355, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/bucket3_1/ds=1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:2, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), parameters:{numFiles=2, transient_lastDdlTime=1290146388, numRows=500, totalSize=5812}) PREHOOK: query: describe extended bucket3_1 partition (ds='2') PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended bucket3_1 partition (ds='2') @@ -459,7 +459,7 @@ value string ds string -Detailed Partition Information Partition(values:[2], dbName:default, tableName:bucket3_1, createTime:1286826096, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/bucket3_1/ds=2, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:2, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), parameters:{numFiles=2, transient_lastDdlTime=1286826103, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2], dbName:default, tableName:bucket3_1, createTime:1290146374, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/bucket3_1/ds=2, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:2, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), parameters:{numFiles=2, transient_lastDdlTime=1290146388, numRows=500, totalSize=5812}) PREHOOK: query: describe extended bucket3_1 PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended bucket3_1 @@ -474,4 +474,4 @@ value string ds string -Detailed Table Information Table(tableName:bucket3_1, dbName:default, owner:thiruvel, createTime:1286826085, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/bucket3_1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:2, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=2, numFiles=4, transient_lastDdlTime=1286826103, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:bucket3_1, dbName:default, owner:heyongqiang, createTime:1290146344, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null), FieldSchema(name:ds, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/bucket3_1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:2, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null)], parameters:{numPartitions=2, numFiles=4, transient_lastDdlTime=1290146388, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/stats12.q.out =================================================================== --- ql/src/test/results/clientpositive/stats12.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats12.q.out (working copy) @@ -30,10 +30,10 @@ POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: explain extended analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain extended analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -60,10 +60,10 @@ GatherStats: true Needs Tagging: false Path -> Alias: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11 [analyze_srcpart] - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12 [analyze_srcpart] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11 [analyze_srcpart] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12 [analyze_srcpart] Path -> Partition: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11 Partition base file name: hr=11 input format: org.apache.hadoop.mapred.TextInputFormat @@ -77,13 +77,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart name analyze_srcpart partition_columns ds/hr serialization.ddl struct analyze_srcpart { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454661 + transient_lastDdlTime 1290146533 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -94,17 +94,17 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart name analyze_srcpart partition_columns ds/hr serialization.ddl struct analyze_srcpart { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454661 + transient_lastDdlTime 1290146533 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: analyze_srcpart name: analyze_srcpart - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12 Partition base file name: hr=12 input format: org.apache.hadoop.mapred.TextInputFormat @@ -118,13 +118,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart name analyze_srcpart partition_columns ds/hr serialization.ddl struct analyze_srcpart { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454661 + transient_lastDdlTime 1290146533 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -135,13 +135,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart name analyze_srcpart partition_columns ds/hr serialization.ddl struct analyze_srcpart { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454661 + transient_lastDdlTime 1290146533 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: analyze_srcpart name: analyze_srcpart @@ -152,14 +152,14 @@ PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=11 PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: Output: default@analyze_srcpart @@ -190,7 +190,7 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1289454661, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, transient_lastDdlTime=1289454686, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1290146533, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, transient_lastDdlTime=1290146557, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-08', hr=11) PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-08', hr=11) @@ -208,7 +208,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1289454677, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289454686, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146549, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146557, numRows=500, totalSize=5812}) PREHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-08', hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-08', hr=12) @@ -226,7 +226,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1289454677, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289454686, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146550, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146557, numRows=500, totalSize=5812}) PREHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-09', hr=11) PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-09', hr=11) @@ -244,7 +244,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1289454678, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1289454678}) +Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146550, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1290146550}) PREHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-09', hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-09', hr=12) @@ -262,4 +262,4 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1289454678, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1289454678}) +Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146550, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1290146550}) Index: ql/src/test/results/clientpositive/stats13.q.out =================================================================== --- ql/src/test/results/clientpositive/stats13.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats13.q.out (working copy) @@ -30,10 +30,10 @@ POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: explain extended analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain extended analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -60,9 +60,9 @@ GatherStats: true Needs Tagging: false Path -> Alias: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11 [analyze_srcpart] + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11 [analyze_srcpart] Path -> Partition: - pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11 + pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11 Partition base file name: hr=11 input format: org.apache.hadoop.mapred.TextInputFormat @@ -76,13 +76,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart name analyze_srcpart partition_columns ds/hr serialization.ddl struct analyze_srcpart { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454688 + transient_lastDdlTime 1290146558 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe input format: org.apache.hadoop.mapred.TextInputFormat @@ -93,13 +93,13 @@ columns.types string:string file.inputformat org.apache.hadoop.mapred.TextInputFormat file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - location pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart + location pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart name analyze_srcpart partition_columns ds/hr serialization.ddl struct analyze_srcpart { string key, string value} serialization.format 1 serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - transient_lastDdlTime 1289454688 + transient_lastDdlTime 1290146558 serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe name: analyze_srcpart name: analyze_srcpart @@ -110,12 +110,12 @@ PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: Output: default@analyze_srcpart POSTHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=11 @@ -144,7 +144,7 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1289454688, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, transient_lastDdlTime=1289454710, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1290146558, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, transient_lastDdlTime=1290146579, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-08', hr=11) PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-08', hr=11) @@ -162,7 +162,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1289454702, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289454710, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146579, numRows=500, totalSize=5812}) PREHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-08', hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-08', hr=12) @@ -180,7 +180,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1289454703, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1289454703}) +Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146572, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1290146572}) PREHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-09', hr=11) PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-09', hr=11) @@ -198,7 +198,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1289454703, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1289454703}) +Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146573, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1290146573}) PREHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-09', hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended analyze_srcpart partition (ds='2008-04-09', hr=12) @@ -216,7 +216,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1289454704, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1289454704}) +Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146573, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1290146573}) PREHOOK: query: create table analyze_srcpart2 like analyze_srcpart PREHOOK: type: CREATETABLE POSTHOOK: query: create table analyze_srcpart2 like analyze_srcpart @@ -247,4 +247,4 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_srcpart2, dbName:default, owner:null, createTime:1289454711, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart2, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{transient_lastDdlTime=1289454711}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_srcpart2, dbName:default, owner:null, createTime:1290146580, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart2, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{transient_lastDdlTime=1290146580}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/stats2.q.out =================================================================== --- ql/src/test/results/clientpositive/stats2.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats2.q.out (working copy) @@ -103,11 +103,11 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_t1, dbName:default, owner:null, createTime:1289454712, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_t1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{transient_lastDdlTime=1289454712}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_t1, dbName:default, owner:null, createTime:1290126752, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_t1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{transient_lastDdlTime=1290126752}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: explain analyze table analyze_t1 partition (ds, hr) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_t1 partition (ds, hr) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_t1 PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_t1 PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_t1 PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -136,7 +136,7 @@ PREHOOK: query: analyze table analyze_t1 partition (ds, hr) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_t1@ds=2008-04-08/hr=11 PREHOOK: Input: default@analyze_t1@ds=2008-04-08/hr=12 PREHOOK: Input: default@analyze_t1@ds=2008-04-09/hr=11 @@ -147,7 +147,7 @@ PREHOOK: Output: default@analyze_t1@ds=2008-04-09/hr=11 PREHOOK: Output: default@analyze_t1@ds=2008-04-09/hr=12 POSTHOOK: query: analyze table analyze_t1 partition (ds, hr) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_t1@ds=2008-04-08/hr=11 POSTHOOK: Input: default@analyze_t1@ds=2008-04-08/hr=12 POSTHOOK: Input: default@analyze_t1@ds=2008-04-09/hr=11 @@ -182,4 +182,4 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_t1, dbName:default, owner:null, createTime:1289454712, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_t1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=4, numFiles=4, transient_lastDdlTime=1289454732, numRows=2000, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_t1, dbName:default, owner:null, createTime:1290126752, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_t1, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=4, numFiles=4, transient_lastDdlTime=1290126769, numRows=2000, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/stats5.q.out =================================================================== --- ql/src/test/results/clientpositive/stats5.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats5.q.out (working copy) @@ -1,14 +1,14 @@ PREHOOK: query: create table analyze_src as select * from src -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table analyze_src as select * from src -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@analyze_src PREHOOK: query: explain analyze table analyze_src compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_src compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY ABSTRACT SYNTAX TREE: (TOK_ANALYZE (TOK_TABTYPE analyze_src)) @@ -29,11 +29,11 @@ PREHOOK: query: analyze table analyze_src compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_src PREHOOK: Output: default@analyze_src POSTHOOK: query: analyze table analyze_src compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_src POSTHOOK: Output: default@analyze_src PREHOOK: query: describe extended analyze_src @@ -43,4 +43,4 @@ key string value string -Detailed Table Information Table(tableName:analyze_src, dbName:default, owner:thiruvel, createTime:1286826326, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/analyze_src, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{numPartitions=0, numFiles=1, transient_lastDdlTime=1286826330, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_src, dbName:default, owner:heyongqiang, createTime:1290146681, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_src, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{numPartitions=0, numFiles=1, transient_lastDdlTime=1290146692, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/stats6.q.out =================================================================== --- ql/src/test/results/clientpositive/stats6.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats6.q.out (working copy) @@ -29,12 +29,12 @@ POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: Output: default@analyze_srcpart POSTHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=11 @@ -47,12 +47,12 @@ POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=12) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=12) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: Output: default@analyze_srcpart POSTHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=12 @@ -81,7 +81,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1289495447, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495455, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146715, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146726, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=12) @@ -99,7 +99,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1289495448, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495460, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146716, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146736, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=11) PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=11) @@ -117,7 +117,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1289495448, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1289495448}) +Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146716, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1290146716}) PREHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=12) @@ -135,7 +135,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1289495448, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1289495448}) +Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146717, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{transient_lastDdlTime=1290146717}) PREHOOK: query: describe extended analyze_srcpart PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart @@ -153,4 +153,4 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1289495436, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, transient_lastDdlTime=1289495460, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1290146693, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, transient_lastDdlTime=1290146737, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/stats7.q.out =================================================================== --- ql/src/test/results/clientpositive/stats7.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats7.q.out (working copy) @@ -29,9 +29,9 @@ POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -60,14 +60,14 @@ PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=11 PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: Output: default@analyze_srcpart @@ -98,7 +98,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1289495472, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495480, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146760, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146772, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=12) @@ -116,7 +116,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1289495473, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495480, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146761, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146772, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart @@ -134,4 +134,4 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1289495462, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, transient_lastDdlTime=1289495480, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1290146739, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=2, numFiles=2, transient_lastDdlTime=1290146772, numRows=1000, totalSize=11624}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/stats8.q.out =================================================================== --- ql/src/test/results/clientpositive/stats8.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats8.q.out (working copy) @@ -29,9 +29,9 @@ POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-09,hr=12).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -60,12 +60,12 @@ PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=11) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: Output: default@analyze_srcpart POSTHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=11 @@ -94,7 +94,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1289495494, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495500, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146797, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146810, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart @@ -112,11 +112,11 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1289495481, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, transient_lastDdlTime=1289495500, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1290146774, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=1, numFiles=1, transient_lastDdlTime=1290146810, numRows=500, totalSize=5812}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=12) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=12) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -145,12 +145,12 @@ PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=12) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-08',hr=12) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: Output: default@analyze_srcpart POSTHOOK: Output: default@analyze_srcpart@ds=2008-04-08/hr=12 @@ -179,11 +179,11 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1289495494, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495506, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146799, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146820, numRows=500, totalSize=5812}) PREHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=11) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=11) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -212,12 +212,12 @@ PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=11) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-09/hr=11 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-09/hr=11 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=11) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-09/hr=11 POSTHOOK: Output: default@analyze_srcpart POSTHOOK: Output: default@analyze_srcpart@ds=2008-04-09/hr=11 @@ -246,11 +246,11 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1289495494, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495512, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146799, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146830, numRows=500, totalSize=5812}) PREHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=12) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=12) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -279,12 +279,12 @@ PREHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=12) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-09/hr=12 PREHOOK: Output: default@analyze_srcpart PREHOOK: Output: default@analyze_srcpart@ds=2008-04-09/hr=12 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds='2008-04-09',hr=12) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-09/hr=12 POSTHOOK: Output: default@analyze_srcpart POSTHOOK: Output: default@analyze_srcpart@ds=2008-04-09/hr=12 @@ -313,11 +313,11 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1289495495, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495518, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146800, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146842, numRows=500, totalSize=5812}) PREHOOK: query: explain analyze table analyze_srcpart PARTITION(ds, hr) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_srcpart PARTITION(ds, hr) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: analyze_srcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -346,7 +346,7 @@ PREHOOK: query: analyze table analyze_srcpart PARTITION(ds, hr) compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 PREHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 PREHOOK: Input: default@analyze_srcpart@ds=2008-04-09/hr=11 @@ -357,7 +357,7 @@ PREHOOK: Output: default@analyze_srcpart@ds=2008-04-09/hr=11 PREHOOK: Output: default@analyze_srcpart@ds=2008-04-09/hr=12 POSTHOOK: query: analyze table analyze_srcpart PARTITION(ds, hr) compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-08/hr=12 POSTHOOK: Input: default@analyze_srcpart@ds=2008-04-09/hr=11 @@ -392,7 +392,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1289495494, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495525, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146797, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146854, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-08',hr=12) @@ -410,7 +410,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1289495494, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495525, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146799, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-08/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146854, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=11) PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=11) @@ -428,7 +428,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1289495494, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495526, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-09, 11], dbName:default, tableName:analyze_srcpart, createTime:1290146799, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=11, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146854, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=12) PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart PARTITION(ds='2008-04-09',hr=12) @@ -446,7 +446,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1289495495, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1289495526, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-09, 12], dbName:default, tableName:analyze_srcpart, createTime:1290146800, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart/ds=2008-04-09/hr=12, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), parameters:{numFiles=1, transient_lastDdlTime=1290146854, numRows=500, totalSize=5812}) PREHOOK: query: describe extended analyze_srcpart PREHOOK: type: DESCTABLE POSTHOOK: query: describe extended analyze_srcpart @@ -464,4 +464,4 @@ ds string hr string -Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1289495481, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=4, numFiles=4, transient_lastDdlTime=1289495526, numRows=2000, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_srcpart, dbName:default, owner:null, createTime:1290146774, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:default), FieldSchema(name:value, type:string, comment:default), FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcpart, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[FieldSchema(name:ds, type:string, comment:null), FieldSchema(name:hr, type:string, comment:null)], parameters:{numPartitions=4, numFiles=4, transient_lastDdlTime=1290146854, numRows=2000, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/stats9.q.out =================================================================== --- ql/src/test/results/clientpositive/stats9.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/stats9.q.out (working copy) @@ -14,9 +14,9 @@ POSTHOOK: Lineage: analyze_srcbucket.key SIMPLE [(srcbucket)srcbucket.FieldSchema(name:key, type:int, comment:null), ] POSTHOOK: Lineage: analyze_srcbucket.value SIMPLE [(srcbucket)srcbucket.FieldSchema(name:value, type:string, comment:null), ] PREHOOK: query: explain analyze table analyze_srcbucket compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY POSTHOOK: query: explain analyze table analyze_srcbucket compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Lineage: analyze_srcbucket.key SIMPLE [(srcbucket)srcbucket.FieldSchema(name:key, type:int, comment:null), ] POSTHOOK: Lineage: analyze_srcbucket.value SIMPLE [(srcbucket)srcbucket.FieldSchema(name:value, type:string, comment:null), ] ABSTRACT SYNTAX TREE: @@ -39,11 +39,11 @@ PREHOOK: query: analyze table analyze_srcbucket compute statistics -PREHOOK: type: null +PREHOOK: type: QUERY PREHOOK: Input: default@analyze_srcbucket PREHOOK: Output: default@analyze_srcbucket POSTHOOK: query: analyze table analyze_srcbucket compute statistics -POSTHOOK: type: null +POSTHOOK: type: QUERY POSTHOOK: Input: default@analyze_srcbucket POSTHOOK: Output: default@analyze_srcbucket POSTHOOK: Lineage: analyze_srcbucket.key SIMPLE [(srcbucket)srcbucket.FieldSchema(name:key, type:int, comment:null), ] @@ -57,4 +57,4 @@ key int value string -Detailed Table Information Table(tableName:analyze_srcbucket, dbName:default, owner:thiruvel, createTime:1286826500, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/analyze_srcbucket, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:2, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{numPartitions=0, EXTERNAL=FALSE, numFiles=1, transient_lastDdlTime=1286826508, numRows=1000, totalSize=11603}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:analyze_srcbucket, dbName:default, owner:heyongqiang, createTime:1290146857, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/analyze_srcbucket, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:2, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{numPartitions=0, numFiles=1, transient_lastDdlTime=1290146885, numRows=1000, totalSize=11603}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Index: ql/src/test/results/clientpositive/str_to_map.q.out =================================================================== --- ql/src/test/results/clientpositive/str_to_map.q.out (revision 1044070) +++ ql/src/test/results/clientpositive/str_to_map.q.out (working copy) @@ -48,11 +48,11 @@ PREHOOK: query: select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3 PREHOOK: type: QUERY PREHOOK: Input: default@src -PREHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-48-48_939_5414753236298860779/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-11-47_081_185807984859506518/-mr-10000 POSTHOOK: query: select str_to_map('a=1,b=2,c=3',',','=')['a'] from src limit 3 POSTHOOK: type: QUERY POSTHOOK: Input: default@src -POSTHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-48-48_939_5414753236298860779/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-11-47_081_185807984859506518/-mr-10000 1 1 1 @@ -95,11 +95,11 @@ PREHOOK: query: select str_to_map('a:1,b:2,c:3') from src limit 3 PREHOOK: type: QUERY PREHOOK: Input: default@src -PREHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-48-51_828_6905327639418151142/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-11-53_276_628458177270710173/-mr-10000 POSTHOOK: query: select str_to_map('a:1,b:2,c:3') from src limit 3 POSTHOOK: type: QUERY POSTHOOK: Input: default@src -POSTHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-48-51_828_6905327639418151142/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-11-53_276_628458177270710173/-mr-10000 {"b":"2","c":"3","a":"1"} {"b":"2","c":"3","a":"1"} {"b":"2","c":"3","a":"1"} @@ -142,11 +142,11 @@ PREHOOK: query: select str_to_map('a:1,b:2,c:3',',',':') from src limit 3 PREHOOK: type: QUERY PREHOOK: Input: default@src -PREHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-48-54_404_1637219732245487353/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-12-00_242_6299210516765000168/-mr-10000 POSTHOOK: query: select str_to_map('a:1,b:2,c:3',',',':') from src limit 3 POSTHOOK: type: QUERY POSTHOOK: Input: default@src -POSTHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-48-54_404_1637219732245487353/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-12-00_242_6299210516765000168/-mr-10000 {"b":"2","c":"3","a":"1"} {"b":"2","c":"3","a":"1"} {"b":"2","c":"3","a":"1"} @@ -205,13 +205,13 @@ limit 3 PREHOOK: type: QUERY PREHOOK: Input: default@src -PREHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-48-56_995_8619552318902310354/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-12-08_090_5560348263638743320/-mr-10000 POSTHOOK: query: select str_to_map(t.ss,',',':')['a'] from (select transform('a:1,b:2,c:3') using 'cat' as (ss) from src) t limit 3 POSTHOOK: type: QUERY POSTHOOK: Input: default@src -POSTHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-48-56_995_8619552318902310354/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-12-08_090_5560348263638743320/-mr-10000 1 1 1 @@ -220,20 +220,20 @@ POSTHOOK: query: drop table tbl_s2m POSTHOOK: type: DROPTABLE PREHOOK: query: create table tbl_s2m as select 'ABC=CC_333=444' as t from src limit 3 -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table tbl_s2m as select 'ABC=CC_333=444' as t from src limit 3 -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@tbl_s2m PREHOOK: query: select str_to_map(t,'_','=')['333'] from tbl_s2m PREHOOK: type: QUERY PREHOOK: Input: default@tbl_s2m -PREHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-49-02_576_7096389194927995175/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-12-26_274_4931967655402208603/-mr-10000 POSTHOOK: query: select str_to_map(t,'_','=')['333'] from tbl_s2m POSTHOOK: type: QUERY POSTHOOK: Input: default@tbl_s2m -POSTHOOK: Output: file:/tmp/sdong/hive_2010-11-12_00-49-02_576_7096389194927995175/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_16-12-26_274_4931967655402208603/-mr-10000 444 444 444