Index: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java =================================================================== --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (revision 1057802) +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (working copy) @@ -263,7 +263,7 @@ HIVESKEWJOINKEY("hive.skewjoin.key", 1000000), HIVESKEWJOINMAPJOINNUMMAPTASK("hive.skewjoin.mapjoin.map.tasks", 10000), HIVESKEWJOINMAPJOINMINSPLIT("hive.skewjoin.mapjoin.min.split", 33554432L), //32M - MAPREDMINSPLITSIZE("mapred.min.split.size", 1), + MAPREDMINSPLITSIZE("mapred.min.split.size", 1L), HIVEMERGEMAPONLY("hive.mergejob.maponly", true), HIVESENDHEARTBEAT("hive.heartbeat.interval", 1000), @@ -334,6 +334,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_USER_GRANTS("hive.security.authorization.createtable.user.grants", null), + HIVE_AUTHORIZATION_TABLE_GROUP_GRANTS("hive.security.authorization.createtable.group.grants", null), + HIVE_AUTHORIZATION_TABLE_ROLE_GRANTS("hive.security.authorization.createtable.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 1057802) +++ conf/hive-default.xml (working copy) @@ -853,6 +853,52 @@ 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.DefaultHiveAuthorizationProvider + the hive client authorization manager class name. + The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider. + + + + + hive.security.authenticator.manager + org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator + hive client authenticator manager class name. + The user defined authenticator should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider. + + + + hive.security.authorization.createtable.user.grants + + the privileges automatically granted to some users whenever 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 whenever a new table created. + + + + hive.security.authorization.createtable.group.grants + + the privileges automatically granted to some groups whenever 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 whenever a new table created. + + + + hive.security.authorization.createtable.role.grants + + the privileges automatically granted to some roles whenever 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 whenever a new table created. + + hive.error.on.empty.partition false Index: metastore/if/hive_metastore.thrift =================================================================== --- metastore/if/hive_metastore.thrift (revision 1057802) +++ metastore/if/hive_metastore.thrift (working copy) @@ -29,12 +29,66 @@ 4: optional list fields // if the name is one of the user defined types } +enum HiveObjectType { + GLOBAL = 1, + DATABASE = 2, + TABLE = 3, + PARTITION = 4, + COLUMN = 5, +} + +enum PrincipalType { + USER = 1, + ROLE = 2, + GROUP = 3, +} + +struct HiveObjectRef{ + 1: HiveObjectType objectType, + 2: string dbName, + 3: string objectName, + 4: list partValues, + 5: string columnName, +} + +struct PrivilegeGrantInfo { + 1: string privilege, + 2: i32 createTime, + 3: string grantor, + 4: PrincipalType grantorType, + 5: bool grantOption, +} + +struct HiveObjectPrivilege { + 1: HiveObjectRef hiveObject, + 2: string principalName, + 3: PrincipalType principalType, + 4: PrivilegeGrantInfo grantInfo, +} + +struct PrivilegeBag { + 1: list privileges, +} + +struct PrincipalPrivilegeSet { + 1: map> userPrivileges, // user name -> privilege grant info + 2: map> groupPrivileges, // group name -> privilege grant info + 3: map> rolePrivileges, //role name -> privilege grant info +} + +struct Role { + 1: string roleName, + 2: i32 createTime, + 3: string ownerName, +} + // namespace for tables struct Database { 1: string name, 2: string description, 3: string locationUri, - 4: map parameters // properties associated with the database + 4: map parameters, // properties associated with the database + 5: optional PrincipalPrivilegeSet privileges } // This object holds the information needed by SerDes @@ -77,7 +131,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 +142,8 @@ 4: i32 createTime, 5: i32 lastAccessTime, 6: StorageDescriptor sd, - 7: map parameters + 7: map parameters, + 8: optional PrincipalPrivilegeSet privileges } struct Index { @@ -110,7 +166,6 @@ 2: map properties } - exception MetaException { 1: string message } @@ -210,6 +265,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) @@ -217,6 +276,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) @@ -229,6 +291,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) @@ -273,6 +338,24 @@ 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 + + bool create_role(1:Role role) throws(1:MetaException o1) + bool drop_role(1:string role_name) throws(1:MetaException o1) + bool grant_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type, + 4:string grantor, 5:PrincipalType grantorType, 6:bool grant_option) throws(1:MetaException o1) + bool revoke_role(1:string role_name, 2:string principal_name, 3:PrincipalType principal_type) + throws(1:MetaException o1) + list list_roles(1:string principal_name, 2:PrincipalType principal_type) throws(1:MetaException o1) + + PrincipalPrivilegeSet get_privilege_set(1:HiveObjectRef hiveObject, 2:string user_name, + 3: list group_names) throws(1:MetaException o1) + list list_privileges(1:string principal_name, 2:PrincipalType principal_type, + 3: HiveObjectRef hiveObject) throws(1:MetaException o1) + + bool grant_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1) + bool revoke_privileges(1:PrivilegeBag privileges) 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 1057802) +++ 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 _size155; + ::apache::thrift::protocol::TType _etype158; + iprot->readListBegin(_etype158, _size155); + this->success.resize(_size155); + uint32_t _i159; + for (_i159 = 0; _i159 < _size155; ++_i159) { - xfer += iprot->readString(this->success[_i102]); + xfer += iprot->readString(this->success[_i159]); } 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 _iter160; + for (_iter160 = this->success.begin(); _iter160 != this->success.end(); ++_iter160) { - xfer += oprot->writeString((*_iter103)); + xfer += oprot->writeString((*_iter160)); } 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 _size161; + ::apache::thrift::protocol::TType _etype164; + iprot->readListBegin(_etype164, _size161); + (*(this->success)).resize(_size161); + uint32_t _i165; + for (_i165 = 0; _i165 < _size161; ++_i165) { - xfer += iprot->readString((*(this->success))[_i108]); + xfer += iprot->readString((*(this->success))[_i165]); } 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 _size166; + ::apache::thrift::protocol::TType _etype169; + iprot->readListBegin(_etype169, _size166); + this->success.resize(_size166); + uint32_t _i170; + for (_i170 = 0; _i170 < _size166; ++_i170) { - xfer += iprot->readString(this->success[_i113]); + xfer += iprot->readString(this->success[_i170]); } 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 _iter171; + for (_iter171 = this->success.begin(); _iter171 != this->success.end(); ++_iter171) { - xfer += oprot->writeString((*_iter114)); + xfer += oprot->writeString((*_iter171)); } 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 _size172; + ::apache::thrift::protocol::TType _etype175; + iprot->readListBegin(_etype175, _size172); + (*(this->success)).resize(_size172); + uint32_t _i176; + for (_i176 = 0; _i176 < _size172; ++_i176) { - xfer += iprot->readString((*(this->success))[_i119]); + xfer += iprot->readString((*(this->success))[_i176]); } iprot->readListEnd(); } @@ -1913,17 +1913,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 _size177; + ::apache::thrift::protocol::TType _ktype178; + ::apache::thrift::protocol::TType _vtype179; + iprot->readMapBegin(_ktype178, _vtype179, _size177); + uint32_t _i181; + for (_i181 = 0; _i181 < _size177; ++_i181) { - std::string _key125; - xfer += iprot->readString(_key125); - Type& _val126 = this->success[_key125]; - xfer += _val126.read(iprot); + std::string _key182; + xfer += iprot->readString(_key182); + Type& _val183 = this->success[_key182]; + xfer += _val183.read(iprot); } iprot->readMapEnd(); } @@ -1962,11 +1962,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 _iter184; + for (_iter184 = this->success.begin(); _iter184 != this->success.end(); ++_iter184) { - xfer += oprot->writeString(_iter127->first); - xfer += _iter127->second.write(oprot); + xfer += oprot->writeString(_iter184->first); + xfer += _iter184->second.write(oprot); } xfer += oprot->writeMapEnd(); } @@ -2005,17 +2005,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 _size185; + ::apache::thrift::protocol::TType _ktype186; + ::apache::thrift::protocol::TType _vtype187; + iprot->readMapBegin(_ktype186, _vtype187, _size185); + uint32_t _i189; + for (_i189 = 0; _i189 < _size185; ++_i189) { - std::string _key133; - xfer += iprot->readString(_key133); - Type& _val134 = (*(this->success))[_key133]; - xfer += _val134.read(iprot); + std::string _key190; + xfer += iprot->readString(_key190); + Type& _val191 = (*(this->success))[_key190]; + xfer += _val191.read(iprot); } iprot->readMapEnd(); } @@ -2144,14 +2144,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 _size192; + ::apache::thrift::protocol::TType _etype195; + iprot->readListBegin(_etype195, _size192); + this->success.resize(_size192); + uint32_t _i196; + for (_i196 = 0; _i196 < _size192; ++_i196) { - xfer += this->success[_i139].read(iprot); + xfer += this->success[_i196].read(iprot); } iprot->readListEnd(); } @@ -2206,10 +2206,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 _iter197; + for (_iter197 = this->success.begin(); _iter197 != this->success.end(); ++_iter197) { - xfer += (*_iter140).write(oprot); + xfer += (*_iter197).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2256,14 +2256,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 _size198; + ::apache::thrift::protocol::TType _etype201; + iprot->readListBegin(_etype201, _size198); + (*(this->success)).resize(_size198); + uint32_t _i202; + for (_i202 = 0; _i202 < _size198; ++_i202) { - xfer += (*(this->success))[_i145].read(iprot); + xfer += (*(this->success))[_i202].read(iprot); } iprot->readListEnd(); } @@ -2408,14 +2408,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 _size203; + ::apache::thrift::protocol::TType _etype206; + iprot->readListBegin(_etype206, _size203); + this->success.resize(_size203); + uint32_t _i207; + for (_i207 = 0; _i207 < _size203; ++_i207) { - xfer += this->success[_i150].read(iprot); + xfer += this->success[_i207].read(iprot); } iprot->readListEnd(); } @@ -2470,10 +2470,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 _iter208; + for (_iter208 = this->success.begin(); _iter208 != this->success.end(); ++_iter208) { - xfer += (*_iter151).write(oprot); + xfer += (*_iter208).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2520,14 +2520,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 _size209; + ::apache::thrift::protocol::TType _etype212; + iprot->readListBegin(_etype212, _size209); + (*(this->success)).resize(_size209); + uint32_t _i213; + for (_i213 = 0; _i213 < _size209; ++_i213) { - xfer += (*(this->success))[_i156].read(iprot); + xfer += (*(this->success))[_i213].read(iprot); } iprot->readListEnd(); } @@ -3096,14 +3096,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 _size214; + ::apache::thrift::protocol::TType _etype217; + iprot->readListBegin(_etype217, _size214); + this->success.resize(_size214); + uint32_t _i218; + for (_i218 = 0; _i218 < _size214; ++_i218) { - xfer += iprot->readString(this->success[_i161]); + xfer += iprot->readString(this->success[_i218]); } iprot->readListEnd(); } @@ -3142,10 +3142,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 _iter219; + for (_iter219 = this->success.begin(); _iter219 != this->success.end(); ++_iter219) { - xfer += oprot->writeString((*_iter162)); + xfer += oprot->writeString((*_iter219)); } xfer += oprot->writeListEnd(); } @@ -3184,14 +3184,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 _size220; + ::apache::thrift::protocol::TType _etype223; + iprot->readListBegin(_etype223, _size220); + (*(this->success)).resize(_size220); + uint32_t _i224; + for (_i224 = 0; _i224 < _size220; ++_i224) { - xfer += iprot->readString((*(this->success))[_i167]); + xfer += iprot->readString((*(this->success))[_i224]); } iprot->readListEnd(); } @@ -3306,14 +3306,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 _size225; + ::apache::thrift::protocol::TType _etype228; + iprot->readListBegin(_etype228, _size225); + this->success.resize(_size225); + uint32_t _i229; + for (_i229 = 0; _i229 < _size225; ++_i229) { - xfer += iprot->readString(this->success[_i172]); + xfer += iprot->readString(this->success[_i229]); } iprot->readListEnd(); } @@ -3352,10 +3352,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 _iter230; + for (_iter230 = this->success.begin(); _iter230 != this->success.end(); ++_iter230) { - xfer += oprot->writeString((*_iter173)); + xfer += oprot->writeString((*_iter230)); } xfer += oprot->writeListEnd(); } @@ -3394,14 +3394,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 _size231; + ::apache::thrift::protocol::TType _etype234; + iprot->readListBegin(_etype234, _size231); + (*(this->success)).resize(_size231); + uint32_t _i235; + for (_i235 = 0; _i235 < _size231; ++_i235) { - xfer += iprot->readString((*(this->success))[_i178]); + xfer += iprot->readString((*(this->success))[_i235]); } iprot->readListEnd(); } @@ -4106,14 +4106,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 _size236; + ::apache::thrift::protocol::TType _etype239; + iprot->readListBegin(_etype239, _size236); + this->part_vals.resize(_size236); + uint32_t _i240; + for (_i240 = 0; _i240 < _size236; ++_i240) { - xfer += iprot->readString(this->part_vals[_i183]); + xfer += iprot->readString(this->part_vals[_i240]); } iprot->readListEnd(); } @@ -4146,10 +4146,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 _iter241; + for (_iter241 = this->part_vals.begin(); _iter241 != this->part_vals.end(); ++_iter241) { - xfer += oprot->writeString((*_iter184)); + xfer += oprot->writeString((*_iter241)); } xfer += oprot->writeListEnd(); } @@ -4171,10 +4171,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 _iter242; + for (_iter242 = (*(this->part_vals)).begin(); _iter242 != (*(this->part_vals)).end(); ++_iter242) { - xfer += oprot->writeString((*_iter185)); + xfer += oprot->writeString((*_iter242)); } xfer += oprot->writeListEnd(); } @@ -4626,14 +4626,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 _size243; + ::apache::thrift::protocol::TType _etype246; + iprot->readListBegin(_etype246, _size243); + this->part_vals.resize(_size243); + uint32_t _i247; + for (_i247 = 0; _i247 < _size243; ++_i247) { - xfer += iprot->readString(this->part_vals[_i190]); + xfer += iprot->readString(this->part_vals[_i247]); } iprot->readListEnd(); } @@ -4674,10 +4674,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 _iter248; + for (_iter248 = this->part_vals.begin(); _iter248 != this->part_vals.end(); ++_iter248) { - xfer += oprot->writeString((*_iter191)); + xfer += oprot->writeString((*_iter248)); } xfer += oprot->writeListEnd(); } @@ -4702,10 +4702,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 _iter249; + for (_iter249 = (*(this->part_vals)).begin(); _iter249 != (*(this->part_vals)).end(); ++_iter249) { - xfer += oprot->writeString((*_iter192)); + xfer += oprot->writeString((*_iter249)); } xfer += oprot->writeListEnd(); } @@ -5134,14 +5134,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 _size250; + ::apache::thrift::protocol::TType _etype253; + iprot->readListBegin(_etype253, _size250); + this->part_vals.resize(_size250); + uint32_t _i254; + for (_i254 = 0; _i254 < _size250; ++_i254) { - xfer += iprot->readString(this->part_vals[_i197]); + xfer += iprot->readString(this->part_vals[_i254]); } iprot->readListEnd(); } @@ -5174,10 +5174,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 _iter255; + for (_iter255 = this->part_vals.begin(); _iter255 != this->part_vals.end(); ++_iter255) { - xfer += oprot->writeString((*_iter198)); + xfer += oprot->writeString((*_iter255)); } xfer += oprot->writeListEnd(); } @@ -5199,10 +5199,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 _iter256; + for (_iter256 = (*(this->part_vals)).begin(); _iter256 != (*(this->part_vals)).end(); ++_iter256) { - xfer += oprot->writeString((*_iter199)); + xfer += oprot->writeString((*_iter256)); } xfer += oprot->writeListEnd(); } @@ -5348,7 +5348,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; @@ -5385,9 +5385,49 @@ } break; case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size257; + ::apache::thrift::protocol::TType _etype260; + iprot->readListBegin(_etype260, _size257); + this->part_vals.resize(_size257); + uint32_t _i261; + for (_i261 = 0; _i261 < _size257; ++_i261) + { + xfer += iprot->readString(this->part_vals[_i261]); + } + 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 _size262; + ::apache::thrift::protocol::TType _etype265; + iprot->readListBegin(_etype265, _size262); + this->group_names.resize(_size262); + uint32_t _i266; + for (_i266 = 0; _i266 < _size262; ++_i266) + { + xfer += iprot->readString(this->group_names[_i266]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -5404,41 +5444,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 _iter267; + for (_iter267 = this->part_vals.begin(); _iter267 != this->part_vals.end(); ++_iter267) + { + xfer += oprot->writeString((*_iter267)); + } + 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 _iter268; + for (_iter268 = this->group_names.begin(); _iter268 != this->group_names.end(); ++_iter268) + { + xfer += oprot->writeString((*_iter268)); + } + 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 _iter269; + for (_iter269 = (*(this->part_vals)).begin(); _iter269 != (*(this->part_vals)).end(); ++_iter269) + { + xfer += oprot->writeString((*_iter269)); + } + 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 _iter270; + for (_iter270 = (*(this->group_names)).begin(); _iter270 != (*(this->group_names)).end(); ++_iter270) + { + xfer += oprot->writeString((*_iter270)); + } + 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; @@ -5494,11 +5578,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); @@ -5518,7 +5602,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; @@ -5574,7 +5658,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; @@ -5611,9 +5695,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); } @@ -5630,41 +5714,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; @@ -5685,20 +5769,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); @@ -5732,23 +5804,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); @@ -5764,7 +5828,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; @@ -5785,20 +5849,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); @@ -5832,7 +5884,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; @@ -5888,9 +5940,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(); @@ -5905,9 +5957,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(); @@ -5922,7 +5974,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; @@ -5946,14 +5998,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 _size271; + ::apache::thrift::protocol::TType _etype274; + iprot->readListBegin(_etype274, _size271); + this->success.resize(_size271); + uint32_t _i275; + for (_i275 = 0; _i275 < _size271; ++_i275) { - xfer += iprot->readString(this->success[_i215]); + xfer += this->success[_i275].read(iprot); } iprot->readListEnd(); } @@ -5964,6 +6016,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 { @@ -5982,26 +6042,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 _iter276; + for (_iter276 = this->success.begin(); _iter276 != this->success.end(); ++_iter276) { - xfer += oprot->writeString((*_iter216)); + xfer += (*_iter276).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(); } @@ -6010,7 +6074,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; @@ -6034,14 +6098,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 _size277; + ::apache::thrift::protocol::TType _etype280; + iprot->readListBegin(_etype280, _size277); + (*(this->success)).resize(_size277); + uint32_t _i281; + for (_i281 = 0; _i281 < _size277; ++_i281) { - xfer += iprot->readString((*(this->success))[_i221]); + xfer += (*(this->success))[_i281].read(iprot); } iprot->readListEnd(); } @@ -6052,6 +6116,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 { @@ -6070,7 +6142,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; @@ -6107,29 +6179,37 @@ } break; case 3: + 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_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->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) + this->group_names.clear(); + uint32_t _size282; + ::apache::thrift::protocol::TType _etype285; + iprot->readListBegin(_etype285, _size282); + this->group_names.resize(_size282); + uint32_t _i286; + for (_i286 = 0; _i286 < _size282; ++_i286) { - xfer += iprot->readString(this->part_vals[_i226]); + xfer += iprot->readString(this->group_names[_i286]); } 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; + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -6146,63 +6226,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 _iter287; + for (_iter287 = this->group_names.begin(); _iter287 != this->group_names.end(); ++_iter287) { - xfer += oprot->writeString((*_iter227)); + xfer += oprot->writeString((*_iter287)); } 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 _iter288; + for (_iter288 = (*(this->group_names)).begin(); _iter288 != (*(this->group_names)).end(); ++_iter288) { - xfer += oprot->writeString((*_iter228)); + xfer += oprot->writeString((*_iter288)); } 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; @@ -6226,14 +6312,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 _size289; + ::apache::thrift::protocol::TType _etype292; + iprot->readListBegin(_etype292, _size289); + this->success.resize(_size289); + uint32_t _i293; + for (_i293 = 0; _i293 < _size289; ++_i293) { - xfer += this->success[_i233].read(iprot); + xfer += this->success[_i293].read(iprot); } iprot->readListEnd(); } @@ -6250,6 +6336,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; @@ -6262,20 +6356,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 _iter294; + for (_iter294 = this->success.begin(); _iter294 != this->success.end(); ++_iter294) { - xfer += (*_iter234).write(oprot); + xfer += (*_iter294).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6284,13 +6378,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; @@ -6314,14 +6412,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 _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))[_i239].read(iprot); + xfer += (*(this->success))[_i299].read(iprot); } iprot->readListEnd(); } @@ -6338,6 +6436,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; @@ -6350,7 +6456,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; @@ -6387,34 +6493,14 @@ } 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; + 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; - } else { - xfer += iprot->skip(ftype); - } - break; - default: + default: xfer += iprot->skip(ftype); break; } @@ -6426,27 +6512,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(); @@ -6454,27 +6529,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(); @@ -6482,7 +6546,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; @@ -6506,14 +6570,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 _size300; + ::apache::thrift::protocol::TType _etype303; + iprot->readListBegin(_etype303, _size300); + this->success.resize(_size300); + uint32_t _i304; + for (_i304 = 0; _i304 < _size300; ++_i304) { - xfer += iprot->readString(this->success[_i251]); + xfer += iprot->readString(this->success[_i304]); } iprot->readListEnd(); } @@ -6524,8 +6588,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); } @@ -6542,27 +6606,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 _iter305; + for (_iter305 = this->success.begin(); _iter305 != this->success.end(); ++_iter305) { - xfer += oprot->writeString((*_iter252)); + xfer += oprot->writeString((*_iter305)); } 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(); @@ -6570,7 +6634,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; @@ -6594,14 +6658,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 _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))[_i257]); + xfer += iprot->readString((*(this->success))[_i310]); } iprot->readListEnd(); } @@ -6612,8 +6676,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); } @@ -6630,7 +6694,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; @@ -6667,9 +6731,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 _size311; + ::apache::thrift::protocol::TType _etype314; + iprot->readListBegin(_etype314, _size311); + this->part_vals.resize(_size311); + uint32_t _i315; + for (_i315 = 0; _i315 < _size311; ++_i315) + { + xfer += iprot->readString(this->part_vals[_i315]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; } else { xfer += iprot->skip(ftype); } @@ -6694,17 +6770,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 _iter316; + for (_iter316 = this->part_vals.begin(); _iter316 != this->part_vals.end(); ++_iter316) + { + xfer += oprot->writeString((*_iter316)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); @@ -6714,17 +6798,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 _iter317; + for (_iter317 = (*(this->part_vals)).begin(); _iter317 != (*(this->part_vals)).end(); ++_iter317) + { + xfer += oprot->writeString((*_iter317)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); @@ -6734,7 +6826,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; @@ -6758,14 +6850,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 _size318; + ::apache::thrift::protocol::TType _etype321; + iprot->readListBegin(_etype321, _size318); + this->success.resize(_size318); + uint32_t _i322; + for (_i322 = 0; _i322 < _size318; ++_i322) { - xfer += this->success[_i262].read(iprot); + xfer += this->success[_i322].read(iprot); } iprot->readListEnd(); } @@ -6782,14 +6874,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; @@ -6802,20 +6886,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 _iter323; + for (_iter323 = this->success.begin(); _iter323 != this->success.end(); ++_iter323) { - xfer += (*_iter263).write(oprot); + xfer += (*_iter323).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6824,17 +6908,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; @@ -6858,14 +6938,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 _size324; + ::apache::thrift::protocol::TType _etype327; + iprot->readListBegin(_etype327, _size324); + (*(this->success)).resize(_size324); + uint32_t _i328; + for (_i328 = 0; _i328 < _size324; ++_i328) { - xfer += (*(this->success))[_i268].read(iprot); + xfer += (*(this->success))[_i328].read(iprot); } iprot->readListEnd(); } @@ -6882,14 +6962,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; @@ -6902,7 +6974,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; @@ -6939,9 +7011,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 _size329; + ::apache::thrift::protocol::TType _etype332; + iprot->readListBegin(_etype332, _size329); + this->part_vals.resize(_size329); + uint32_t _i333; + for (_i333 = 0; _i333 < _size329; ++_i333) + { + xfer += iprot->readString(this->part_vals[_i333]); + } + 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 _size334; + ::apache::thrift::protocol::TType _etype337; + iprot->readListBegin(_etype337, _size334); + this->group_names.resize(_size334); + uint32_t _i338; + for (_i338 = 0; _i338 < _size334; ++_i338) + { + xfer += iprot->readString(this->group_names[_i338]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -6958,41 +7078,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 _iter339; + for (_iter339 = this->part_vals.begin(); _iter339 != this->part_vals.end(); ++_iter339) + { + xfer += oprot->writeString((*_iter339)); + } + 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 _iter340; + for (_iter340 = this->group_names.begin(); _iter340 != this->group_names.end(); ++_iter340) + { + xfer += oprot->writeString((*_iter340)); + } + 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 _iter341; + for (_iter341 = (*(this->part_vals)).begin(); _iter341 != (*(this->part_vals)).end(); ++_iter341) + { + xfer += oprot->writeString((*_iter341)); + } + 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 _iter342; + for (_iter342 = (*(this->group_names)).begin(); _iter342 != (*(this->group_names)).end(); ++_iter342) + { + xfer += oprot->writeString((*_iter342)); + } + 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; @@ -7012,6 +7182,26 @@ } switch (fid) { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size343; + ::apache::thrift::protocol::TType _etype346; + iprot->readListBegin(_etype346, _size343); + this->success.resize(_size343); + uint32_t _i347; + for (_i347 = 0; _i347 < _size343; ++_i347) + { + xfer += this->success[_i347].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); @@ -7040,13 +7230,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 _iter348; + for (_iter348 = this->success.begin(); _iter348 != this->success.end(); ++_iter348) + { + xfer += (*_iter348).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(); @@ -7060,7 +7262,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; @@ -7080,6 +7282,26 @@ } switch (fid) { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size349; + ::apache::thrift::protocol::TType _etype352; + iprot->readListBegin(_etype352, _size349); + (*(this->success)).resize(_size349); + uint32_t _i353; + for (_i353 = 0; _i353 < _size349; ++_i353) + { + xfer += (*(this->success))[_i353].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); @@ -7108,7 +7330,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; @@ -7130,16 +7352,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 _size354; + ::apache::thrift::protocol::TType _etype357; + iprot->readListBegin(_etype357, _size354); + this->part_vals.resize(_size354); + uint32_t _i358; + for (_i358 = 0; _i358 < _size354; ++_i358) + { + xfer += iprot->readString(this->part_vals[_i358]); + } + 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); } @@ -7156,35 +7406,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 _iter359; + for (_iter359 = this->part_vals.begin(); _iter359 != this->part_vals.end(); ++_iter359) + { + xfer += oprot->writeString((*_iter359)); + } + 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 _iter360; + for (_iter360 = (*(this->part_vals)).begin(); _iter360 != (*(this->part_vals)).end(); ++_iter360) + { + xfer += oprot->writeString((*_iter360)); + } + 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; @@ -7205,8 +7483,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 _size361; + ::apache::thrift::protocol::TType _etype364; + iprot->readListBegin(_etype364, _size361); + this->success.resize(_size361); + uint32_t _i365; + for (_i365 = 0; _i365 < _size361; ++_i365) + { + xfer += iprot->readString(this->success[_i365]); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7232,15 +7522,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 _iter366; + for (_iter366 = this->success.begin(); _iter366 != this->success.end(); ++_iter366) + { + xfer += oprot->writeString((*_iter366)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -7252,7 +7550,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; @@ -7273,8 +7571,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 _size367; + ::apache::thrift::protocol::TType _etype370; + iprot->readListBegin(_etype370, _size367); + (*(this->success)).resize(_size367); + uint32_t _i371; + for (_i371 = 0; _i371 < _size367; ++_i371) + { + xfer += iprot->readString((*(this->success))[_i371]); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7300,7 +7610,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; @@ -7322,8 +7632,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); } @@ -7340,29 +7674,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; @@ -7386,14 +7738,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 _size372; + ::apache::thrift::protocol::TType _etype375; + iprot->readListBegin(_etype375, _size372); + this->success.resize(_size372); + uint32_t _i376; + for (_i376 = 0; _i376 < _size372; ++_i376) { - xfer += iprot->readString(this->success[_i273]); + xfer += this->success[_i376].read(iprot); } iprot->readListEnd(); } @@ -7410,6 +7762,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; @@ -7422,20 +7782,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 _iter377; + for (_iter377 = this->success.begin(); _iter377 != this->success.end(); ++_iter377) { - xfer += oprot->writeString((*_iter274)); + xfer += (*_iter377).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7444,13 +7804,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; @@ -7474,14 +7838,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 _size378; + ::apache::thrift::protocol::TType _etype381; + iprot->readListBegin(_etype381, _size378); + (*(this->success)).resize(_size378); + uint32_t _i382; + for (_i382 = 0; _i382 < _size378; ++_i382) { - xfer += iprot->readString((*(this->success))[_i279]); + xfer += (*(this->success))[_i382].read(iprot); } iprot->readListEnd(); } @@ -7498,6 +7862,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; @@ -7510,7 +7882,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; @@ -7532,8 +7904,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); } @@ -7550,29 +7938,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; @@ -7592,33 +7992,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; - } else { + 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); } @@ -7635,36 +8020,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; @@ -7684,33 +8060,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); } @@ -7727,7 +8088,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; @@ -7748,17 +8109,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); } @@ -7775,35 +8136,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; @@ -7824,8 +8185,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); @@ -7839,22 +8200,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; @@ -7867,35 +8212,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; @@ -7916,8 +8253,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); @@ -7931,22 +8268,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; @@ -7959,7 +8280,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; @@ -7981,32 +8302,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); } @@ -8023,47 +8320,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->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_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_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; @@ -8083,18 +8362,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 _size383; + ::apache::thrift::protocol::TType _etype386; + iprot->readListBegin(_etype386, _size383); + this->success.resize(_size383); + uint32_t _i387; + for (_i387 = 0; _i387 < _size383; ++_i387) + { + xfer += iprot->readString(this->success[_i387]); + } + 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); } @@ -8111,27 +8402,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 _iter388; + for (_iter388 = this->success.begin(); _iter388 != this->success.end(); ++_iter388) + { + xfer += oprot->writeString((*_iter388)); + } + 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->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; @@ -8151,18 +8450,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 _size389; + ::apache::thrift::protocol::TType _etype392; + iprot->readListBegin(_etype392, _size389); + (*(this->success)).resize(_size389); + uint32_t _i393; + for (_i393 = 0; _i393 < _size389; ++_i393) + { + xfer += iprot->readString((*(this->success))[_i393]); + } + 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); } @@ -8179,7 +8490,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; @@ -8201,32 +8512,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); } @@ -8243,47 +8530,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; @@ -8304,8 +8573,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 _size394; + ::apache::thrift::protocol::TType _ktype395; + ::apache::thrift::protocol::TType _vtype396; + iprot->readMapBegin(_ktype395, _vtype396, _size394); + uint32_t _i398; + for (_i398 = 0; _i398 < _size394; ++_i398) + { + std::string _key399; + xfer += iprot->readString(_key399); + std::string& _val400 = this->success[_key399]; + xfer += iprot->readString(_val400); + } + iprot->readMapEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8319,14 +8603,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; @@ -8339,31 +8615,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 _iter401; + for (_iter401 = this->success.begin(); _iter401 != this->success.end(); ++_iter401) + { + xfer += oprot->writeString(_iter401->first); + xfer += oprot->writeString(_iter401->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; @@ -8384,8 +8665,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 _size402; + ::apache::thrift::protocol::TType _ktype403; + ::apache::thrift::protocol::TType _vtype404; + iprot->readMapBegin(_ktype403, _vtype404, _size402); + uint32_t _i406; + for (_i406 = 0; _i406 < _size402; ++_i406) + { + std::string _key407; + xfer += iprot->readString(_key407); + std::string& _val408 = (*(this->success))[_key407]; + xfer += iprot->readString(_val408); + } + iprot->readMapEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8399,14 +8695,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; @@ -8419,7 +8707,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; @@ -8440,25 +8728,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); } @@ -8475,41 +8755,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->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_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("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; @@ -8553,6 +8827,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; @@ -8565,11 +8847,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); @@ -8583,13 +8865,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; @@ -8633,6 +8919,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; @@ -8645,7 +8939,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; @@ -8667,24 +8961,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); } @@ -8701,41 +9003,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("base_tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->base_tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldBegin("idx_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->idx_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_indexes); + 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; @@ -8755,26 +9063,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); @@ -8803,25 +9091,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(); @@ -8835,7 +9111,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; @@ -8855,26 +9131,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); @@ -8903,7 +9159,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; @@ -8940,9 +9196,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); } @@ -8959,41 +9223,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; @@ -9014,20 +9284,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); @@ -9035,6 +9293,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 { @@ -9053,26 +9319,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(); } @@ -9081,7 +9343,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; @@ -9102,20 +9364,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); @@ -9123,6 +9373,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 { @@ -9141,32 +9399,3343 @@ 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; - ThriftHiveMetastore_create_database_pargs args; - args.database = &database; - args.write(oprot_); + xfer += iprot->readStructBegin(fname); - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} + using ::apache::thrift::protocol::TProtocolException; -void ThriftHiveMetastoreClient::recv_create_database() -{ - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; + 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 _size409; + ::apache::thrift::protocol::TType _etype412; + iprot->readListBegin(_etype412, _size409); + this->success.resize(_size409); + uint32_t _i413; + for (_i413 = 0; _i413 < _size409; ++_i413) + { + xfer += this->success[_i413].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 _iter414; + for (_iter414 = this->success.begin(); _iter414 != this->success.end(); ++_iter414) + { + xfer += (*_iter414).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 _size415; + ::apache::thrift::protocol::TType _etype418; + iprot->readListBegin(_etype418, _size415); + (*(this->success)).resize(_size415); + uint32_t _i419; + for (_i419 = 0; _i419 < _size415; ++_i419) + { + xfer += (*(this->success))[_i419].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 _size420; + ::apache::thrift::protocol::TType _etype423; + iprot->readListBegin(_etype423, _size420); + this->success.resize(_size420); + uint32_t _i424; + for (_i424 = 0; _i424 < _size420; ++_i424) + { + xfer += iprot->readString(this->success[_i424]); + } + 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 _iter425; + for (_iter425 = this->success.begin(); _iter425 != this->success.end(); ++_iter425) + { + xfer += oprot->writeString((*_iter425)); + } + 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 _size426; + ::apache::thrift::protocol::TType _etype429; + iprot->readListBegin(_etype429, _size426); + (*(this->success)).resize(_size426); + uint32_t _i430; + for (_i430 = 0; _i430 < _size426; ++_i430) + { + xfer += iprot->readString((*(this->success))[_i430]); + } + 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_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_STRUCT) { + xfer += this->role.read(iprot); + this->__isset.role = 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", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->role.write(oprot); + 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", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->role)).write(oprot); + 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; + 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->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->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_grant_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->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast431; + xfer += iprot->readI32(ecast431); + this->principal_type = (PrincipalType::type)ecast431; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast432; + xfer += iprot->readI32(ecast432); + this->grantorType = (PrincipalType::type)ecast432; + this->__isset.grantorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->grant_option); + this->__isset.grant_option = 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_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_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("principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->grantorType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->grant_option); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_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("principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->grantor))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)(*(this->grantorType))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool((*(this->grant_option))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_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_grant_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_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_grant_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_revoke_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->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast433; + xfer += iprot->readI32(ecast433); + this->principal_type = (PrincipalType::type)ecast433; + this->__isset.principal_type = 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_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_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("principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_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("principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_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_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_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_revoke_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_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_I32) { + int32_t ecast434; + xfer += iprot->readI32(ecast434); + this->principal_type = (PrincipalType::type)ecast434; + this->__isset.principal_type = 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("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->principal_type); + 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("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + 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 _size435; + ::apache::thrift::protocol::TType _etype438; + iprot->readListBegin(_etype438, _size435); + this->success.resize(_size435); + uint32_t _i439; + for (_i439 = 0; _i439 < _size435; ++_i439) + { + xfer += this->success[_i439].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 _iter440; + for (_iter440 = this->success.begin(); _iter440 != this->success.end(); ++_iter440) + { + xfer += (*_iter440).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 _size441; + ::apache::thrift::protocol::TType _etype444; + iprot->readListBegin(_etype444, _size441); + (*(this->success)).resize(_size441); + uint32_t _i445; + for (_i445 = 0; _i445 < _size441; ++_i445) + { + xfer += (*(this->success))[_i445].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_get_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_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = 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 _size446; + ::apache::thrift::protocol::TType _etype449; + iprot->readListBegin(_etype449, _size446); + this->group_names.resize(_size446); + uint32_t _i450; + for (_i450 = 0; _i450 < _size446; ++_i450) + { + xfer += iprot->readString(this->group_names[_i450]); + } + 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_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_args"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->hiveObject.write(oprot); + 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 _iter451; + for (_iter451 = this->group_names.begin(); _iter451 != this->group_names.end(); ++_iter451) + { + xfer += oprot->writeString((*_iter451)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->hiveObject)).write(oprot); + 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 _iter452; + for (_iter452 = (*(this->group_names)).begin(); _iter452 != (*(this->group_names)).end(); ++_iter452) + { + xfer += oprot->writeString((*_iter452)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_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_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_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_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_list_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->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast453; + xfer += iprot->readI32(ecast453); + this->principal_type = (PrincipalType::type)ecast453; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = 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_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->hiveObject.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->hiveObject)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_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_LIST) { + { + this->success.clear(); + uint32_t _size454; + ::apache::thrift::protocol::TType _etype457; + iprot->readListBegin(_etype457, _size454); + this->success.resize(_size454); + uint32_t _i458; + for (_i458 = 0; _i458 < _size454; ++_i458) + { + xfer += this->success[_i458].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_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_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 _iter459; + for (_iter459 = this->success.begin(); _iter459 != this->success.end(); ++_iter459) + { + xfer += (*_iter459).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_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_LIST) { + { + (*(this->success)).clear(); + uint32_t _size460; + ::apache::thrift::protocol::TType _etype463; + iprot->readListBegin(_etype463, _size460); + (*(this->success)).resize(_size460); + uint32_t _i464; + for (_i464 = 0; _i464 < _size460; ++_i464) + { + xfer += (*(this->success))[_i464].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_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_grant_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_args"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->privileges.write(oprot); + 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("privileges", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->privileges)).write(oprot); + 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_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("privileges", ::apache::thrift::protocol::T_STRUCT, 1); + 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("privileges", ::apache::thrift::protocol::T_STRUCT, 1); + 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; +} + +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; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +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::alter_database(const std::string& dbname, const Database& db) +{ + send_alter_database(dbname, db); + recv_alter_database(); +} + +void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_database_pargs args; + args.dbname = &dbname; + args.db = &db; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_alter_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("alter_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_alter_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; + } + return; +} + +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) { @@ -9182,13 +12751,82 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_database") != 0) { + 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_create_database_presult result; + 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(); @@ -9202,22 +12840,27 @@ if (result.__isset.o3) { throw result.o3; } + if (result.__isset.o4) { + throw result.o4; + } return; } -void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) +void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { - send_get_database(name); - recv_get_database(_return); + send_drop_table(dbname, name, deleteData); + recv_drop_table(); } -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_database_pargs args; + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; args.name = &name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9225,7 +12868,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +void ThriftHiveMetastoreClient::recv_drop_table() { int32_t rseqid = 0; @@ -9246,13 +12889,75 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_database") != 0) { + 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_get_database_presult result; + 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(); @@ -9265,26 +12970,86 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; + 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; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); + 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::drop_database(const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { - send_drop_database(name, deleteData); - recv_drop_database(); + send_get_table(dbname, tbl_name); + recv_get_table(_return); } -void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9292,7 +13057,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_drop_database() +void ThriftHiveMetastoreClient::recv_get_table(Table& _return) { int32_t rseqid = 0; @@ -9313,42 +13078,46 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_database") != 0) { + 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_drop_database_presult result; + 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; } - if (result.__isset.o3) { - throw result.o3; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); } -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { - send_get_databases(pattern); - recv_get_databases(_return); + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); } -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; + ThriftHiveMetastore_alter_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9356,7 +13125,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_table() { int32_t rseqid = 0; @@ -9377,40 +13146,39 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_databases") != 0) { + 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_get_databases_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_table_presult result; 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"); + if (result.__isset.o2) { + throw result.o2; + } + return; } -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) { - send_get_all_databases(); - recv_get_all_databases(_return); + send_add_partition(new_part); + recv_add_partition(_return); } -void ThriftHiveMetastoreClient::send_get_all_databases() +void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_databases_pargs args; + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9418,7 +13186,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) { int32_t rseqid = 0; @@ -9439,13 +13207,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_all_databases") != 0) { + 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_get_all_databases_presult result; + ThriftHiveMetastore_add_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9458,23 +13226,30 @@ 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; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db) +void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - send_alter_database(dbname, db); - recv_alter_database(); + send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return); } -void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) +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("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_database_pargs args; - args.dbname = &dbname; - args.db = &db; + 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(); @@ -9482,7 +13257,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_database() +void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) { int32_t rseqid = 0; @@ -9503,39 +13278,49 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_database") != 0) { + 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_alter_database_presult result; + 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; } - return; + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - send_get_type(name); - recv_get_type(_return); + send_append_partition_by_name(db_name, tbl_name, part_name); + recv_append_partition_by_name(_return); } -void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +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("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; + 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(); @@ -9543,7 +13328,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) { int32_t rseqid = 0; @@ -9564,13 +13349,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_type") != 0) { + 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_get_type_presult result; + ThriftHiveMetastore_append_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9586,22 +13371,28 @@ if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); + 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::create_type(const Type& type) +bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { - send_create_type(type); - return recv_create_type(); + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); } -void ThriftHiveMetastoreClient::send_create_type(const Type& type) +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("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; + 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(); @@ -9609,7 +13400,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_create_type() +bool ThriftHiveMetastoreClient::recv_drop_partition() { int32_t rseqid = 0; @@ -9630,14 +13421,14 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_type") != 0) { + 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_create_type_presult result; + ThriftHiveMetastore_drop_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9652,25 +13443,25 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +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_type(type); - return recv_drop_type(); + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); } -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +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_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; + 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(); @@ -9678,7 +13469,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_type() +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() { int32_t rseqid = 0; @@ -9699,14 +13490,14 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_type") != 0) { + 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_type_presult result; + ThriftHiveMetastore_drop_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9721,22 +13512,24 @@ 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, "drop_partition_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - send_get_type_all(name); - recv_get_type_all(_return); + send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return); } -void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +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_type_all", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_all_pargs args; - args.name = &name; + 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(); @@ -9744,7 +13537,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) { int32_t rseqid = 0; @@ -9765,13 +13558,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_type_all") != 0) { + 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_type_all_presult result; + ThriftHiveMetastore_get_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9781,26 +13574,32 @@ // _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_all failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); } -void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +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_fields(db_name, table_name); - recv_get_fields(_return); + 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_fields(const std::string& db_name, const std::string& table_name) +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_fields", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_fields_pargs args; + ThriftHiveMetastore_get_partition_with_auth_pargs args; args.db_name = &db_name; - args.table_name = &table_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(); @@ -9808,7 +13607,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) { int32_t rseqid = 0; @@ -9829,13 +13628,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_fields") != 0) { + 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_fields_presult result; + ThriftHiveMetastore_get_partition_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9851,26 +13650,24 @@ 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, "get_partition_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +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_schema(db_name, table_name); - recv_get_schema(_return); + send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_return); } -void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) +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_schema", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_schema_pargs args; + ThriftHiveMetastore_get_partition_by_name_pargs args; args.db_name = &db_name; - args.table_name = &table_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9878,7 +13675,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) { int32_t rseqid = 0; @@ -9899,13 +13696,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_schema") != 0) { + 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_schema_presult result; + ThriftHiveMetastore_get_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9921,25 +13718,24 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table(const Table& tbl) +void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_create_table(tbl); - recv_create_table(); + send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_return); } -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +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("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; + 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(); @@ -9947,7 +13743,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_create_table() +void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) { int32_t rseqid = 0; @@ -9968,47 +13764,48 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_table") != 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_table_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; - } - if (result.__isset.o4) { - throw result.o4; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +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_drop_table(dbname, name, deleteData); - recv_drop_table(); + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + recv_get_partitions_with_auth(_return); } -void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +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("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_table_pargs args; - args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; + 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(); @@ -10016,7 +13813,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_drop_table() +void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -10037,40 +13834,46 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_table") != 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_drop_table_presult result; + ThriftHiveMetastore_get_partitions_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.o3) { - throw result.o3; + if (result.__isset.o2) { + throw result.o2; } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_get_tables(db_name, pattern); - recv_get_tables(_return); + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return); } -void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +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("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_tables_pargs args; + ThriftHiveMetastore_get_partition_names_pargs args; args.db_name = &db_name; - args.pattern = &pattern; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10078,7 +13881,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) { int32_t rseqid = 0; @@ -10099,13 +13902,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_tables") != 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_get_tables_presult result; + ThriftHiveMetastore_get_partition_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10115,25 +13918,28 @@ // _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_tables failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +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_all_tables(db_name); - recv_get_all_tables(_return); + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return); } -void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) +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_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_tables_pargs args; + 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(); @@ -10141,7 +13947,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) { int32_t rseqid = 0; @@ -10162,13 +13968,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_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_all_tables_presult result; + ThriftHiveMetastore_get_partitions_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10181,23 +13987,27 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); } -void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +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_table(dbname, tbl_name); - recv_get_table(_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_table(const std::string& dbname, const std::string& tbl_name) +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_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; + 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(); @@ -10205,7 +14015,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_table(Table& _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -10226,13 +14036,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_table") != 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_table_presult result; + ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10248,24 +14058,25 @@ 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_partitions_ps_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +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_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_return); } -void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +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("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; + ThriftHiveMetastore_get_partition_names_ps_pargs args; + args.db_name = &db_name; args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10273,7 +14084,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_table() +void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) { int32_t rseqid = 0; @@ -10294,39 +14105,44 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_table") != 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_alter_table_presult result; + ThriftHiveMetastore_get_partition_names_ps_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_partition_names_ps failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +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_add_partition(new_part); - recv_add_partition(_return); + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_return); } -void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +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("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; + 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(); @@ -10334,7 +14150,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -10355,13 +14171,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("add_partition") != 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); } - ThriftHiveMetastore_add_partition_presult result; + ThriftHiveMetastore_get_partitions_by_filter_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10377,27 +14193,24 @@ 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_partitions_by_filter 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::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { - send_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return); + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); } -void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +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("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_pargs args; + ThriftHiveMetastore_alter_partition_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10405,7 +14218,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_alter_partition() { int32_t rseqid = 0; @@ -10426,49 +14239,40 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("append_partition") != 0) { + 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_append_partition_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_partition_presult result; 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"); + return; } -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_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return); + send_get_config_value(name, defaultValue); + recv_get_config_value(_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_config_value(const std::string& name, const std::string& defaultValue) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_config_value", ::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; + ThriftHiveMetastore_get_config_value_pargs args; + args.name = &name; + args.defaultValue = &defaultValue; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10476,7 +14280,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) { int32_t rseqid = 0; @@ -10497,13 +14301,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_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); } - ThriftHiveMetastore_append_partition_by_name_presult result; + ThriftHiveMetastore_get_config_value_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10513,34 +14317,25 @@ // _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; + if (result.__isset.o1) { + throw result.o1; } - 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_config_value 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::partition_name_to_vals(std::vector & _return, const std::string& part_name) { - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); + send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_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_partition_name_to_vals(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_vals", ::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; + ThriftHiveMetastore_partition_name_to_vals_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10548,7 +14343,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_partition() +void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) { int32_t rseqid = 0; @@ -10569,47 +14364,41 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_partition") != 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); } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; + ThriftHiveMetastore_partition_name_to_vals_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, "partition_name_to_vals 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) +void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) { - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); + send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return); } -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_partition_name_to_spec(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; + ThriftHiveMetastore_partition_name_to_spec_pargs args; args.part_name = &part_name; - args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10617,7 +14406,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) { int32_t rseqid = 0; @@ -10638,46 +14427,42 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_partition_by_name") != 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); } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_presult result; + ThriftHiveMetastore_partition_name_to_spec_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_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) { - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); + send_add_index(new_index, index_table); + recv_add_index(_return); } -void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_index", ::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; + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10685,7 +14470,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_add_index(Index& _return) { int32_t rseqid = 0; @@ -10706,13 +14491,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition") != 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_partition_presult result; + ThriftHiveMetastore_add_index_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10728,24 +14513,28 @@ if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index 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) +void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - send_get_partition_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_return); + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); } -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_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("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_index", ::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; + 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(); @@ -10753,7 +14542,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) +void ThriftHiveMetastoreClient::recv_alter_index() { int32_t rseqid = 0; @@ -10774,46 +14563,42 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition_by_name") != 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_get_partition_by_name_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_index_presult result; 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"); + return; } -void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +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_get_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_return); + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); } -void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +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("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_pargs args; + ThriftHiveMetastore_drop_index_by_name_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_parts = &max_parts; + args.index_name = &index_name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10821,7 +14606,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() { int32_t rseqid = 0; @@ -10842,21 +14627,21 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions") != 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_get_partitions_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 pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -10864,24 +14649,24 @@ 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, "drop_index_by_name 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::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); + send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_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_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_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_pargs args; + ThriftHiveMetastore_get_index_by_name_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_parts = &max_parts; + args.index_name = &index_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10889,7 +14674,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) { int32_t rseqid = 0; @@ -10910,13 +14695,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition_names") != 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_partition_names_presult result; + ThriftHiveMetastore_get_index_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10926,28 +14711,30 @@ // _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_names failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name 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::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return); + send_get_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_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_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_ps_pargs args; + ThriftHiveMetastore_get_indexes_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10955,7 +14742,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) { int32_t rseqid = 0; @@ -10976,13 +14763,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions_ps") != 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_partitions_ps_presult result; + ThriftHiveMetastore_get_indexes_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10995,25 +14782,27 @@ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps 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_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::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_return); + send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_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_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_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_ps_pargs args; + ThriftHiveMetastore_get_index_names_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11021,7 +14810,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) { int32_t rseqid = 0; @@ -11042,13 +14831,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("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_partition_names_ps_presult result; + ThriftHiveMetastore_get_index_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -11058,28 +14847,25 @@ // _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_names_ps failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names 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) +bool ThriftHiveMetastoreClient::create_role(const Role& role) { - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return); + send_create_role(role); + return recv_create_role(); } -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_create_role(const Role& role) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_role", ::apache::thrift::protocol::T_CALL, cseqid); - 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; + ThriftHiveMetastore_create_role_pargs args; + args.role = &role; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11087,7 +14873,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_create_role() { int32_t rseqid = 0; @@ -11108,46 +14894,41 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions_by_filter") != 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); } - ThriftHiveMetastore_get_partitions_by_filter_presult result; + bool _return; + ThriftHiveMetastore_create_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_partitions_by_filter failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_role 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(); +bool ThriftHiveMetastoreClient::drop_role(const std::string& role_name) +{ + send_drop_role(role_name); + return recv_drop_role(); } -void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +void ThriftHiveMetastoreClient::send_drop_role(const std::string& role_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_role", ::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; + ThriftHiveMetastore_drop_role_pargs args; + args.role_name = &role_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11155,7 +14936,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_partition() +bool ThriftHiveMetastoreClient::recv_drop_role() { int32_t rseqid = 0; @@ -11176,40 +14957,46 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_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_alter_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 _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, "drop_role failed: unknown result"); } -void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +bool ThriftHiveMetastoreClient::grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option) { - send_get_config_value(name, defaultValue); - recv_get_config_value(_return); + send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); + return recv_grant_role(); } -void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::send_grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; + ThriftHiveMetastore_grant_role_pargs args; + args.role_name = &role_name; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.grantor = &grantor; + args.grantorType = &grantorType; + args.grant_option = &grant_option; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11217,7 +15004,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) +bool ThriftHiveMetastoreClient::recv_grant_role() { int32_t rseqid = 0; @@ -11238,41 +15025,43 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_config_value") != 0) { + if (fname.compare("grant_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_config_value_presult result; + bool _return; + ThriftHiveMetastore_grant_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; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_role failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +bool ThriftHiveMetastoreClient::revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) { - send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return); + send_revoke_role(role_name, principal_name, principal_type); + return recv_revoke_role(); } -void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) +void ThriftHiveMetastoreClient::send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_revoke_role_pargs args; + args.role_name = &role_name; + args.principal_name = &principal_name; + args.principal_type = &principal_type; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11280,7 +15069,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_revoke_role() { int32_t rseqid = 0; @@ -11301,41 +15090,42 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("partition_name_to_vals") != 0) { + if (fname.compare("revoke_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_partition_name_to_vals_presult result; + bool _return; + ThriftHiveMetastore_revoke_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; } - 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, "revoke_role failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +void ThriftHiveMetastoreClient::list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) { - send_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_return); + send_list_roles(principal_name, principal_type); + recv_list_roles(_return); } -void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) +void ThriftHiveMetastoreClient::send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_list_roles_pargs args; + args.principal_name = &principal_name; + args.principal_type = &principal_type; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11343,7 +15133,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) +void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return) { int32_t rseqid = 0; @@ -11364,13 +15154,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("partition_name_to_spec") != 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_partition_name_to_spec_presult result; + ThriftHiveMetastore_list_roles_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -11383,23 +15173,24 @@ 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, "list_roles failed: unknown result"); } -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +void ThriftHiveMetastoreClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) { - send_add_index(new_index, index_table); - recv_add_index(_return); + send_get_privilege_set(hiveObject, user_name, group_names); + recv_get_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; + ThriftHiveMetastore_get_privilege_set_pargs args; + args.hiveObject = &hiveObject; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11407,7 +15198,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_add_index(Index& _return) +void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -11428,13 +15219,13 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("add_index") != 0) { + if (fname.compare("get_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_index_presult result; + ThriftHiveMetastore_get_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -11447,31 +15238,24 @@ 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_index failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +void ThriftHiveMetastoreClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) { - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); + send_list_privileges(principal_name, principal_type, hiveObject); + recv_list_privileges(_return); } -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 ThriftHiveMetastoreClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - 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; + ThriftHiveMetastore_list_privileges_pargs args; + args.principal_name = &principal_name; + args.principal_type = &principal_type; + args.hiveObject = &hiveObject; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11479,7 +15263,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_index() +void ThriftHiveMetastoreClient::recv_list_privileges(std::vector & _return) { int32_t rseqid = 0; @@ -11500,42 +15284,41 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_index") != 0) { + if (fname.compare("list_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_alter_index_presult result; + ThriftHiveMetastore_list_privileges_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_privileges failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +bool ThriftHiveMetastoreClient::grant_privileges(const PrivilegeBag& privileges) { - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); + send_grant_privileges(privileges); + return recv_grant_privileges(); } -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 ThriftHiveMetastoreClient::send_grant_privileges(const PrivilegeBag& privileges) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - 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; + ThriftHiveMetastore_grant_privileges_pargs args; + args.privileges = &privileges; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11543,7 +15326,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_index_by_name() +bool ThriftHiveMetastoreClient::recv_grant_privileges() { int32_t rseqid = 0; @@ -11564,14 +15347,14 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_index_by_name") != 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); } bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; + ThriftHiveMetastore_grant_privileges_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -11583,27 +15366,22 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +bool ThriftHiveMetastoreClient::revoke_privileges(const PrivilegeBag& privileges) { - send_get_index_by_name(db_name, tbl_name, index_name); - recv_get_index_by_name(_return); + send_revoke_privileges(privileges); + return recv_revoke_privileges(); } -void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privileges) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; + ThriftHiveMetastore_revoke_privileges_pargs args; + args.privileges = &privileges; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11611,7 +15389,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) +bool ThriftHiveMetastoreClient::recv_revoke_privileges() { int32_t rseqid = 0; @@ -11632,222 +15410,424 @@ iprot_->getTransport()->readEnd(); throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_index_by_name") != 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_get_index_by_name_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; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_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; + } + + 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); + } + (this->*(pfn->second))(seqid, iprot, oprot); + return true; +} + +void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + 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; } - 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_database", ::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_databases(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_databases_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_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_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("get_databases", ::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_databases(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_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_indexes_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ThriftHiveMetastore_get_all_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + 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; } - 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_all_databases", ::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_database(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_database_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_database_result result; + try { + iface_->alter_database(args.dbname, args.db); + } 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("alter_database", ::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_database", ::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_get_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_get_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("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_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; } - ThriftHiveMetastore_get_index_names_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_type", ::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) +{ + ThriftHiveMetastore_create_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + 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; } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names 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; + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} - iprot->readMessageBegin(fname, mtype, seqid); +void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_drop_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - 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); + 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 true; + return; } - return process_fn(iprot, oprot, fname, seqid); + oprot->writeMessageBegin("drop_type", ::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_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_type_all_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + 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; } - (this->*(pfn->second))(seqid, iprot, oprot); - return true; + + oprot->writeMessageBegin("get_type_all", ::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_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_database_args args; + ThriftHiveMetastore_get_fields_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_database_result result; + ThriftHiveMetastore_get_fields_result result; try { - iface_->create_database(args.database); - } catch (AlreadyExistsException &o1) { + 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 (InvalidObjectException &o2) { + } catch (UnknownTableException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { + } catch (UnknownDBException &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("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11855,33 +15835,36 @@ return; } - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_fields", ::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_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_database_args args; + ThriftHiveMetastore_get_schema_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_database_result result; + ThriftHiveMetastore_get_schema_result result; try { - iface_->get_database(result.success, args.name); + iface_->get_schema(result.success, args.db_name, args.table_name); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } 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_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11889,35 +15872,38 @@ return; } - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_schema", ::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_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_database_args args; + ThriftHiveMetastore_create_table_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_database_result result; + ThriftHiveMetastore_create_table_result result; try { - iface_->drop_database(args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + iface_->create_table(args.tbl); + } catch (AlreadyExistsException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } 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("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11925,30 +15911,63 @@ return; } - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_table", ::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_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_databases_args args; + ThriftHiveMetastore_drop_table_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_databases_result result; + ThriftHiveMetastore_drop_table_result result; try { - iface_->get_databases(result.success, args.pattern); + 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; + } + + oprot->writeMessageBegin("drop_table", ::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) +{ + ThriftHiveMetastore_get_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + 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_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11956,30 +15975,30 @@ return; } - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_tables", ::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_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_all_databases_args args; + ThriftHiveMetastore_get_all_tables_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_all_databases_result result; + ThriftHiveMetastore_get_all_tables_result result; try { - iface_->get_all_databases(result.success); + 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_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11987,23 +16006,24 @@ return; } - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); + 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_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_alter_database_args args; + ThriftHiveMetastore_get_table_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_database_result result; + ThriftHiveMetastore_get_table_result result; try { - iface_->alter_database(args.dbname, args.db); + iface_->get_table(result.success, args.dbname, args.tbl_name); + result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; @@ -12012,7 +16032,7 @@ result.__isset.o2 = true; } catch (const std::exception& e) { ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12020,33 +16040,69 @@ return; } - oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table", ::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) +{ + ThriftHiveMetastore_alter_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + 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->writeMessageBegin("alter_table", ::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_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_type_args args; + ThriftHiveMetastore_add_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_type_result result; + ThriftHiveMetastore_add_partition_result result; try { - iface_->get_type(result.success, args.name); + iface_->add_partition(result.success, args.new_part); 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_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12054,28 +16110,28 @@ return; } - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partition", ::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_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_type_args args; + ThriftHiveMetastore_append_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_type_result result; + ThriftHiveMetastore_append_partition_result result; try { - result.success = iface_->create_type(args.type); + iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; - } catch (AlreadyExistsException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (MetaException &o3) { @@ -12083,7 +16139,7 @@ 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("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12091,33 +16147,36 @@ return; } - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition", ::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_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_type_args args; + ThriftHiveMetastore_append_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_type_result result; + ThriftHiveMetastore_append_partition_by_name_result result; try { - result.success = iface_->drop_type(args.type); + iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); 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("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12125,30 +16184,33 @@ return; } - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition_by_name", ::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_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_type_all_args args; + ThriftHiveMetastore_drop_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_type_all_result result; + ThriftHiveMetastore_drop_partition_result result; try { - iface_->get_type_all(result.success, args.name); + 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("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12156,36 +16218,33 @@ return; } - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition", ::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_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_fields_args args; + ThriftHiveMetastore_drop_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_fields_result result; + ThriftHiveMetastore_drop_partition_by_name_result result; try { - iface_->get_fields(result.success, args.db_name, args.table_name); + result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { + } catch (MetaException &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("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12193,36 +16252,33 @@ return; } - oprot->writeMessageBegin("get_fields", ::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_schema(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_schema_args args; + ThriftHiveMetastore_get_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_schema_result result; + ThriftHiveMetastore_get_partition_result result; try { - iface_->get_schema(result.success, args.db_name, args.table_name); + iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); 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_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12230,38 +16286,33 @@ return; } - oprot->writeMessageBegin("get_schema", ::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_create_table(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_create_table_args args; + ThriftHiveMetastore_get_partition_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_table_result result; + ThriftHiveMetastore_get_partition_with_auth_result result; try { - iface_->create_table(args.tbl); - } catch (AlreadyExistsException &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 (InvalidObjectException &o2) { + } catch (NoSuchObjectException &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("get_partition_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12269,32 +16320,33 @@ return; } - oprot->writeMessageBegin("create_table", ::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_drop_table(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_drop_table_args args; + ThriftHiveMetastore_get_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_table_result result; + ThriftHiveMetastore_get_partition_by_name_result result; try { - iface_->drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + 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 (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = 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_table", ::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(); @@ -12302,30 +16354,33 @@ return; } - oprot->writeMessageBegin("drop_table", ::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_tables(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_tables_args args; + ThriftHiveMetastore_get_partitions_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_tables_result result; + ThriftHiveMetastore_get_partitions_result result; try { - iface_->get_tables(result.success, args.db_name, args.pattern); + 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_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12333,30 +16388,33 @@ return; } - oprot->writeMessageBegin("get_tables", ::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_all_tables(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_all_tables_args args; + ThriftHiveMetastore_get_partitions_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_all_tables_result result; + ThriftHiveMetastore_get_partitions_with_auth_result result; try { - iface_->get_all_tables(result.success, args.db_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 (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = 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("get_partitions_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12364,33 +16422,30 @@ return; } - oprot->writeMessageBegin("get_all_tables", ::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_get_table(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_get_table_args args; + ThriftHiveMetastore_get_partition_names_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_table_result result; + ThriftHiveMetastore_get_partition_names_result result; try { - iface_->get_table(result.success, args.dbname, args.tbl_name); + iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; - } catch (MetaException &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_table", ::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(); @@ -12398,32 +16453,30 @@ return; } - oprot->writeMessageBegin("get_table", ::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_alter_table(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_alter_table_args args; + ThriftHiveMetastore_get_partitions_ps_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_table_result result; + ThriftHiveMetastore_get_partitions_ps_result result; try { - iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException &o1) { + 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 (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); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12431,36 +16484,33 @@ return; } - oprot->writeMessageBegin("alter_table", ::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_add_partition(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_add_partition_args args; + ThriftHiveMetastore_get_partitions_ps_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_add_partition_result result; + ThriftHiveMetastore_get_partitions_ps_with_auth_result result; try { - iface_->add_partition(result.success, args.new_part); + 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 (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("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12468,36 +16518,30 @@ return; } - oprot->writeMessageBegin("add_partition", ::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_append_partition(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_append_partition_args args; + ThriftHiveMetastore_get_partition_names_ps_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_append_partition_result result; + ThriftHiveMetastore_get_partition_names_ps_result result; try { - iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); 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("append_partition", ::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(); @@ -12505,36 +16549,33 @@ return; } - oprot->writeMessageBegin("append_partition", ::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_append_partition_by_name(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_append_partition_by_name_args args; + ThriftHiveMetastore_get_partitions_by_filter_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_append_partition_by_name_result result; + ThriftHiveMetastore_get_partitions_by_filter_result result; try { - iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); 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 (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = 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_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12542,25 +16583,24 @@ return; } - oprot->writeMessageBegin("append_partition_by_name", ::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_drop_partition(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_drop_partition_args args; + ThriftHiveMetastore_alter_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_partition_result result; + ThriftHiveMetastore_alter_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) { + iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (MetaException &o2) { @@ -12568,7 +16608,7 @@ 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("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12576,33 +16616,30 @@ return; } - oprot->writeMessageBegin("drop_partition", ::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_partition_by_name(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_partition_by_name_args args; + ThriftHiveMetastore_get_config_value_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_partition_by_name_result result; + ThriftHiveMetastore_get_config_value_result result; try { - result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + iface_->get_config_value(result.success, args.name, args.defaultValue); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (ConfigValSecurityException &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_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12610,33 +16647,30 @@ return; } - oprot->writeMessageBegin("drop_partition_by_name", ::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_partition(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_partition_args args; + ThriftHiveMetastore_partition_name_to_vals_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_result result; + ThriftHiveMetastore_partition_name_to_vals_result result; try { - iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + 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 (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("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12644,33 +16678,30 @@ return; } - oprot->writeMessageBegin("get_partition", ::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_partition_by_name(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_partition_by_name_args args; + ThriftHiveMetastore_partition_name_to_spec_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_by_name_result result; + ThriftHiveMetastore_partition_name_to_spec_result result; try { - iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_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 (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("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12678,33 +16709,36 @@ return; } - oprot->writeMessageBegin("get_partition_by_name", ::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_partitions(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_partitions_args args; + ThriftHiveMetastore_add_index_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_result result; + ThriftHiveMetastore_add_index_result result; try { - iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); + iface_->add_index(result.success, args.new_index, args.index_table); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &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_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12712,30 +16746,32 @@ return; } - oprot->writeMessageBegin("get_partitions", ::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_get_partition_names(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_get_partition_names_args args; + ThriftHiveMetastore_alter_index_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_names_result result; + ThriftHiveMetastore_alter_index_result result; try { - iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); - result.__isset.success = true; + 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; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = 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("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12743,30 +16779,33 @@ return; } - oprot->writeMessageBegin("get_partition_names", ::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_get_partitions_ps(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_get_partitions_ps_args args; + ThriftHiveMetastore_drop_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_ps_result result; + ThriftHiveMetastore_drop_index_by_name_result result; try { - iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); 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_partitions_ps", ::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(); @@ -12774,30 +16813,33 @@ return; } - oprot->writeMessageBegin("get_partitions_ps", ::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_get_partition_names_ps(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_get_partition_names_ps_args args; + ThriftHiveMetastore_get_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_names_ps_result result; + ThriftHiveMetastore_get_index_by_name_result result; try { - iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_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_partition_names_ps", ::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(); @@ -12805,33 +16847,33 @@ return; } - oprot->writeMessageBegin("get_partition_names_ps", ::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_get_partitions_by_filter(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_get_partitions_by_filter_args args; + ThriftHiveMetastore_get_indexes_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_by_filter_result result; + ThriftHiveMetastore_get_indexes_result result; try { - iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); + iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); 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_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12839,32 +16881,30 @@ return; } - oprot->writeMessageBegin("get_partitions_by_filter", ::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_alter_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_alter_partition_args args; + ThriftHiveMetastore_get_index_names_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_partition_result result; + ThriftHiveMetastore_get_index_names_result result; try { - iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException &o1) { - result.o1 = o1; - result.__isset.o1 = true; + iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); + 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("alter_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(); @@ -12872,30 +16912,30 @@ return; } - oprot->writeMessageBegin("alter_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_get_config_value(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_config_value_args args; + ThriftHiveMetastore_create_role_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_config_value_result result; + ThriftHiveMetastore_create_role_result result; try { - iface_->get_config_value(result.success, args.name, args.defaultValue); + result.success = iface_->create_role(args.role); 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("create_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12903,30 +16943,30 @@ return; } - oprot->writeMessageBegin("get_config_value", ::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_partition_name_to_vals(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_partition_name_to_vals_args args; + ThriftHiveMetastore_drop_role_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_partition_name_to_vals_result result; + ThriftHiveMetastore_drop_role_result result; try { - iface_->partition_name_to_vals(result.success, args.part_name); + result.success = iface_->drop_role(args.role_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_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12934,30 +16974,30 @@ return; } - oprot->writeMessageBegin("partition_name_to_vals", ::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_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_grant_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_partition_name_to_spec_args args; + ThriftHiveMetastore_grant_role_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_partition_name_to_spec_result result; + ThriftHiveMetastore_grant_role_result result; try { - iface_->partition_name_to_spec(result.success, args.part_name); + result.success = iface_->grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option); 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("grant_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12965,36 +17005,30 @@ return; } - oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("grant_role", ::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_revoke_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_add_index_args args; + ThriftHiveMetastore_revoke_role_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_add_index_result result; + ThriftHiveMetastore_revoke_role_result result; try { - iface_->add_index(result.success, args.new_index, args.index_table); + result.success = iface_->revoke_role(args.role_name, args.principal_name, args.principal_type); 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("revoke_role", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -13002,32 +17036,30 @@ return; } - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("revoke_role", ::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_roles(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_alter_index_args args; + ThriftHiveMetastore_list_roles_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_index_result result; + ThriftHiveMetastore_list_roles_result result; try { - iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException &o1) { + iface_->list_roles(result.success, args.principal_name, args.principal_type); + 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_roles", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -13035,33 +17067,30 @@ return; } - oprot->writeMessageBegin("alter_index", ::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_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_index_by_name_args args; + ThriftHiveMetastore_get_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_index_by_name_result result; + ThriftHiveMetastore_get_privilege_set_result result; try { - result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + iface_->get_privilege_set(result.success, args.hiveObject, 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_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -13069,33 +17098,30 @@ return; } - oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_privilege_set", ::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_list_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_index_by_name_args args; + ThriftHiveMetastore_list_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_by_name_result result; + ThriftHiveMetastore_list_privileges_result result; try { - iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); + iface_->list_privileges(result.success, args.principal_name, args.principal_type, args.hiveObject); 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("list_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -13103,33 +17129,30 @@ return; } - oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_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_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_indexes_args args; + ThriftHiveMetastore_grant_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_indexes_result result; + ThriftHiveMetastore_grant_privileges_result result; try { - iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->grant_privileges(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("grant_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -13137,30 +17160,30 @@ return; } - oprot->writeMessageBegin("get_indexes", ::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_index_names(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_index_names_args args; + ThriftHiveMetastore_revoke_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_names_result result; + ThriftHiveMetastore_revoke_privileges_result result; try { - iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->revoke_privileges(args.privileges); 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_privileges", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -13168,7 +17191,7 @@ return; } - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("revoke_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 1057802) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -39,10 +39,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; @@ -55,6 +58,15 @@ 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 bool create_role(const Role& role) = 0; + virtual bool drop_role(const std::string& role_name) = 0; + virtual bool grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option) = 0; + virtual bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) = 0; + virtual void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) = 0; + virtual void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) = 0; + virtual void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) = 0; + virtual bool grant_privileges(const PrivilegeBag& privileges) = 0; + virtual bool revoke_privileges(const PrivilegeBag& privileges) = 0; }; class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull { @@ -136,18 +148,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; } @@ -185,6 +206,39 @@ void get_index_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_indexes */) { return; } + bool create_role(const Role& /* role */) { + bool _return = false; + return _return; + } + bool drop_role(const std::string& /* role_name */) { + bool _return = false; + return _return; + } + bool grant_role(const std::string& /* role_name */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */, const std::string& /* grantor */, const PrincipalType::type /* grantorType */, const bool /* grant_option */) { + bool _return = false; + return _return; + } + bool revoke_role(const std::string& /* role_name */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */) { + bool _return = false; + return _return; + } + void list_roles(std::vector & /* _return */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */) { + return; + } + void get_privilege_set(PrincipalPrivilegeSet& /* _return */, const HiveObjectRef& /* hiveObject */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void list_privileges(std::vector & /* _return */, const std::string& /* principal_name */, const PrincipalType::type /* principal_type */, const HiveObjectRef& /* hiveObject */) { + return; + } + bool grant_privileges(const PrivilegeBag& /* privileges */) { + bool _return = false; + return _return; + } + bool revoke_privileges(const PrivilegeBag& /* privileges */) { + bool _return = false; + return _return; + } }; typedef struct _ThriftHiveMetastore_create_database_args__isset { @@ -2969,6 +3023,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; @@ -3213,6 +3399,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; @@ -3450,30 +3768,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; @@ -3483,13 +3805,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; @@ -3497,61 +3823,190 @@ }; -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_partition_names_ps_result__isset { - _ThriftHiveMetastore_get_partition_names_ps_result__isset() : success(false), o1(false) {} +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; -} _ThriftHiveMetastore_get_partition_names_ps_result__isset; + bool o2; +} _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset; -class ThriftHiveMetastore_get_partition_names_ps_result { +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { public: - ThriftHiveMetastore_get_partition_names_ps_result() { + ThriftHiveMetastore_get_partitions_ps_with_auth_result() { } - virtual ~ThriftHiveMetastore_get_partition_names_ps_result() throw() {} + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_result() throw() {} - std::vector success; - MetaException o1; + std::vector success; + NoSuchObjectException o1; + MetaException o2; - _ThriftHiveMetastore_get_partition_names_ps_result__isset __isset; + _ThriftHiveMetastore_get_partitions_ps_with_auth_result__isset __isset; - bool operator == (const ThriftHiveMetastore_get_partition_names_ps_result & rhs) const + 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_partition_names_ps_result &rhs) const { + bool operator != (const ThriftHiveMetastore_get_partitions_ps_with_auth_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_get_partition_names_ps_result & ) const; + 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_partition_names_ps_presult__isset { - _ThriftHiveMetastore_get_partition_names_ps_presult__isset() : success(false), o1(false) {} +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; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_names_ps_result__isset { + _ThriftHiveMetastore_get_partition_names_ps_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_partition_names_ps_result__isset; + +class ThriftHiveMetastore_get_partition_names_ps_result { + public: + + ThriftHiveMetastore_get_partition_names_ps_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_names_ps_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_partition_names_ps_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_names_ps_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_names_ps_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_names_ps_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_names_ps_presult__isset { + _ThriftHiveMetastore_get_partition_names_ps_presult__isset() : success(false), o1(false) {} bool success; bool o1; } _ThriftHiveMetastore_get_partition_names_ps_presult__isset; @@ -4868,17 +5323,1031 @@ }; -class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { +typedef struct _ThriftHiveMetastore_create_role_args__isset { + _ThriftHiveMetastore_create_role_args__isset() : role(false) {} + bool role; +} _ThriftHiveMetastore_create_role_args__isset; + +class ThriftHiveMetastore_create_role_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_create_role_args() { } - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { - return poprot_; + + virtual ~ThriftHiveMetastore_create_role_args() throw() {} + + Role role; + + _ThriftHiveMetastore_create_role_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + { + if (!(role == rhs.role)) + 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 Role* role; + + 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) {} + bool role_name; +} _ThriftHiveMetastore_drop_role_args__isset; + +class ThriftHiveMetastore_drop_role_args { + public: + + ThriftHiveMetastore_drop_role_args() : role_name("") { + } + + virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + + std::string role_name; + + _ThriftHiveMetastore_drop_role_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + { + if (!(role_name == rhs.role_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; + + 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_grant_role_args__isset { + _ThriftHiveMetastore_grant_role_args__isset() : role_name(false), principal_name(false), principal_type(false), grantor(false), grantorType(false), grant_option(false) {} + bool role_name; + bool principal_name; + bool principal_type; + bool grantor; + bool grantorType; + bool grant_option; +} _ThriftHiveMetastore_grant_role_args__isset; + +class ThriftHiveMetastore_grant_role_args { + public: + + ThriftHiveMetastore_grant_role_args() : role_name(""), principal_name(""), grantor(""), grant_option(0) { + } + + virtual ~ThriftHiveMetastore_grant_role_args() throw() {} + + std::string role_name; + std::string principal_name; + PrincipalType::type principal_type; + std::string grantor; + PrincipalType::type grantorType; + bool grant_option; + + _ThriftHiveMetastore_grant_role_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_grant_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(grantorType == rhs.grantorType)) + return false; + if (!(grant_option == rhs.grant_option)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_grant_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_role_pargs() throw() {} + + const std::string* role_name; + const std::string* principal_name; + const PrincipalType::type* principal_type; + const std::string* grantor; + const PrincipalType::type* grantorType; + const bool* grant_option; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_role_result__isset { + _ThriftHiveMetastore_grant_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_grant_role_result__isset; + +class ThriftHiveMetastore_grant_role_result { + public: + + ThriftHiveMetastore_grant_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_grant_role_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_grant_role_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_grant_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_grant_role_presult__isset { + _ThriftHiveMetastore_grant_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_grant_role_presult__isset; + +class ThriftHiveMetastore_grant_role_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_role_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_grant_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_revoke_role_args__isset { + _ThriftHiveMetastore_revoke_role_args__isset() : role_name(false), principal_name(false), principal_type(false) {} + bool role_name; + bool principal_name; + bool principal_type; +} _ThriftHiveMetastore_revoke_role_args__isset; + +class ThriftHiveMetastore_revoke_role_args { + public: + + ThriftHiveMetastore_revoke_role_args() : role_name(""), principal_name("") { + } + + virtual ~ThriftHiveMetastore_revoke_role_args() throw() {} + + std::string role_name; + std::string principal_name; + PrincipalType::type principal_type; + + _ThriftHiveMetastore_revoke_role_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_revoke_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_revoke_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_revoke_role_pargs() throw() {} + + const std::string* role_name; + const std::string* principal_name; + const PrincipalType::type* principal_type; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_role_result__isset { + _ThriftHiveMetastore_revoke_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_revoke_role_result__isset; + +class ThriftHiveMetastore_revoke_role_result { + public: + + ThriftHiveMetastore_revoke_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_revoke_role_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_revoke_role_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_revoke_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_revoke_role_presult__isset { + _ThriftHiveMetastore_revoke_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_revoke_role_presult__isset; + +class ThriftHiveMetastore_revoke_role_presult { + public: + + + virtual ~ThriftHiveMetastore_revoke_role_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_revoke_role_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), principal_type(false) {} + bool principal_name; + bool principal_type; +} _ThriftHiveMetastore_list_roles_args__isset; + +class ThriftHiveMetastore_list_roles_args { + public: + + ThriftHiveMetastore_list_roles_args() : principal_name("") { + } + + virtual ~ThriftHiveMetastore_list_roles_args() throw() {} + + std::string principal_name; + PrincipalType::type principal_type; + + _ThriftHiveMetastore_list_roles_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_roles_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + 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 PrincipalType::type* principal_type; + + 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_get_privilege_set_args__isset { + _ThriftHiveMetastore_get_privilege_set_args__isset() : hiveObject(false), user_name(false), group_names(false) {} + bool hiveObject; + bool user_name; + bool group_names; +} _ThriftHiveMetastore_get_privilege_set_args__isset; + +class ThriftHiveMetastore_get_privilege_set_args { + public: + + ThriftHiveMetastore_get_privilege_set_args() : user_name("") { + } + + virtual ~ThriftHiveMetastore_get_privilege_set_args() throw() {} + + HiveObjectRef hiveObject; + std::string user_name; + std::vector group_names; + + _ThriftHiveMetastore_get_privilege_set_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_privilege_set_args & rhs) const + { + if (!(hiveObject == rhs.hiveObject)) + 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_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_privilege_set_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_privilege_set_pargs() throw() {} + + const HiveObjectRef* hiveObject; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_privilege_set_result__isset { + _ThriftHiveMetastore_get_privilege_set_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_privilege_set_result__isset; + +class ThriftHiveMetastore_get_privilege_set_result { + public: + + ThriftHiveMetastore_get_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + _ThriftHiveMetastore_get_privilege_set_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_get_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_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_privilege_set_presult__isset { + _ThriftHiveMetastore_get_privilege_set_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_privilege_set_presult__isset; + +class ThriftHiveMetastore_get_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + _ThriftHiveMetastore_get_privilege_set_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_list_privileges_args__isset { + _ThriftHiveMetastore_list_privileges_args__isset() : principal_name(false), principal_type(false), hiveObject(false) {} + bool principal_name; + bool principal_type; + bool hiveObject; +} _ThriftHiveMetastore_list_privileges_args__isset; + +class ThriftHiveMetastore_list_privileges_args { + public: + + ThriftHiveMetastore_list_privileges_args() : principal_name("") { + } + + virtual ~ThriftHiveMetastore_list_privileges_args() throw() {} + + std::string principal_name; + PrincipalType::type principal_type; + HiveObjectRef hiveObject; + + _ThriftHiveMetastore_list_privileges_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_privileges_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(principal_type == rhs.principal_type)) + return false; + if (!(hiveObject == rhs.hiveObject)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_privileges_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_list_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_privileges_pargs() throw() {} + + const std::string* principal_name; + const PrincipalType::type* principal_type; + const HiveObjectRef* hiveObject; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_privileges_result__isset { + _ThriftHiveMetastore_list_privileges_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_privileges_result__isset; + +class ThriftHiveMetastore_list_privileges_result { + public: + + ThriftHiveMetastore_list_privileges_result() { + } + + virtual ~ThriftHiveMetastore_list_privileges_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_list_privileges_result__isset __isset; + + bool operator == (const ThriftHiveMetastore_list_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_privileges_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_list_privileges_presult__isset { + _ThriftHiveMetastore_list_privileges_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_list_privileges_presult__isset; + +class ThriftHiveMetastore_list_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_list_privileges_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_list_privileges_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_grant_privileges_args__isset { + _ThriftHiveMetastore_grant_privileges_args__isset() : privileges(false) {} + bool privileges; +} _ThriftHiveMetastore_grant_privileges_args__isset; + +class ThriftHiveMetastore_grant_privileges_args { + public: + + ThriftHiveMetastore_grant_privileges_args() { + } + + virtual ~ThriftHiveMetastore_grant_privileges_args() throw() {} + + PrivilegeBag privileges; + + _ThriftHiveMetastore_grant_privileges_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_grant_privileges_args & rhs) const + { + if (!(privileges == rhs.privileges)) + 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 PrivilegeBag* privileges; + + 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() : privileges(false) {} + bool privileges; +} _ThriftHiveMetastore_revoke_privileges_args__isset; + +class ThriftHiveMetastore_revoke_privileges_args { + public: + + ThriftHiveMetastore_revoke_privileges_args() { + } + + virtual ~ThriftHiveMetastore_revoke_privileges_args() throw() {} + + PrivilegeBag privileges; + + _ThriftHiveMetastore_revoke_privileges_args__isset __isset; + + bool operator == (const ThriftHiveMetastore_revoke_privileges_args & rhs) const + { + 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 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); + +}; + +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); @@ -4952,18 +6421,27 @@ 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); @@ -5000,6 +6478,33 @@ 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 create_role(const Role& role); + void send_create_role(const Role& role); + bool recv_create_role(); + bool drop_role(const std::string& role_name); + void send_drop_role(const std::string& role_name); + bool recv_drop_role(); + bool grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option); + void send_grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option); + bool recv_grant_role(); + bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); + void send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type); + bool recv_revoke_role(); + void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type); + void send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type); + void recv_list_roles(std::vector & _return); + void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); + void send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names); + void recv_get_privilege_set(PrincipalPrivilegeSet& _return); + void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); + void send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject); + void recv_list_privileges(std::vector & _return); + bool grant_privileges(const PrivilegeBag& privileges); + void send_grant_privileges(const PrivilegeBag& privileges); + bool recv_grant_privileges(); + bool revoke_privileges(const PrivilegeBag& privileges); + void send_revoke_privileges(const PrivilegeBag& privileges); + bool recv_revoke_privileges(); }; class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor { @@ -5032,10 +6537,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); @@ -5048,6 +6556,15 @@ 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_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_grant_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_revoke_role(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_get_privilege_set(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_list_privileges(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); public: ThriftHiveMetastoreProcessor(boost::shared_ptr iface) : facebook::fb303::FacebookServiceProcessor(iface), @@ -5076,10 +6593,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; @@ -5092,6 +6612,15 @@ 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_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role; + processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role; + processMap_["grant_role"] = &ThriftHiveMetastoreProcessor::process_grant_role; + processMap_["revoke_role"] = &ThriftHiveMetastoreProcessor::process_revoke_role; + processMap_["list_roles"] = &ThriftHiveMetastoreProcessor::process_list_roles; + processMap_["get_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_privilege_set; + processMap_["list_privileges"] = &ThriftHiveMetastoreProcessor::process_list_privileges; + processMap_["grant_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_privileges; + processMap_["revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_privileges; } virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot); @@ -5369,6 +6898,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) { @@ -5393,6 +6934,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) { @@ -5417,6 +6970,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) { @@ -5550,6 +7115,108 @@ } } + bool create_role(const Role& role) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->create_role(role); + } else { + ifaces_[i]->create_role(role); + } + } + } + + bool drop_role(const std::string& role_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); + } else { + ifaces_[i]->drop_role(role_name); + } + } + } + + bool grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); + } else { + ifaces_[i]->grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); + } + } + } + + bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->revoke_role(role_name, principal_name, principal_type); + } else { + ifaces_[i]->revoke_role(role_name, principal_name, principal_type); + } + } + } + + void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_roles(_return, principal_name, principal_type); + return; + } else { + ifaces_[i]->list_roles(_return, principal_name, principal_type); + } + } + } + + void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, 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_privilege_set(_return, hiveObject, user_name, group_names); + return; + } else { + ifaces_[i]->get_privilege_set(_return, hiveObject, user_name, group_names); + } + } + } + + void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); + return; + } else { + ifaces_[i]->list_privileges(_return, principal_name, principal_type, hiveObject); + } + } + } + + bool grant_privileges(const PrivilegeBag& privileges) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->grant_privileges(privileges); + } else { + ifaces_[i]->grant_privileges(privileges); + } + } + } + + bool revoke_privileges(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(privileges); + } else { + ifaces_[i]->revoke_privileges(privileges); + } + } + } + }; }}} // namespace Index: metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp =================================================================== --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (revision 1057802) +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -142,6 +142,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"); @@ -152,6 +157,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"); @@ -162,6 +172,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"); @@ -222,6 +237,51 @@ printf("get_index_names\n"); } + bool create_role(const Role& role) { + // Your implementation goes here + printf("create_role\n"); + } + + bool drop_role(const std::string& role_name) { + // Your implementation goes here + printf("drop_role\n"); + } + + bool grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option) { + // Your implementation goes here + printf("grant_role\n"); + } + + bool revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type) { + // Your implementation goes here + printf("revoke_role\n"); + } + + void list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type) { + // Your implementation goes here + printf("list_roles\n"); + } + + void get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_privilege_set\n"); + } + + void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) { + // Your implementation goes here + printf("list_privileges\n"); + } + + bool grant_privileges(const PrivilegeBag& privileges) { + // Your implementation goes here + printf("grant_privileges\n"); + } + + bool revoke_privileges(const PrivilegeBag& privileges) { + // Your implementation goes here + printf("revoke_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 1057802) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp (working copy) @@ -261,8 +261,675 @@ 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* HiveObjectRef::ascii_fingerprint = "205CD8311CF3AA9EC161BAEF8D7C933C"; +const uint8_t HiveObjectRef::binary_fingerprint[16] = {0x20,0x5C,0xD8,0x31,0x1C,0xF3,0xAA,0x9E,0xC1,0x61,0xBA,0xEF,0x8D,0x7C,0x93,0x3C}; + +uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast6; + xfer += iprot->readI32(ecast6); + this->objectType = (HiveObjectType::type)ecast6; + this->__isset.objectType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->objectName); + this->__isset.objectName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partValues.clear(); + uint32_t _size7; + ::apache::thrift::protocol::TType _etype10; + iprot->readListBegin(_etype10, _size7); + this->partValues.resize(_size7); + uint32_t _i11; + for (_i11 = 0; _i11 < _size7; ++_i11) + { + xfer += iprot->readString(this->partValues[_i11]); + } + iprot->readListEnd(); + } + this->__isset.partValues = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->columnName); + this->__isset.columnName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("HiveObjectRef"); + xfer += oprot->writeFieldBegin("objectType", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->objectType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("objectName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->objectName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partValues", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->partValues.size()); + std::vector ::const_iterator _iter12; + for (_iter12 = this->partValues.begin(); _iter12 != this->partValues.end(); ++_iter12) + { + xfer += oprot->writeString((*_iter12)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnName", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->columnName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* PrivilegeGrantInfo::ascii_fingerprint = "A58923AF7294BE492D6F90E07E8CEE1F"; +const uint8_t PrivilegeGrantInfo::binary_fingerprint[16] = {0xA5,0x89,0x23,0xAF,0x72,0x94,0xBE,0x49,0x2D,0x6F,0x90,0xE0,0x7E,0x8C,0xEE,0x1F}; + +uint32_t PrivilegeGrantInfo::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->privilege); + this->__isset.privilege = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast13; + xfer += iprot->readI32(ecast13); + this->grantorType = (PrincipalType::type)ecast13; + this->__isset.grantorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->grantOption); + this->__isset.grantOption = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("PrivilegeGrantInfo"); + xfer += oprot->writeFieldBegin("privilege", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->privilege); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((int32_t)this->grantorType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->grantOption); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* HiveObjectPrivilege::ascii_fingerprint = "83D71969B23BD853E29DBA9D43B29AF8"; +const uint8_t HiveObjectPrivilege::binary_fingerprint[16] = {0x83,0xD7,0x19,0x69,0xB2,0x3B,0xD8,0x53,0xE2,0x9D,0xBA,0x9D,0x43,0xB2,0x9A,0xF8}; + +uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast14; + xfer += iprot->readI32(ecast14); + this->principalType = (PrincipalType::type)ecast14; + this->__isset.principalType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->grantInfo.read(iprot); + this->__isset.grantInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("HiveObjectPrivilege"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->hiveObject.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->principalType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantInfo", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->grantInfo.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* PrivilegeBag::ascii_fingerprint = "BB89E4701B7B709B046A74C90B1147F2"; +const uint8_t PrivilegeBag::binary_fingerprint[16] = {0xBB,0x89,0xE4,0x70,0x1B,0x7B,0x70,0x9B,0x04,0x6A,0x74,0xC9,0x0B,0x11,0x47,0xF2}; + +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_LIST) { + { + this->privileges.clear(); + uint32_t _size15; + ::apache::thrift::protocol::TType _etype18; + iprot->readListBegin(_etype18, _size15); + this->privileges.resize(_size15); + uint32_t _i19; + for (_i19 = 0; _i19 < _size15; ++_i19) + { + xfer += this->privileges[_i19].read(iprot); + } + iprot->readListEnd(); + } + 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 PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("PrivilegeBag"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->privileges.size()); + std::vector ::const_iterator _iter20; + for (_iter20 = this->privileges.begin(); _iter20 != this->privileges.end(); ++_iter20) + { + xfer += (*_iter20).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* PrincipalPrivilegeSet::ascii_fingerprint = "08F75D2533906EA87BE34EA640856683"; +const uint8_t PrincipalPrivilegeSet::binary_fingerprint[16] = {0x08,0xF7,0x5D,0x25,0x33,0x90,0x6E,0xA8,0x7B,0xE3,0x4E,0xA6,0x40,0x85,0x66,0x83}; + +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 _size21; + ::apache::thrift::protocol::TType _ktype22; + ::apache::thrift::protocol::TType _vtype23; + iprot->readMapBegin(_ktype22, _vtype23, _size21); + uint32_t _i25; + for (_i25 = 0; _i25 < _size21; ++_i25) + { + std::string _key26; + xfer += iprot->readString(_key26); + std::vector & _val27 = this->userPrivileges[_key26]; + { + _val27.clear(); + uint32_t _size28; + ::apache::thrift::protocol::TType _etype31; + iprot->readListBegin(_etype31, _size28); + _val27.resize(_size28); + uint32_t _i32; + for (_i32 = 0; _i32 < _size28; ++_i32) + { + xfer += _val27[_i32].read(iprot); + } + iprot->readListEnd(); + } + } + 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 _size33; + ::apache::thrift::protocol::TType _ktype34; + ::apache::thrift::protocol::TType _vtype35; + iprot->readMapBegin(_ktype34, _vtype35, _size33); + uint32_t _i37; + for (_i37 = 0; _i37 < _size33; ++_i37) + { + std::string _key38; + xfer += iprot->readString(_key38); + std::vector & _val39 = this->groupPrivileges[_key38]; + { + _val39.clear(); + uint32_t _size40; + ::apache::thrift::protocol::TType _etype43; + iprot->readListBegin(_etype43, _size40); + _val39.resize(_size40); + uint32_t _i44; + for (_i44 = 0; _i44 < _size40; ++_i44) + { + xfer += _val39[_i44].read(iprot); + } + iprot->readListEnd(); + } + } + 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 _size45; + ::apache::thrift::protocol::TType _ktype46; + ::apache::thrift::protocol::TType _vtype47; + iprot->readMapBegin(_ktype46, _vtype47, _size45); + uint32_t _i49; + for (_i49 = 0; _i49 < _size45; ++_i49) + { + std::string _key50; + xfer += iprot->readString(_key50); + std::vector & _val51 = this->rolePrivileges[_key50]; + { + _val51.clear(); + uint32_t _size52; + ::apache::thrift::protocol::TType _etype55; + iprot->readListBegin(_etype55, _size52); + _val51.resize(_size52); + uint32_t _i56; + for (_i56 = 0; _i56 < _size52; ++_i56) + { + xfer += _val51[_i56].read(iprot); + } + iprot->readListEnd(); + } + } + 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_LIST, this->userPrivileges.size()); + std::map > ::const_iterator _iter57; + for (_iter57 = this->userPrivileges.begin(); _iter57 != this->userPrivileges.end(); ++_iter57) + { + xfer += oprot->writeString(_iter57->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, _iter57->second.size()); + std::vector ::const_iterator _iter58; + for (_iter58 = _iter57->second.begin(); _iter58 != _iter57->second.end(); ++_iter58) + { + xfer += (*_iter58).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + 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_LIST, this->groupPrivileges.size()); + std::map > ::const_iterator _iter59; + for (_iter59 = this->groupPrivileges.begin(); _iter59 != this->groupPrivileges.end(); ++_iter59) + { + xfer += oprot->writeString(_iter59->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, _iter59->second.size()); + std::vector ::const_iterator _iter60; + for (_iter60 = _iter59->second.begin(); _iter60 != _iter59->second.end(); ++_iter60) + { + xfer += (*_iter60).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + 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_LIST, this->rolePrivileges.size()); + std::map > ::const_iterator _iter61; + for (_iter61 = this->rolePrivileges.begin(); _iter61 != this->rolePrivileges.end(); ++_iter61) + { + xfer += oprot->writeString(_iter61->first); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, _iter61->second.size()); + std::vector ::const_iterator _iter62; + for (_iter62 = _iter61->second.begin(); _iter62 != _iter61->second.end(); ++_iter62) + { + xfer += (*_iter62).write(oprot); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Role::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26"; +const uint8_t Role::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; + +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_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ownerName); + this->__isset.ownerName = 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("createTime", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ownerName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->ownerName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Database::ascii_fingerprint = "213967572143E49C9F1A23F7A866E2F5"; +const uint8_t Database::binary_fingerprint[16] = {0x21,0x39,0x67,0x57,0x21,0x43,0xE4,0x9C,0x9F,0x1A,0x23,0xF7,0xA8,0x66,0xE2,0xF5}; uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -312,17 +979,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 _size63; + ::apache::thrift::protocol::TType _ktype64; + ::apache::thrift::protocol::TType _vtype65; + iprot->readMapBegin(_ktype64, _vtype65, _size63); + uint32_t _i67; + for (_i67 = 0; _i67 < _size63; ++_i67) { - std::string _key11; - xfer += iprot->readString(_key11); - std::string& _val12 = this->parameters[_key11]; - xfer += iprot->readString(_val12); + std::string _key68; + xfer += iprot->readString(_key68); + std::string& _val69 = this->parameters[_key68]; + xfer += iprot->readString(_val69); } iprot->readMapEnd(); } @@ -331,6 +998,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,15 +1033,20 @@ 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 _iter70; + for (_iter70 = this->parameters.begin(); _iter70 != this->parameters.end(); ++_iter70) { - xfer += oprot->writeString(_iter13->first); - xfer += oprot->writeString(_iter13->second); + xfer += oprot->writeString(_iter70->first); + xfer += oprot->writeString(_iter70->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; @@ -415,17 +1095,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 _size71; + ::apache::thrift::protocol::TType _ktype72; + ::apache::thrift::protocol::TType _vtype73; + iprot->readMapBegin(_ktype72, _vtype73, _size71); + uint32_t _i75; + for (_i75 = 0; _i75 < _size71; ++_i75) { - std::string _key19; - xfer += iprot->readString(_key19); - std::string& _val20 = this->parameters[_key19]; - xfer += iprot->readString(_val20); + std::string _key76; + xfer += iprot->readString(_key76); + std::string& _val77 = this->parameters[_key76]; + xfer += iprot->readString(_val77); } iprot->readMapEnd(); } @@ -458,11 +1138,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 _iter78; + for (_iter78 = this->parameters.begin(); _iter78 != this->parameters.end(); ++_iter78) { - xfer += oprot->writeString(_iter21->first); - xfer += oprot->writeString(_iter21->second); + xfer += oprot->writeString(_iter78->first); + xfer += oprot->writeString(_iter78->second); } xfer += oprot->writeMapEnd(); } @@ -564,14 +1244,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 _size79; + ::apache::thrift::protocol::TType _etype82; + iprot->readListBegin(_etype82, _size79); + this->cols.resize(_size79); + uint32_t _i83; + for (_i83 = 0; _i83 < _size79; ++_i83) { - xfer += this->cols[_i26].read(iprot); + xfer += this->cols[_i83].read(iprot); } iprot->readListEnd(); } @@ -632,14 +1312,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 _size84; + ::apache::thrift::protocol::TType _etype87; + iprot->readListBegin(_etype87, _size84); + this->bucketCols.resize(_size84); + uint32_t _i88; + for (_i88 = 0; _i88 < _size84; ++_i88) { - xfer += iprot->readString(this->bucketCols[_i31]); + xfer += iprot->readString(this->bucketCols[_i88]); } iprot->readListEnd(); } @@ -652,14 +1332,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 _size89; + ::apache::thrift::protocol::TType _etype92; + iprot->readListBegin(_etype92, _size89); + this->sortCols.resize(_size89); + uint32_t _i93; + for (_i93 = 0; _i93 < _size89; ++_i93) { - xfer += this->sortCols[_i36].read(iprot); + xfer += this->sortCols[_i93].read(iprot); } iprot->readListEnd(); } @@ -672,17 +1352,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 _size94; + ::apache::thrift::protocol::TType _ktype95; + ::apache::thrift::protocol::TType _vtype96; + iprot->readMapBegin(_ktype95, _vtype96, _size94); + uint32_t _i98; + for (_i98 = 0; _i98 < _size94; ++_i98) { - std::string _key42; - xfer += iprot->readString(_key42); - std::string& _val43 = this->parameters[_key42]; - xfer += iprot->readString(_val43); + std::string _key99; + xfer += iprot->readString(_key99); + std::string& _val100 = this->parameters[_key99]; + xfer += iprot->readString(_val100); } iprot->readMapEnd(); } @@ -709,10 +1389,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 _iter101; + for (_iter101 = this->cols.begin(); _iter101 != this->cols.end(); ++_iter101) { - xfer += (*_iter44).write(oprot); + xfer += (*_iter101).write(oprot); } xfer += oprot->writeListEnd(); } @@ -738,10 +1418,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 _iter102; + for (_iter102 = this->bucketCols.begin(); _iter102 != this->bucketCols.end(); ++_iter102) { - xfer += oprot->writeString((*_iter45)); + xfer += oprot->writeString((*_iter102)); } xfer += oprot->writeListEnd(); } @@ -749,10 +1429,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 _iter103; + for (_iter103 = this->sortCols.begin(); _iter103 != this->sortCols.end(); ++_iter103) { - xfer += (*_iter46).write(oprot); + xfer += (*_iter103).write(oprot); } xfer += oprot->writeListEnd(); } @@ -760,11 +1440,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 _iter104; + for (_iter104 = this->parameters.begin(); _iter104 != this->parameters.end(); ++_iter104) { - xfer += oprot->writeString(_iter47->first); - xfer += oprot->writeString(_iter47->second); + xfer += oprot->writeString(_iter104->first); + xfer += oprot->writeString(_iter104->second); } xfer += oprot->writeMapEnd(); } @@ -774,8 +1454,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 = "26BE788C09746068A2616712C9262900"; +const uint8_t Table::binary_fingerprint[16] = {0x26,0xBE,0x78,0x8C,0x09,0x74,0x60,0x68,0xA2,0x61,0x67,0x12,0xC9,0x26,0x29,0x00}; uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -857,14 +1537,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 _size105; + ::apache::thrift::protocol::TType _etype108; + iprot->readListBegin(_etype108, _size105); + this->partitionKeys.resize(_size105); + uint32_t _i109; + for (_i109 = 0; _i109 < _size105; ++_i109) { - xfer += this->partitionKeys[_i52].read(iprot); + xfer += this->partitionKeys[_i109].read(iprot); } iprot->readListEnd(); } @@ -877,17 +1557,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 _size110; + ::apache::thrift::protocol::TType _ktype111; + ::apache::thrift::protocol::TType _vtype112; + iprot->readMapBegin(_ktype111, _vtype112, _size110); + uint32_t _i114; + for (_i114 = 0; _i114 < _size110; ++_i114) { - std::string _key58; - xfer += iprot->readString(_key58); - std::string& _val59 = this->parameters[_key58]; - xfer += iprot->readString(_val59); + std::string _key115; + xfer += iprot->readString(_key115); + std::string& _val116 = this->parameters[_key115]; + xfer += iprot->readString(_val116); } iprot->readMapEnd(); } @@ -920,6 +1600,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 +1647,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 _iter117; + for (_iter117 = this->partitionKeys.begin(); _iter117 != this->partitionKeys.end(); ++_iter117) { - xfer += (*_iter60).write(oprot); + xfer += (*_iter117).write(oprot); } xfer += oprot->writeListEnd(); } @@ -970,11 +1658,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 _iter118; + for (_iter118 = this->parameters.begin(); _iter118 != this->parameters.end(); ++_iter118) { - xfer += oprot->writeString(_iter61->first); - xfer += oprot->writeString(_iter61->second); + xfer += oprot->writeString(_iter118->first); + xfer += oprot->writeString(_iter118->second); } xfer += oprot->writeMapEnd(); } @@ -988,13 +1676,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 = "F480E1D1B8AEBDDB37F8E180C0F07395"; +const uint8_t Partition::binary_fingerprint[16] = {0xF4,0x80,0xE1,0xD1,0xB8,0xAE,0xBD,0xDB,0x37,0xF8,0xE1,0x80,0xC0,0xF0,0x73,0x95}; uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -1020,14 +1713,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 _size119; + ::apache::thrift::protocol::TType _etype122; + iprot->readListBegin(_etype122, _size119); + this->values.resize(_size119); + uint32_t _i123; + for (_i123 = 0; _i123 < _size119; ++_i123) { - xfer += iprot->readString(this->values[_i66]); + xfer += iprot->readString(this->values[_i123]); } iprot->readListEnd(); } @@ -1080,17 +1773,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 _size124; + ::apache::thrift::protocol::TType _ktype125; + ::apache::thrift::protocol::TType _vtype126; + iprot->readMapBegin(_ktype125, _vtype126, _size124); + uint32_t _i128; + for (_i128 = 0; _i128 < _size124; ++_i128) { - std::string _key72; - xfer += iprot->readString(_key72); - std::string& _val73 = this->parameters[_key72]; - xfer += iprot->readString(_val73); + std::string _key129; + xfer += iprot->readString(_key129); + std::string& _val130 = this->parameters[_key129]; + xfer += iprot->readString(_val130); } iprot->readMapEnd(); } @@ -1099,6 +1792,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 +1818,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 _iter131; + for (_iter131 = this->values.begin(); _iter131 != this->values.end(); ++_iter131) { - xfer += oprot->writeString((*_iter74)); + xfer += oprot->writeString((*_iter131)); } xfer += oprot->writeListEnd(); } @@ -1143,15 +1844,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 _iter132; + for (_iter132 = this->parameters.begin(); _iter132 != this->parameters.end(); ++_iter132) { - xfer += oprot->writeString(_iter75->first); - xfer += oprot->writeString(_iter75->second); + xfer += oprot->writeString(_iter132->first); + xfer += oprot->writeString(_iter132->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 +1954,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 _size133; + ::apache::thrift::protocol::TType _ktype134; + ::apache::thrift::protocol::TType _vtype135; + iprot->readMapBegin(_ktype134, _vtype135, _size133); + uint32_t _i137; + for (_i137 = 0; _i137 < _size133; ++_i137) { - std::string _key81; - xfer += iprot->readString(_key81); - std::string& _val82 = this->parameters[_key81]; - xfer += iprot->readString(_val82); + std::string _key138; + xfer += iprot->readString(_key138); + std::string& _val139 = this->parameters[_key138]; + xfer += iprot->readString(_val139); } iprot->readMapEnd(); } @@ -1317,11 +2023,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 _iter140; + for (_iter140 = this->parameters.begin(); _iter140 != this->parameters.end(); ++_iter140) { - xfer += oprot->writeString(_iter83->first); - xfer += oprot->writeString(_iter83->second); + xfer += oprot->writeString(_iter140->first); + xfer += oprot->writeString(_iter140->second); } xfer += oprot->writeMapEnd(); } @@ -1361,14 +2067,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 _size141; + ::apache::thrift::protocol::TType _etype144; + iprot->readListBegin(_etype144, _size141); + this->fieldSchemas.resize(_size141); + uint32_t _i145; + for (_i145 = 0; _i145 < _size141; ++_i145) { - xfer += this->fieldSchemas[_i88].read(iprot); + xfer += this->fieldSchemas[_i145].read(iprot); } iprot->readListEnd(); } @@ -1381,17 +2087,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 _size146; + ::apache::thrift::protocol::TType _ktype147; + ::apache::thrift::protocol::TType _vtype148; + iprot->readMapBegin(_ktype147, _vtype148, _size146); + uint32_t _i150; + for (_i150 = 0; _i150 < _size146; ++_i150) { - std::string _key94; - xfer += iprot->readString(_key94); - std::string& _val95 = this->properties[_key94]; - xfer += iprot->readString(_val95); + std::string _key151; + xfer += iprot->readString(_key151); + std::string& _val152 = this->properties[_key151]; + xfer += iprot->readString(_val152); } iprot->readMapEnd(); } @@ -1418,10 +2124,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 _iter153; + for (_iter153 = this->fieldSchemas.begin(); _iter153 != this->fieldSchemas.end(); ++_iter153) { - xfer += (*_iter96).write(oprot); + xfer += (*_iter153).write(oprot); } xfer += oprot->writeListEnd(); } @@ -1429,11 +2135,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 _iter154; + for (_iter154 = this->properties.begin(); _iter154 != this->properties.end(); ++_iter154) { - xfer += oprot->writeString(_iter97->first); - xfer += oprot->writeString(_iter97->second); + xfer += oprot->writeString(_iter154->first); + xfer += oprot->writeString(_iter154->second); } xfer += oprot->writeMapEnd(); } Index: metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h =================================================================== --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (revision 1057802) +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (working copy) @@ -16,6 +16,24 @@ namespace Apache { namespace Hadoop { namespace Hive { +struct HiveObjectType { + enum type { + GLOBAL = 1, + DATABASE = 2, + TABLE = 3, + PARTITION = 4, + COLUMN = 5 + }; +}; + +struct PrincipalType { + enum type { + USER = 1, + ROLE = 2, + GROUP = 3 + }; +}; + typedef struct _Version__isset { _Version__isset() : version(false), comments(false) {} bool version; @@ -157,19 +175,302 @@ }; +typedef struct _HiveObjectRef__isset { + _HiveObjectRef__isset() : objectType(false), dbName(false), objectName(false), partValues(false), columnName(false) {} + bool objectType; + bool dbName; + bool objectName; + bool partValues; + bool columnName; +} _HiveObjectRef__isset; + +class HiveObjectRef { + public: + + static const char* ascii_fingerprint; // = "205CD8311CF3AA9EC161BAEF8D7C933C"; + static const uint8_t binary_fingerprint[16]; // = {0x20,0x5C,0xD8,0x31,0x1C,0xF3,0xAA,0x9E,0xC1,0x61,0xBA,0xEF,0x8D,0x7C,0x93,0x3C}; + + HiveObjectRef() : dbName(""), objectName(""), columnName("") { + } + + virtual ~HiveObjectRef() throw() {} + + HiveObjectType::type objectType; + std::string dbName; + std::string objectName; + std::vector partValues; + std::string columnName; + + _HiveObjectRef__isset __isset; + + bool operator == (const HiveObjectRef & rhs) const + { + if (!(objectType == rhs.objectType)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(objectName == rhs.objectName)) + return false; + if (!(partValues == rhs.partValues)) + return false; + if (!(columnName == rhs.columnName)) + return false; + return true; + } + bool operator != (const HiveObjectRef &rhs) const { + return !(*this == rhs); + } + + bool operator < (const HiveObjectRef & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _PrivilegeGrantInfo__isset { + _PrivilegeGrantInfo__isset() : privilege(false), createTime(false), grantor(false), grantorType(false), grantOption(false) {} + bool privilege; + bool createTime; + bool grantor; + bool grantorType; + bool grantOption; +} _PrivilegeGrantInfo__isset; + +class PrivilegeGrantInfo { + public: + + static const char* ascii_fingerprint; // = "A58923AF7294BE492D6F90E07E8CEE1F"; + static const uint8_t binary_fingerprint[16]; // = {0xA5,0x89,0x23,0xAF,0x72,0x94,0xBE,0x49,0x2D,0x6F,0x90,0xE0,0x7E,0x8C,0xEE,0x1F}; + + PrivilegeGrantInfo() : privilege(""), createTime(0), grantor(""), grantOption(0) { + } + + virtual ~PrivilegeGrantInfo() throw() {} + + std::string privilege; + int32_t createTime; + std::string grantor; + PrincipalType::type grantorType; + bool grantOption; + + _PrivilegeGrantInfo__isset __isset; + + bool operator == (const PrivilegeGrantInfo & rhs) const + { + if (!(privilege == rhs.privilege)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(grantorType == rhs.grantorType)) + return false; + if (!(grantOption == rhs.grantOption)) + return false; + return true; + } + bool operator != (const PrivilegeGrantInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrivilegeGrantInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _HiveObjectPrivilege__isset { + _HiveObjectPrivilege__isset() : hiveObject(false), principalName(false), principalType(false), grantInfo(false) {} + bool hiveObject; + bool principalName; + bool principalType; + bool grantInfo; +} _HiveObjectPrivilege__isset; + +class HiveObjectPrivilege { + public: + + static const char* ascii_fingerprint; // = "83D71969B23BD853E29DBA9D43B29AF8"; + static const uint8_t binary_fingerprint[16]; // = {0x83,0xD7,0x19,0x69,0xB2,0x3B,0xD8,0x53,0xE2,0x9D,0xBA,0x9D,0x43,0xB2,0x9A,0xF8}; + + HiveObjectPrivilege() : principalName("") { + } + + virtual ~HiveObjectPrivilege() throw() {} + + HiveObjectRef hiveObject; + std::string principalName; + PrincipalType::type principalType; + PrivilegeGrantInfo grantInfo; + + _HiveObjectPrivilege__isset __isset; + + bool operator == (const HiveObjectPrivilege & rhs) const + { + if (!(hiveObject == rhs.hiveObject)) + return false; + if (!(principalName == rhs.principalName)) + return false; + if (!(principalType == rhs.principalType)) + return false; + if (!(grantInfo == rhs.grantInfo)) + return false; + return true; + } + bool operator != (const HiveObjectPrivilege &rhs) const { + return !(*this == rhs); + } + + bool operator < (const HiveObjectPrivilege & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _PrivilegeBag__isset { + _PrivilegeBag__isset() : privileges(false) {} + bool privileges; +} _PrivilegeBag__isset; + +class PrivilegeBag { + public: + + static const char* ascii_fingerprint; // = "BB89E4701B7B709B046A74C90B1147F2"; + static const uint8_t binary_fingerprint[16]; // = {0xBB,0x89,0xE4,0x70,0x1B,0x7B,0x70,0x9B,0x04,0x6A,0x74,0xC9,0x0B,0x11,0x47,0xF2}; + + PrivilegeBag() { + } + + virtual ~PrivilegeBag() throw() {} + + std::vector privileges; + + _PrivilegeBag__isset __isset; + + bool operator == (const PrivilegeBag & rhs) const + { + if (!(privileges == rhs.privileges)) + 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 _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; // = "08F75D2533906EA87BE34EA640856683"; + static const uint8_t binary_fingerprint[16]; // = {0x08,0xF7,0x5D,0x25,0x33,0x90,0x6E,0xA8,0x7B,0xE3,0x4E,0xA6,0x40,0x85,0x66,0x83}; + + 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 _Role__isset { + _Role__isset() : roleName(false), createTime(false), ownerName(false) {} + bool roleName; + bool createTime; + bool ownerName; +} _Role__isset; + +class Role { + public: + + static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26"; + static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; + + Role() : roleName(""), createTime(0), ownerName("") { + } + + virtual ~Role() throw() {} + + std::string roleName; + int32_t createTime; + std::string ownerName; + + _Role__isset __isset; + + bool operator == (const Role & rhs) const + { + if (!(roleName == rhs.roleName)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(ownerName == rhs.ownerName)) + 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 _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; // = "213967572143E49C9F1A23F7A866E2F5"; + static const uint8_t binary_fingerprint[16]; // = {0x21,0x39,0x67,0x57,0x21,0x43,0xE4,0x9C,0x9F,0x1A,0x23,0xF7,0xA8,0x66,0xE2,0xF5}; Database() : name(""), description(""), locationUri("") { } @@ -180,6 +481,7 @@ std::string description; std::string locationUri; std::map parameters; + PrincipalPrivilegeSet privileges; _Database__isset __isset; @@ -193,6 +495,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 { @@ -366,7 +672,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 +685,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; // = "26BE788C09746068A2616712C9262900"; + static const uint8_t binary_fingerprint[16]; // = {0x26,0xBE,0x78,0x8C,0x09,0x74,0x60,0x68,0xA2,0x61,0x67,0x12,0xC9,0x26,0x29,0x00}; Table() : tableName(""), dbName(""), owner(""), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(""), viewExpandedText(""), tableType("") { } @@ -404,6 +711,7 @@ std::string viewOriginalText; std::string viewExpandedText; std::string tableType; + PrincipalPrivilegeSet privileges; _Table__isset __isset; @@ -433,6 +741,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 +759,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 +767,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; // = "F480E1D1B8AEBDDB37F8E180C0F07395"; + static const uint8_t binary_fingerprint[16]; // = {0xF4,0x80,0xE1,0xD1,0xB8,0xAE,0xBD,0xDB,0x37,0xF8,0xE1,0x80,0xC0,0xF0,0x73,0x95}; Partition() : dbName(""), tableName(""), createTime(0), lastAccessTime(0) { } @@ -475,6 +788,7 @@ int32_t lastAccessTime; StorageDescriptor sd; std::map parameters; + PrincipalPrivilegeSet privileges; _Partition__isset __isset; @@ -494,6 +808,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 { 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 1057802) +++ 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 _map39 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map39.size); + for (int _i40 = 0; _i40 < _map39.size; ++_i40) { - String _key6; - String _val7; - _key6 = iprot.readString(); - _val7 = iprot.readString(); - this.parameters.put(_key6, _val7); + String _key41; + String _val42; + _key41 = iprot.readString(); + _val42 = iprot.readString(); + this.parameters.put(_key41, _val42); } 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 _iter43 : this.parameters.entrySet()) { - oprot.writeString(_iter8.getKey()); - oprot.writeString(_iter8.getValue()); + oprot.writeString(_iter43.getKey()); + oprot.writeString(_iter43.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/HiveObjectPrivilege.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectPrivilege.java (revision 0) @@ -0,0 +1,584 @@ +/** + * 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 HiveObjectPrivilege implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("HiveObjectPrivilege"); + + private static final TField HIVE_OBJECT_FIELD_DESC = new TField("hiveObject", TType.STRUCT, (short)1); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)2); + private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principalType", TType.I32, (short)3); + private static final TField GRANT_INFO_FIELD_DESC = new TField("grantInfo", TType.STRUCT, (short)4); + + private HiveObjectRef hiveObject; + private String principalName; + private PrincipalType principalType; + private PrivilegeGrantInfo grantInfo; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + HIVE_OBJECT((short)1, "hiveObject"), + PRINCIPAL_NAME((short)2, "principalName"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)3, "principalType"), + GRANT_INFO((short)4, "grantInfo"); + + 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: // HIVE_OBJECT + return HIVE_OBJECT; + case 2: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 3: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + case 4: // GRANT_INFO + return GRANT_INFO; + 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.HIVE_OBJECT, new FieldMetaData("hiveObject", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, HiveObjectRef.class))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principalType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANT_INFO, new FieldMetaData("grantInfo", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrivilegeGrantInfo.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(HiveObjectPrivilege.class, metaDataMap); + } + + public HiveObjectPrivilege() { + } + + public HiveObjectPrivilege( + HiveObjectRef hiveObject, + String principalName, + PrincipalType principalType, + PrivilegeGrantInfo grantInfo) + { + this(); + this.hiveObject = hiveObject; + this.principalName = principalName; + this.principalType = principalType; + this.grantInfo = grantInfo; + } + + /** + * Performs a deep copy on other. + */ + public HiveObjectPrivilege(HiveObjectPrivilege other) { + if (other.isSetHiveObject()) { + this.hiveObject = new HiveObjectRef(other.hiveObject); + } + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + if (other.isSetPrincipalType()) { + this.principalType = other.principalType; + } + if (other.isSetGrantInfo()) { + this.grantInfo = new PrivilegeGrantInfo(other.grantInfo); + } + } + + public HiveObjectPrivilege deepCopy() { + return new HiveObjectPrivilege(this); + } + + @Override + public void clear() { + this.hiveObject = null; + this.principalName = null; + this.principalType = null; + this.grantInfo = null; + } + + public HiveObjectRef getHiveObject() { + return this.hiveObject; + } + + public void setHiveObject(HiveObjectRef hiveObject) { + this.hiveObject = hiveObject; + } + + public void unsetHiveObject() { + this.hiveObject = null; + } + + /** Returns true if field hiveObject is set (has been asigned a value) and false otherwise */ + public boolean isSetHiveObject() { + return this.hiveObject != null; + } + + public void setHiveObjectIsSet(boolean value) { + if (!value) { + this.hiveObject = 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; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipalType() { + return this.principalType; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + } + + public void unsetPrincipalType() { + this.principalType = null; + } + + /** Returns true if field principalType is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipalType() { + return this.principalType != null; + } + + public void setPrincipalTypeIsSet(boolean value) { + if (!value) { + this.principalType = null; + } + } + + public PrivilegeGrantInfo getGrantInfo() { + return this.grantInfo; + } + + public void setGrantInfo(PrivilegeGrantInfo grantInfo) { + this.grantInfo = grantInfo; + } + + public void unsetGrantInfo() { + this.grantInfo = null; + } + + /** Returns true if field grantInfo is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantInfo() { + return this.grantInfo != null; + } + + public void setGrantInfoIsSet(boolean value) { + if (!value) { + this.grantInfo = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case HIVE_OBJECT: + if (value == null) { + unsetHiveObject(); + } else { + setHiveObject((HiveObjectRef)value); + } + break; + + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipalType(); + } else { + setPrincipalType((PrincipalType)value); + } + break; + + case GRANT_INFO: + if (value == null) { + unsetGrantInfo(); + } else { + setGrantInfo((PrivilegeGrantInfo)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case HIVE_OBJECT: + return getHiveObject(); + + case PRINCIPAL_NAME: + return getPrincipalName(); + + case PRINCIPAL_TYPE: + return getPrincipalType(); + + case GRANT_INFO: + return getGrantInfo(); + + } + 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 HIVE_OBJECT: + return isSetHiveObject(); + case PRINCIPAL_NAME: + return isSetPrincipalName(); + case PRINCIPAL_TYPE: + return isSetPrincipalType(); + case GRANT_INFO: + return isSetGrantInfo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HiveObjectPrivilege) + return this.equals((HiveObjectPrivilege)that); + return false; + } + + public boolean equals(HiveObjectPrivilege that) { + if (that == null) + return false; + + boolean this_present_hiveObject = true && this.isSetHiveObject(); + boolean that_present_hiveObject = true && that.isSetHiveObject(); + if (this_present_hiveObject || that_present_hiveObject) { + if (!(this_present_hiveObject && that_present_hiveObject)) + return false; + if (!this.hiveObject.equals(that.hiveObject)) + 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_principalType = true && this.isSetPrincipalType(); + boolean that_present_principalType = true && that.isSetPrincipalType(); + if (this_present_principalType || that_present_principalType) { + if (!(this_present_principalType && that_present_principalType)) + return false; + if (!this.principalType.equals(that.principalType)) + return false; + } + + boolean this_present_grantInfo = true && this.isSetGrantInfo(); + boolean that_present_grantInfo = true && that.isSetGrantInfo(); + if (this_present_grantInfo || that_present_grantInfo) { + if (!(this_present_grantInfo && that_present_grantInfo)) + return false; + if (!this.grantInfo.equals(that.grantInfo)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(HiveObjectPrivilege other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + HiveObjectPrivilege typedOther = (HiveObjectPrivilege)other; + + lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHiveObject()) { + lastComparison = TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject); + if (lastComparison != 0) { + return lastComparison; + } + } + 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(isSetPrincipalType()).compareTo(typedOther.isSetPrincipalType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipalType()) { + lastComparison = TBaseHelper.compareTo(this.principalType, typedOther.principalType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantInfo()).compareTo(typedOther.isSetGrantInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantInfo()) { + lastComparison = TBaseHelper.compareTo(this.grantInfo, typedOther.grantInfo); + 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: // HIVE_OBJECT + if (field.type == TType.STRUCT) { + this.hiveObject = new HiveObjectRef(); + this.hiveObject.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (field.type == TType.I32) { + this.principalType = PrincipalType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // GRANT_INFO + if (field.type == TType.STRUCT) { + this.grantInfo = new PrivilegeGrantInfo(); + this.grantInfo.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.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + this.hiveObject.write(oprot); + oprot.writeFieldEnd(); + } + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + if (this.principalType != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(this.principalType.getValue()); + oprot.writeFieldEnd(); + } + if (this.grantInfo != null) { + oprot.writeFieldBegin(GRANT_INFO_FIELD_DESC); + this.grantInfo.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("HiveObjectPrivilege("); + boolean first = true; + + sb.append("hiveObject:"); + if (this.hiveObject == null) { + sb.append("null"); + } else { + sb.append(this.hiveObject); + } + first = false; + if (!first) sb.append(", "); + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("principalType:"); + if (this.principalType == null) { + sb.append("null"); + } else { + sb.append(this.principalType); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantInfo:"); + if (this.grantInfo == null) { + sb.append("null"); + } else { + sb.append(this.grantInfo); + } + 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/HiveObjectRef.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (revision 0) @@ -0,0 +1,707 @@ +/** + * 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 HiveObjectRef implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("HiveObjectRef"); + + private static final TField OBJECT_TYPE_FIELD_DESC = new TField("objectType", TType.I32, (short)1); + private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)2); + private static final TField OBJECT_NAME_FIELD_DESC = new TField("objectName", TType.STRING, (short)3); + private static final TField PART_VALUES_FIELD_DESC = new TField("partValues", TType.LIST, (short)4); + private static final TField COLUMN_NAME_FIELD_DESC = new TField("columnName", TType.STRING, (short)5); + + private HiveObjectType objectType; + private String dbName; + private String objectName; + private List partValues; + private String columnName; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + /** + * + * @see HiveObjectType + */ + OBJECT_TYPE((short)1, "objectType"), + DB_NAME((short)2, "dbName"), + OBJECT_NAME((short)3, "objectName"), + PART_VALUES((short)4, "partValues"), + COLUMN_NAME((short)5, "columnName"); + + 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: // OBJECT_TYPE + return OBJECT_TYPE; + case 2: // DB_NAME + return DB_NAME; + case 3: // OBJECT_NAME + return OBJECT_NAME; + case 4: // PART_VALUES + return PART_VALUES; + case 5: // 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 + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.OBJECT_TYPE, new FieldMetaData("objectType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, HiveObjectType.class))); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.OBJECT_NAME, new FieldMetaData("objectName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PART_VALUES, new FieldMetaData("partValues", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.COLUMN_NAME, new FieldMetaData("columnName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(HiveObjectRef.class, metaDataMap); + } + + public HiveObjectRef() { + } + + public HiveObjectRef( + HiveObjectType objectType, + String dbName, + String objectName, + List partValues, + String columnName) + { + this(); + this.objectType = objectType; + this.dbName = dbName; + this.objectName = objectName; + this.partValues = partValues; + this.columnName = columnName; + } + + /** + * Performs a deep copy on other. + */ + public HiveObjectRef(HiveObjectRef other) { + if (other.isSetObjectType()) { + this.objectType = other.objectType; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetObjectName()) { + this.objectName = other.objectName; + } + if (other.isSetPartValues()) { + List __this__partValues = new ArrayList(); + for (String other_element : other.partValues) { + __this__partValues.add(other_element); + } + this.partValues = __this__partValues; + } + if (other.isSetColumnName()) { + this.columnName = other.columnName; + } + } + + public HiveObjectRef deepCopy() { + return new HiveObjectRef(this); + } + + @Override + public void clear() { + this.objectType = null; + this.dbName = null; + this.objectName = null; + this.partValues = null; + this.columnName = null; + } + + /** + * + * @see HiveObjectType + */ + public HiveObjectType getObjectType() { + return this.objectType; + } + + /** + * + * @see HiveObjectType + */ + public void setObjectType(HiveObjectType objectType) { + this.objectType = objectType; + } + + public void unsetObjectType() { + this.objectType = null; + } + + /** Returns true if field objectType is set (has been asigned a value) and false otherwise */ + public boolean isSetObjectType() { + return this.objectType != null; + } + + public void setObjectTypeIsSet(boolean value) { + if (!value) { + this.objectType = 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 getObjectName() { + return this.objectName; + } + + public void setObjectName(String objectName) { + this.objectName = objectName; + } + + public void unsetObjectName() { + this.objectName = null; + } + + /** Returns true if field objectName is set (has been asigned a value) and false otherwise */ + public boolean isSetObjectName() { + return this.objectName != null; + } + + public void setObjectNameIsSet(boolean value) { + if (!value) { + this.objectName = null; + } + } + + public int getPartValuesSize() { + return (this.partValues == null) ? 0 : this.partValues.size(); + } + + public java.util.Iterator getPartValuesIterator() { + return (this.partValues == null) ? null : this.partValues.iterator(); + } + + public void addToPartValues(String elem) { + if (this.partValues == null) { + this.partValues = new ArrayList(); + } + this.partValues.add(elem); + } + + public List getPartValues() { + return this.partValues; + } + + public void setPartValues(List partValues) { + this.partValues = partValues; + } + + public void unsetPartValues() { + this.partValues = null; + } + + /** Returns true if field partValues is set (has been asigned a value) and false otherwise */ + public boolean isSetPartValues() { + return this.partValues != null; + } + + public void setPartValuesIsSet(boolean value) { + if (!value) { + this.partValues = null; + } + } + + public String getColumnName() { + return this.columnName; + } + + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + public void unsetColumnName() { + this.columnName = null; + } + + /** Returns true if field columnName is set (has been asigned a value) and false otherwise */ + public boolean isSetColumnName() { + return this.columnName != null; + } + + public void setColumnNameIsSet(boolean value) { + if (!value) { + this.columnName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case OBJECT_TYPE: + if (value == null) { + unsetObjectType(); + } else { + setObjectType((HiveObjectType)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case OBJECT_NAME: + if (value == null) { + unsetObjectName(); + } else { + setObjectName((String)value); + } + break; + + case PART_VALUES: + if (value == null) { + unsetPartValues(); + } else { + setPartValues((List)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumnName(); + } else { + setColumnName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case OBJECT_TYPE: + return getObjectType(); + + case DB_NAME: + return getDbName(); + + case OBJECT_NAME: + return getObjectName(); + + case PART_VALUES: + return getPartValues(); + + case COLUMN_NAME: + return getColumnName(); + + } + 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 OBJECT_TYPE: + return isSetObjectType(); + case DB_NAME: + return isSetDbName(); + case OBJECT_NAME: + return isSetObjectName(); + case PART_VALUES: + return isSetPartValues(); + case COLUMN_NAME: + return isSetColumnName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HiveObjectRef) + return this.equals((HiveObjectRef)that); + return false; + } + + public boolean equals(HiveObjectRef that) { + if (that == null) + return false; + + boolean this_present_objectType = true && this.isSetObjectType(); + boolean that_present_objectType = true && that.isSetObjectType(); + if (this_present_objectType || that_present_objectType) { + if (!(this_present_objectType && that_present_objectType)) + return false; + if (!this.objectType.equals(that.objectType)) + 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_objectName = true && this.isSetObjectName(); + boolean that_present_objectName = true && that.isSetObjectName(); + if (this_present_objectName || that_present_objectName) { + if (!(this_present_objectName && that_present_objectName)) + return false; + if (!this.objectName.equals(that.objectName)) + return false; + } + + boolean this_present_partValues = true && this.isSetPartValues(); + boolean that_present_partValues = true && that.isSetPartValues(); + if (this_present_partValues || that_present_partValues) { + if (!(this_present_partValues && that_present_partValues)) + return false; + if (!this.partValues.equals(that.partValues)) + return false; + } + + boolean this_present_columnName = true && this.isSetColumnName(); + boolean that_present_columnName = true && that.isSetColumnName(); + if (this_present_columnName || that_present_columnName) { + if (!(this_present_columnName && that_present_columnName)) + return false; + if (!this.columnName.equals(that.columnName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(HiveObjectRef other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + HiveObjectRef typedOther = (HiveObjectRef)other; + + lastComparison = Boolean.valueOf(isSetObjectType()).compareTo(typedOther.isSetObjectType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetObjectType()) { + lastComparison = TBaseHelper.compareTo(this.objectType, typedOther.objectType); + if (lastComparison != 0) { + return lastComparison; + } + } + 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(isSetObjectName()).compareTo(typedOther.isSetObjectName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetObjectName()) { + lastComparison = TBaseHelper.compareTo(this.objectName, typedOther.objectName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartValues()).compareTo(typedOther.isSetPartValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartValues()) { + lastComparison = TBaseHelper.compareTo(this.partValues, typedOther.partValues); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(typedOther.isSetColumnName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnName()) { + lastComparison = TBaseHelper.compareTo(this.columnName, typedOther.columnName); + 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: // OBJECT_TYPE + if (field.type == TType.I32) { + this.objectType = HiveObjectType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DB_NAME + if (field.type == TType.STRING) { + this.dbName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // OBJECT_NAME + if (field.type == TType.STRING) { + this.objectName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // PART_VALUES + if (field.type == TType.LIST) { + { + TList _list4 = iprot.readListBegin(); + this.partValues = new ArrayList(_list4.size); + for (int _i5 = 0; _i5 < _list4.size; ++_i5) + { + String _elem6; + _elem6 = iprot.readString(); + this.partValues.add(_elem6); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // COLUMN_NAME + if (field.type == TType.STRING) { + this.columnName = 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.objectType != null) { + oprot.writeFieldBegin(OBJECT_TYPE_FIELD_DESC); + oprot.writeI32(this.objectType.getValue()); + oprot.writeFieldEnd(); + } + if (this.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.dbName); + oprot.writeFieldEnd(); + } + if (this.objectName != null) { + oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC); + oprot.writeString(this.objectName); + oprot.writeFieldEnd(); + } + if (this.partValues != null) { + oprot.writeFieldBegin(PART_VALUES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.partValues.size())); + for (String _iter7 : this.partValues) + { + oprot.writeString(_iter7); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.columnName != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(this.columnName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("HiveObjectRef("); + boolean first = true; + + sb.append("objectType:"); + if (this.objectType == null) { + sb.append("null"); + } else { + sb.append(this.objectType); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("objectName:"); + if (this.objectName == null) { + sb.append("null"); + } else { + sb.append(this.objectName); + } + first = false; + if (!first) sb.append(", "); + sb.append("partValues:"); + if (this.partValues == null) { + sb.append("null"); + } else { + sb.append(this.partValues); + } + first = false; + if (!first) sb.append(", "); + sb.append("columnName:"); + if (this.columnName == null) { + sb.append("null"); + } else { + sb.append(this.columnName); + } + 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/HiveObjectType.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java (revision 0) @@ -0,0 +1,53 @@ +/** + * 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.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum HiveObjectType implements TEnum { + GLOBAL(1), + DATABASE(2), + TABLE(3), + PARTITION(4), + COLUMN(5); + + private final int value; + + private HiveObjectType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static HiveObjectType findByValue(int value) { + switch (value) { + case 1: + return GLOBAL; + case 2: + return DATABASE; + case 3: + return TABLE; + case 4: + return PARTITION; + case 5: + return COLUMN; + default: + return null; + } + } +} 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 1057802) +++ 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 _map84 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map84.size); + for (int _i85 = 0; _i85 < _map84.size; ++_i85) { - String _key51; - String _val52; - _key51 = iprot.readString(); - _val52 = iprot.readString(); - this.parameters.put(_key51, _val52); + String _key86; + String _val87; + _key86 = iprot.readString(); + _val87 = iprot.readString(); + this.parameters.put(_key86, _val87); } 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 _iter88 : this.parameters.entrySet()) { - oprot.writeString(_iter53.getKey()); - oprot.writeString(_iter53.getValue()); + oprot.writeString(_iter88.getKey()); + oprot.writeString(_iter88.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 1057802) +++ 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 _list75 = iprot.readListBegin(); + this.values = new ArrayList(_list75.size); + for (int _i76 = 0; _i76 < _list75.size; ++_i76) { - String _elem42; - _elem42 = iprot.readString(); - this.values.add(_elem42); + String _elem77; + _elem77 = iprot.readString(); + this.values.add(_elem77); } 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 _map78 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map78.size); + for (int _i79 = 0; _i79 < _map78.size; ++_i79) { - String _key45; - String _val46; - _key45 = iprot.readString(); - _val46 = iprot.readString(); - this.parameters.put(_key45, _val46); + String _key80; + String _val81; + _key80 = iprot.readString(); + _val81 = iprot.readString(); + this.parameters.put(_key80, _val81); } 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 _iter82 : this.values) { - oprot.writeString(_iter47); + oprot.writeString(_iter82); } 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 _iter83 : this.parameters.entrySet()) { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); + oprot.writeString(_iter83.getKey()); + oprot.writeString(_iter83.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,683 @@ +/** + * 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 ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, PrivilegeGrantInfo.class))))); + tmpMap.put(_Fields.GROUP_PRIVILEGES, new FieldMetaData("groupPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, PrivilegeGrantInfo.class))))); + tmpMap.put(_Fields.ROLE_PRIVILEGES, new FieldMetaData("rolePrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, PrivilegeGrantInfo.class))))); + 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(); + List other_element_value = other_element.getValue(); + + String __this__userPrivileges_copy_key = other_element_key; + + List __this__userPrivileges_copy_value = new ArrayList(); + for (PrivilegeGrantInfo other_element_value_element : other_element_value) { + __this__userPrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); + } + + __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(); + List other_element_value = other_element.getValue(); + + String __this__groupPrivileges_copy_key = other_element_key; + + List __this__groupPrivileges_copy_value = new ArrayList(); + for (PrivilegeGrantInfo other_element_value_element : other_element_value) { + __this__groupPrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); + } + + __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(); + List other_element_value = other_element.getValue(); + + String __this__rolePrivileges_copy_key = other_element_key; + + List __this__rolePrivileges_copy_value = new ArrayList(); + for (PrivilegeGrantInfo other_element_value_element : other_element_value) { + __this__rolePrivileges_copy_value.add(new PrivilegeGrantInfo(other_element_value_element)); + } + + __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, List 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, List 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, List 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 _map12 = iprot.readMapBegin(); + this.userPrivileges = new HashMap>(2*_map12.size); + for (int _i13 = 0; _i13 < _map12.size; ++_i13) + { + String _key14; + List _val15; + _key14 = iprot.readString(); + { + TList _list16 = iprot.readListBegin(); + _val15 = new ArrayList(_list16.size); + for (int _i17 = 0; _i17 < _list16.size; ++_i17) + { + PrivilegeGrantInfo _elem18; + _elem18 = new PrivilegeGrantInfo(); + _elem18.read(iprot); + _val15.add(_elem18); + } + iprot.readListEnd(); + } + this.userPrivileges.put(_key14, _val15); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // GROUP_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map19 = iprot.readMapBegin(); + this.groupPrivileges = new HashMap>(2*_map19.size); + for (int _i20 = 0; _i20 < _map19.size; ++_i20) + { + String _key21; + List _val22; + _key21 = iprot.readString(); + { + TList _list23 = iprot.readListBegin(); + _val22 = new ArrayList(_list23.size); + for (int _i24 = 0; _i24 < _list23.size; ++_i24) + { + PrivilegeGrantInfo _elem25; + _elem25 = new PrivilegeGrantInfo(); + _elem25.read(iprot); + _val22.add(_elem25); + } + iprot.readListEnd(); + } + this.groupPrivileges.put(_key21, _val22); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // ROLE_PRIVILEGES + if (field.type == TType.MAP) { + { + TMap _map26 = iprot.readMapBegin(); + this.rolePrivileges = new HashMap>(2*_map26.size); + for (int _i27 = 0; _i27 < _map26.size; ++_i27) + { + String _key28; + List _val29; + _key28 = iprot.readString(); + { + TList _list30 = iprot.readListBegin(); + _val29 = new ArrayList(_list30.size); + for (int _i31 = 0; _i31 < _list30.size; ++_i31) + { + PrivilegeGrantInfo _elem32; + _elem32 = new PrivilegeGrantInfo(); + _elem32.read(iprot); + _val29.add(_elem32); + } + iprot.readListEnd(); + } + this.rolePrivileges.put(_key28, _val29); + } + 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.LIST, this.userPrivileges.size())); + for (Map.Entry> _iter33 : this.userPrivileges.entrySet()) + { + oprot.writeString(_iter33.getKey()); + { + oprot.writeListBegin(new TList(TType.STRUCT, _iter33.getValue().size())); + for (PrivilegeGrantInfo _iter34 : _iter33.getValue()) + { + _iter34.write(oprot); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.groupPrivileges != null) { + oprot.writeFieldBegin(GROUP_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.LIST, this.groupPrivileges.size())); + for (Map.Entry> _iter35 : this.groupPrivileges.entrySet()) + { + oprot.writeString(_iter35.getKey()); + { + oprot.writeListBegin(new TList(TType.STRUCT, _iter35.getValue().size())); + for (PrivilegeGrantInfo _iter36 : _iter35.getValue()) + { + _iter36.write(oprot); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.rolePrivileges != null) { + oprot.writeFieldBegin(ROLE_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.LIST, this.rolePrivileges.size())); + for (Map.Entry> _iter37 : this.rolePrivileges.entrySet()) + { + oprot.writeString(_iter37.getKey()); + { + oprot.writeListBegin(new TList(TType.STRUCT, _iter37.getValue().size())); + for (PrivilegeGrantInfo _iter38 : _iter37.getValue()) + { + _iter38.write(oprot); + } + oprot.writeListEnd(); + } + } + 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/PrincipalType.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalType.java (revision 0) @@ -0,0 +1,47 @@ +/** + * 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.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum PrincipalType implements TEnum { + USER(1), + ROLE(2), + GROUP(3); + + private final int value; + + private PrincipalType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static PrincipalType findByValue(int value) { + switch (value) { + case 1: + return USER; + case 2: + return ROLE; + case 3: + return GROUP; + default: + return null; + } + } +} 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,344 @@ +/** + * 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 PRIVILEGES_FIELD_DESC = new TField("privileges", TType.LIST, (short)1); + + private List privileges; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PRIVILEGES((short)1, "privileges"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // PRIVILEGES + return PRIVILEGES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, HiveObjectPrivilege.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(PrivilegeBag.class, metaDataMap); + } + + public PrivilegeBag() { + } + + public PrivilegeBag( + List privileges) + { + this(); + this.privileges = privileges; + } + + /** + * Performs a deep copy on other. + */ + public PrivilegeBag(PrivilegeBag other) { + if (other.isSetPrivileges()) { + List __this__privileges = new ArrayList(); + for (HiveObjectPrivilege other_element : other.privileges) { + __this__privileges.add(new HiveObjectPrivilege(other_element)); + } + this.privileges = __this__privileges; + } + } + + public PrivilegeBag deepCopy() { + return new PrivilegeBag(this); + } + + @Override + public void clear() { + this.privileges = null; + } + + public int getPrivilegesSize() { + return (this.privileges == null) ? 0 : this.privileges.size(); + } + + public java.util.Iterator getPrivilegesIterator() { + return (this.privileges == null) ? null : this.privileges.iterator(); + } + + public void addToPrivileges(HiveObjectPrivilege elem) { + if (this.privileges == null) { + this.privileges = new ArrayList(); + } + this.privileges.add(elem); + } + + public List getPrivileges() { + return this.privileges; + } + + public void setPrivileges(List 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 PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIVILEGES: + return getPrivileges(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case PRIVILEGES: + return isSetPrivileges(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrivilegeBag) + return this.equals((PrivilegeBag)that); + return false; + } + + public boolean equals(PrivilegeBag that) { + if (that == null) + return false; + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + 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(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; + } + + 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: // PRIVILEGES + if (field.type == TType.LIST) { + { + TList _list8 = iprot.readListBegin(); + this.privileges = new ArrayList(_list8.size); + for (int _i9 = 0; _i9 < _list8.size; ++_i9) + { + HiveObjectPrivilege _elem10; + _elem10 = new HiveObjectPrivilege(); + _elem10.read(iprot); + this.privileges.add(_elem10); + } + 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.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.privileges.size())); + for (HiveObjectPrivilege _iter11 : this.privileges) + { + _iter11.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("PrivilegeBag("); + boolean first = true; + + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + 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/PrivilegeGrantInfo.java =================================================================== --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java (revision 0) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java (revision 0) @@ -0,0 +1,663 @@ +/** + * 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 PrivilegeGrantInfo implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("PrivilegeGrantInfo"); + + private static final TField PRIVILEGE_FIELD_DESC = new TField("privilege", TType.STRING, (short)1); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)2); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)3); + private static final TField GRANTOR_TYPE_FIELD_DESC = new TField("grantorType", TType.I32, (short)4); + private static final TField GRANT_OPTION_FIELD_DESC = new TField("grantOption", TType.BOOL, (short)5); + + private String privilege; + private int createTime; + private String grantor; + private PrincipalType grantorType; + private boolean grantOption; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PRIVILEGE((short)1, "privilege"), + CREATE_TIME((short)2, "createTime"), + GRANTOR((short)3, "grantor"), + /** + * + * @see PrincipalType + */ + GRANTOR_TYPE((short)4, "grantorType"), + GRANT_OPTION((short)5, "grantOption"); + + 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: // PRIVILEGE + return PRIVILEGE; + case 2: // CREATE_TIME + return CREATE_TIME; + case 3: // GRANTOR + return GRANTOR; + case 4: // GRANTOR_TYPE + return GRANTOR_TYPE; + case 5: // GRANT_OPTION + return GRANT_OPTION; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + private static final int __GRANTOPTION_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.PRIVILEGE, new FieldMetaData("privilege", 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.GRANTOR_TYPE, new FieldMetaData("grantorType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANT_OPTION, new FieldMetaData("grantOption", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(PrivilegeGrantInfo.class, metaDataMap); + } + + public PrivilegeGrantInfo() { + } + + public PrivilegeGrantInfo( + String privilege, + int createTime, + String grantor, + PrincipalType grantorType, + boolean grantOption) + { + this(); + this.privilege = privilege; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + setGrantOptionIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public PrivilegeGrantInfo(PrivilegeGrantInfo other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetPrivilege()) { + this.privilege = other.privilege; + } + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetGrantorType()) { + this.grantorType = other.grantorType; + } + this.grantOption = other.grantOption; + } + + public PrivilegeGrantInfo deepCopy() { + return new PrivilegeGrantInfo(this); + } + + @Override + public void clear() { + this.privilege = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.grantor = null; + this.grantorType = null; + setGrantOptionIsSet(false); + this.grantOption = false; + } + + public String getPrivilege() { + return this.privilege; + } + + public void setPrivilege(String privilege) { + this.privilege = privilege; + } + + public void unsetPrivilege() { + this.privilege = null; + } + + /** Returns true if field privilege is set (has been asigned a value) and false otherwise */ + public boolean isSetPrivilege() { + return this.privilege != null; + } + + public void setPrivilegeIsSet(boolean value) { + if (!value) { + this.privilege = 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; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getGrantorType() { + return this.grantorType; + } + + /** + * + * @see PrincipalType + */ + public void setGrantorType(PrincipalType grantorType) { + this.grantorType = grantorType; + } + + public void unsetGrantorType() { + this.grantorType = null; + } + + /** Returns true if field grantorType is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantorType() { + return this.grantorType != null; + } + + public void setGrantorTypeIsSet(boolean value) { + if (!value) { + this.grantorType = null; + } + } + + public boolean isGrantOption() { + return this.grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + setGrantOptionIsSet(true); + } + + public void unsetGrantOption() { + __isset_bit_vector.clear(__GRANTOPTION_ISSET_ID); + } + + /** Returns true if field grantOption is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantOption() { + return __isset_bit_vector.get(__GRANTOPTION_ISSET_ID); + } + + public void setGrantOptionIsSet(boolean value) { + __isset_bit_vector.set(__GRANTOPTION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIVILEGE: + if (value == null) { + unsetPrivilege(); + } else { + setPrivilege((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 GRANTOR_TYPE: + if (value == null) { + unsetGrantorType(); + } else { + setGrantorType((PrincipalType)value); + } + break; + + case GRANT_OPTION: + if (value == null) { + unsetGrantOption(); + } else { + setGrantOption((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case PRIVILEGE: + return getPrivilege(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + case GRANTOR_TYPE: + return getGrantorType(); + + case GRANT_OPTION: + return new Boolean(isGrantOption()); + + } + 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 PRIVILEGE: + return isSetPrivilege(); + case CREATE_TIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + case GRANTOR_TYPE: + return isSetGrantorType(); + case GRANT_OPTION: + return isSetGrantOption(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrivilegeGrantInfo) + return this.equals((PrivilegeGrantInfo)that); + return false; + } + + public boolean equals(PrivilegeGrantInfo that) { + if (that == null) + return false; + + boolean this_present_privilege = true && this.isSetPrivilege(); + boolean that_present_privilege = true && that.isSetPrivilege(); + if (this_present_privilege || that_present_privilege) { + if (!(this_present_privilege && that_present_privilege)) + return false; + if (!this.privilege.equals(that.privilege)) + 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_grantorType = true && this.isSetGrantorType(); + boolean that_present_grantorType = true && that.isSetGrantorType(); + if (this_present_grantorType || that_present_grantorType) { + if (!(this_present_grantorType && that_present_grantorType)) + return false; + if (!this.grantorType.equals(that.grantorType)) + return false; + } + + boolean this_present_grantOption = true; + boolean that_present_grantOption = true; + if (this_present_grantOption || that_present_grantOption) { + if (!(this_present_grantOption && that_present_grantOption)) + return false; + if (this.grantOption != that.grantOption) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(PrivilegeGrantInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + PrivilegeGrantInfo typedOther = (PrivilegeGrantInfo)other; + + lastComparison = Boolean.valueOf(isSetPrivilege()).compareTo(typedOther.isSetPrivilege()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivilege()) { + lastComparison = TBaseHelper.compareTo(this.privilege, typedOther.privilege); + 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(isSetGrantorType()).compareTo(typedOther.isSetGrantorType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantorType()) { + lastComparison = TBaseHelper.compareTo(this.grantorType, typedOther.grantorType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(typedOther.isSetGrantOption()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantOption()) { + lastComparison = TBaseHelper.compareTo(this.grantOption, typedOther.grantOption); + 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: // PRIVILEGE + if (field.type == TType.STRING) { + this.privilege = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // GRANTOR + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // GRANTOR_TYPE + if (field.type == TType.I32) { + this.grantorType = PrincipalType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // GRANT_OPTION + if (field.type == TType.BOOL) { + this.grantOption = iprot.readBool(); + setGrantOptionIsSet(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.privilege != null) { + oprot.writeFieldBegin(PRIVILEGE_FIELD_DESC); + oprot.writeString(this.privilege); + 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.grantorType != null) { + oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); + oprot.writeI32(this.grantorType.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeBool(this.grantOption); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("PrivilegeGrantInfo("); + boolean first = true; + + sb.append("privilege:"); + if (this.privilege == null) { + sb.append("null"); + } else { + sb.append(this.privilege); + } + 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("grantorType:"); + if (this.grantorType == null) { + sb.append("null"); + } else { + sb.append(this.grantorType); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantOption:"); + sb.append(this.grantOption); + 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,480 @@ +/** + * 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 CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)2); + private static final TField OWNER_NAME_FIELD_DESC = new TField("ownerName", TType.STRING, (short)3); + + private String roleName; + private int createTime; + private String ownerName; + + /** 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"), + CREATE_TIME((short)2, "createTime"), + OWNER_NAME((short)3, "ownerName"); + + 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: // CREATE_TIME + return CREATE_TIME; + case 3: // OWNER_NAME + return OWNER_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 __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.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))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Role.class, metaDataMap); + } + + public Role() { + } + + public Role( + String roleName, + int createTime, + String ownerName) + { + this(); + this.roleName = roleName; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.ownerName = ownerName; + } + + /** + * 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; + } + this.createTime = other.createTime; + if (other.isSetOwnerName()) { + this.ownerName = other.ownerName; + } + } + + public Role deepCopy() { + return new Role(this); + } + + @Override + public void clear() { + this.roleName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + this.ownerName = 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 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRoleName(); + } else { + setRoleName((String)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; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROLE_NAME: + return getRoleName(); + + case CREATE_TIME: + return new Integer(getCreateTime()); + + case OWNER_NAME: + return getOwnerName(); + + } + 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 CREATE_TIME: + return isSetCreateTime(); + case OWNER_NAME: + return isSetOwnerName(); + } + 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_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; + } + + 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(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; + } + } + 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: // CREATE_TIME + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + setCreateTimeIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // OWNER_NAME + if (field.type == TType.STRING) { + this.ownerName = 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.roleName != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.roleName); + 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(); + } + 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("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; + 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 1057802) +++ 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 _list89 = iprot.readListBegin(); + this.fieldSchemas = new ArrayList(_list89.size); + for (int _i90 = 0; _i90 < _list89.size; ++_i90) { - FieldSchema _elem56; - _elem56 = new FieldSchema(); - _elem56.read(iprot); - this.fieldSchemas.add(_elem56); + FieldSchema _elem91; + _elem91 = new FieldSchema(); + _elem91.read(iprot); + this.fieldSchemas.add(_elem91); } 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 _map92 = iprot.readMapBegin(); + this.properties = new HashMap(2*_map92.size); + for (int _i93 = 0; _i93 < _map92.size; ++_i93) { - String _key59; - String _val60; - _key59 = iprot.readString(); - _val60 = iprot.readString(); - this.properties.put(_key59, _val60); + String _key94; + String _val95; + _key94 = iprot.readString(); + _val95 = iprot.readString(); + this.properties.put(_key94, _val95); } 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 _iter96 : this.fieldSchemas) { - _iter61.write(oprot); + _iter96.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 _iter97 : this.properties.entrySet()) { - oprot.writeString(_iter62.getKey()); - oprot.writeString(_iter62.getValue()); + oprot.writeString(_iter97.getKey()); + oprot.writeString(_iter97.getValue()); } oprot.writeMapEnd(); } 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 1057802) +++ 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 _map44 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map44.size); + for (int _i45 = 0; _i45 < _map44.size; ++_i45) { - String _key11; - String _val12; - _key11 = iprot.readString(); - _val12 = iprot.readString(); - this.parameters.put(_key11, _val12); + String _key46; + String _val47; + _key46 = iprot.readString(); + _val47 = iprot.readString(); + this.parameters.put(_key46, _val47); } 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 _iter48 : this.parameters.entrySet()) { - oprot.writeString(_iter13.getKey()); - oprot.writeString(_iter13.getValue()); + oprot.writeString(_iter48.getKey()); + oprot.writeString(_iter48.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 1057802) +++ 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 _list49 = iprot.readListBegin(); + this.cols = new ArrayList(_list49.size); + for (int _i50 = 0; _i50 < _list49.size; ++_i50) { - FieldSchema _elem16; - _elem16 = new FieldSchema(); - _elem16.read(iprot); - this.cols.add(_elem16); + FieldSchema _elem51; + _elem51 = new FieldSchema(); + _elem51.read(iprot); + this.cols.add(_elem51); } 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 _list52 = iprot.readListBegin(); + this.bucketCols = new ArrayList(_list52.size); + for (int _i53 = 0; _i53 < _list52.size; ++_i53) { - String _elem19; - _elem19 = iprot.readString(); - this.bucketCols.add(_elem19); + String _elem54; + _elem54 = iprot.readString(); + this.bucketCols.add(_elem54); } 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 _list55 = iprot.readListBegin(); + this.sortCols = new ArrayList(_list55.size); + for (int _i56 = 0; _i56 < _list55.size; ++_i56) { - Order _elem22; - _elem22 = new Order(); - _elem22.read(iprot); - this.sortCols.add(_elem22); + Order _elem57; + _elem57 = new Order(); + _elem57.read(iprot); + this.sortCols.add(_elem57); } 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 _map58 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map58.size); + for (int _i59 = 0; _i59 < _map58.size; ++_i59) { - String _key25; - String _val26; - _key25 = iprot.readString(); - _val26 = iprot.readString(); - this.parameters.put(_key25, _val26); + String _key60; + String _val61; + _key60 = iprot.readString(); + _val61 = iprot.readString(); + this.parameters.put(_key60, _val61); } 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 _iter62 : this.cols) { - _iter27.write(oprot); + _iter62.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 _iter63 : this.bucketCols) { - oprot.writeString(_iter28); + oprot.writeString(_iter63); } 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 _iter64 : this.sortCols) { - _iter29.write(oprot); + _iter64.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 _iter65 : this.parameters.entrySet()) { - oprot.writeString(_iter30.getKey()); - oprot.writeString(_iter30.getValue()); + oprot.writeString(_iter65.getKey()); + oprot.writeString(_iter65.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 1057802) +++ 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 _list66 = iprot.readListBegin(); + this.partitionKeys = new ArrayList(_list66.size); + for (int _i67 = 0; _i67 < _list66.size; ++_i67) { - FieldSchema _elem33; - _elem33 = new FieldSchema(); - _elem33.read(iprot); - this.partitionKeys.add(_elem33); + FieldSchema _elem68; + _elem68 = new FieldSchema(); + _elem68.read(iprot); + this.partitionKeys.add(_elem68); } 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 _map69 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map69.size); + for (int _i70 = 0; _i70 < _map69.size; ++_i70) { - String _key36; - String _val37; - _key36 = iprot.readString(); - _val37 = iprot.readString(); - this.parameters.put(_key36, _val37); + String _key71; + String _val72; + _key71 = iprot.readString(); + _val72 = iprot.readString(); + this.parameters.put(_key71, _val72); } 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 _iter73 : this.partitionKeys) { - _iter38.write(oprot); + _iter73.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 _iter74 : this.parameters.entrySet()) { - oprot.writeString(_iter39.getKey()); - oprot.writeString(_iter39.getValue()); + oprot.writeString(_iter74.getKey()); + oprot.writeString(_iter74.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 1057802) +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -81,14 +81,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; @@ -113,6 +119,24 @@ public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, TException; + public boolean create_role(Role role) throws MetaException, TException; + + public boolean drop_role(String role_name) throws MetaException, TException; + + public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, TException; + + public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, TException; + + public List list_roles(String principal_name, PrincipalType principal_type) throws MetaException, TException; + + public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws MetaException, TException; + + public List list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, TException; + + public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, TException; + + public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, TException; + } public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface { @@ -165,14 +189,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; @@ -197,6 +227,24 @@ public void get_index_names(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException; + public void create_role(Role role, AsyncMethodCallback resultHandler) throws TException; + + public void drop_role(String role_name, AsyncMethodCallback resultHandler) throws TException; + + public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, AsyncMethodCallback resultHandler) throws TException; + + public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, AsyncMethodCallback resultHandler) throws TException; + + public void list_roles(String principal_name, PrincipalType principal_type, AsyncMethodCallback resultHandler) throws TException; + + public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException; + + public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, AsyncMethodCallback resultHandler) throws TException; + + public void grant_privileges(PrivilegeBag privileges, AsyncMethodCallback resultHandler) throws TException; + + public void revoke_privileges(PrivilegeBag privileges, AsyncMethodCallback resultHandler) throws TException; + } public static class Client extends com.facebook.fb303.FacebookService.Client implements TServiceClient, Iface { @@ -1246,6 +1294,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); @@ -1334,6 +1428,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); @@ -1417,6 +1557,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); @@ -1925,217 +2112,580 @@ 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 boolean create_role(Role role) throws MetaException, TException + { + send_create_role(role); + return recv_create_role(); + } + + public void send_create_role(Role role) throws TException + { + oprot_.writeMessageBegin(new TMessage("create_role", TMessageType.CALL, ++seqid_)); + create_role_args args = new create_role_args(); + args.setRole(role); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + 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 AsyncClient getAsyncClient(TNonblockingTransport transport) { - return new AsyncClient(protocolFactory, clientManager, transport); + 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 AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { - super(protocolFactory, clientManager, transport); + public boolean drop_role(String role_name) throws MetaException, TException + { + send_drop_role(role_name); + return recv_drop_role(); } - 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_drop_role(String role_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.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 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 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, "drop_role 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(); + 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_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 boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, TException + { + send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option); + return recv_grant_role(); } - 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_grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws TException + { + oprot_.writeMessageBegin(new TMessage("grant_role", TMessageType.CALL, ++seqid_)); + grant_role_args args = new grant_role_args(); + args.setRole_name(role_name); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.setGrantor(grantor); + args.setGrantorType(grantorType); + args.setGrant_option(grant_option); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - 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(); + public boolean recv_grant_role() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - - 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(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "grant_role failed: out of sequence response"); + } + grant_role_result result = new grant_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, "grant_role 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 boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, TException + { + send_revoke_role(role_name, principal_name, principal_type); + return recv_revoke_role(); } - 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_revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws TException + { + oprot_.writeMessageBegin(new TMessage("revoke_role", TMessageType.CALL, ++seqid_)); + revoke_role_args args = new revoke_role_args(); + args.setRole_name(role_name); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + 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 boolean recv_revoke_role() 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, "revoke_role failed: out of sequence response"); } + revoke_role_result result = new revoke_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, "revoke_role failed: unknown result"); } - 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 List list_roles(String principal_name, PrincipalType principal_type) throws MetaException, TException + { + send_list_roles(principal_name, principal_type); + return recv_list_roles(); } - 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; - } + public void send_list_roles(String principal_name, PrincipalType principal_type) 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.setPrincipal_type(principal_type); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - 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(); + 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, 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(); + 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 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 PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws MetaException, TException + { + send_get_privilege_set(hiveObject, user_name, group_names); + return recv_get_privilege_set(); } - 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 void send_get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.CALL, ++seqid_)); + get_privilege_set_args args = new get_privilege_set_args(); + args.setHiveObject(hiveObject); + 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_all_databases", TMessageType.CALL, 0)); - get_all_databases_args args = new get_all_databases_args(); - args.write(prot); - prot.writeMessageEnd(); + public PrincipalPrivilegeSet recv_get_privilege_set() 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_databases(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_privilege_set failed: out of sequence response"); + } + get_privilege_set_result result = new get_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_privilege_set failed: unknown result"); } - public void alter_database(String dbname, Database db, AsyncMethodCallback resultHandler) throws TException { - checkReady(); - alter_database_call method_call = new alter_database_call(dbname, db, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + public List list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, TException + { + send_list_privileges(principal_name, principal_type, hiveObject); + return recv_list_privileges(); } - public static class alter_database_call extends TAsyncMethodCall { - private String dbname; - private Database db; - public alter_database_call(String dbname, Database db, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { - super(client, protocolFactory, transport, resultHandler, false); - this.dbname = dbname; - this.db = db; - } + public void send_list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_privileges", TMessageType.CALL, ++seqid_)); + list_privileges_args args = new list_privileges_args(); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.setHiveObject(hiveObject); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("alter_database", TMessageType.CALL, 0)); - alter_database_args args = new alter_database_args(); - args.setDbname(dbname); - args.setDb(db); - args.write(prot); - prot.writeMessageEnd(); + public List recv_list_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 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_database(); + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "list_privileges failed: out of sequence response"); } + list_privileges_result result = new list_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, "list_privileges 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 boolean grant_privileges(PrivilegeBag privileges) throws MetaException, TException + { + send_grant_privileges(privileges); + return recv_grant_privileges(); + } + + public void send_grant_privileges(PrivilegeBag privileges) throws TException + { + oprot_.writeMessageBegin(new TMessage("grant_privileges", TMessageType.CALL, ++seqid_)); + grant_privileges_args args = new grant_privileges_args(); + args.setPrivileges(privileges); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + 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; + } + 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 boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, TException + { + send_revoke_privileges(privileges); + return recv_revoke_privileges(); + } + + public void send_revoke_privileges(PrivilegeBag privileges) throws TException + { + oprot_.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.CALL, ++seqid_)); + revoke_privileges_args args = new revoke_privileges_args(); + args.setPrivileges(privileges); + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + 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 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(); + create_database_call method_call = new create_database_call(database, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + 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 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(); + } + + 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(); + } + } + + 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 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 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(); + } + + 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(); + } + } + + 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 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 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 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(); + } + } + + 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; + } + + 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(); + } + + 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 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 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 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(); + } + + 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(); + } + } + + public void alter_database(String dbname, Database db, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + alter_database_call method_call = new alter_database_call(dbname, db, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class alter_database_call extends TAsyncMethodCall { + private String dbname; + private Database db; + public alter_database_call(String dbname, Database db, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.db = db; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("alter_database", TMessageType.CALL, 0)); + alter_database_args args = new alter_database_args(); + args.setDbname(dbname); + args.setDb(db); + args.write(prot); + prot.writeMessageEnd(); + } + + public void 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); + (new Client(prot)).recv_alter_database(); + } + } + + 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 static class get_type_call extends TAsyncMethodCall { @@ -2750,26 +3300,69 @@ } } - public void get_partition_by_name(String db_name, String tbl_name, String part_name, 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 { 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_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); } - public static class get_partition_by_name_call extends TAsyncMethodCall { + public static class get_partition_with_auth_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 { + 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_name = part_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_by_name", TMessageType.CALL, 0)); - get_partition_by_name_args args = new get_partition_by_name_args(); + 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!"); + } + 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); + } + + 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); @@ -2824,6 +3417,49 @@ } } + 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); + } + + 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!"); + } + 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); @@ -2901,6 +3537,52 @@ } } + 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); + } + + 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(); + } + + public List 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_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); @@ -3339,376 +4021,422 @@ } } - } - - 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("alter_database", new alter_database()); - 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 create_role(Role role, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + create_role_call method_call = new create_role_call(role, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private Iface iface_; + public static class create_role_call extends TAsyncMethodCall { + private Role role; + public create_role_call(Role role, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role = role; + } - 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("create_role", TMessageType.CALL, 0)); + create_role_args args = new create_role_args(); + args.setRole(role); + 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 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_create_role(); } + } + public void drop_role(String role_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_role_call method_call = new drop_role_call(role_name, 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; - } - oprot.writeMessageBegin(new TMessage("get_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class drop_role_call extends TAsyncMethodCall { + private String role_name; + public drop_role_call(String role_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_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.write(prot); + prot.writeMessageEnd(); + } - 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 boolean getResult() throws MetaException, 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_drop_role(); } + } + public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + grant_role_call method_call = new grant_role_call(role_name, principal_name, principal_type, grantor, grantorType, grant_option, 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; - } - oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public static class grant_role_call extends TAsyncMethodCall { + private String role_name; + private String principal_name; + private PrincipalType principal_type; + private String grantor; + private PrincipalType grantorType; + private boolean grant_option; + public grant_role_call(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + this.principal_name = principal_name; + this.principal_type = principal_type; + this.grantor = grantor; + this.grantorType = grantorType; + this.grant_option = grant_option; } - } + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("grant_role", TMessageType.CALL, 0)); + grant_role_args args = new grant_role_args(); + args.setRole_name(role_name); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.setGrantor(grantor); + args.setGrantorType(grantorType); + args.setGrant_option(grant_option); + args.write(prot); + prot.writeMessageEnd(); + } - 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; + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_all_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_grant_role(); } + } + public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + revoke_role_call method_call = new revoke_role_call(role_name, principal_name, principal_type, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class alter_database implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_database_args args = new alter_database_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("alter_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - alter_database_result result = new alter_database_result(); - try { - iface_.alter_database(args.dbname, args.db); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_database", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_database"); - oprot.writeMessageBegin(new TMessage("alter_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public static class revoke_role_call extends TAsyncMethodCall { + private String role_name; + private String principal_name; + private PrincipalType principal_type; + public revoke_role_call(String role_name, String principal_name, PrincipalType principal_type, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.role_name = role_name; + this.principal_name = principal_name; + this.principal_type = principal_type; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("revoke_role", TMessageType.CALL, 0)); + revoke_role_args args = new revoke_role_args(); + args.setRole_name(role_name); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("alter_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_revoke_role(); } + } + public void list_roles(String principal_name, PrincipalType principal_type, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + list_roles_call method_call = new list_roles_call(principal_name, principal_type, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - 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 static class list_roles_call extends TAsyncMethodCall { + private String principal_name; + private PrincipalType principal_type; + public list_roles_call(String principal_name, PrincipalType principal_type, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.principal_type = principal_type; + } + + 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.setPrincipal_type(principal_type); + 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", 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_list_roles(); } + } + public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List group_names, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_privilege_set_call method_call = new get_privilege_set_call(hiveObject, user_name, group_names, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class create_type implements ProcessFunction { + public static class get_privilege_set_call extends TAsyncMethodCall { + private HiveObjectRef hiveObject; + private String user_name; + private List group_names; + public get_privilege_set_call(HiveObjectRef hiveObject, String user_name, List group_names, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.hiveObject = hiveObject; + this.user_name = user_name; + this.group_names = group_names; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.CALL, 0)); + get_privilege_set_args args = new get_privilege_set_args(); + args.setHiveObject(hiveObject); + 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_privilege_set(); + } + } + + public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + list_privileges_call method_call = new list_privileges_call(principal_name, principal_type, hiveObject, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class list_privileges_call extends TAsyncMethodCall { + private String principal_name; + private PrincipalType principal_type; + private HiveObjectRef hiveObject; + public list_privileges_call(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.principal_name = principal_name; + this.principal_type = principal_type; + this.hiveObject = hiveObject; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("list_privileges", TMessageType.CALL, 0)); + list_privileges_args args = new list_privileges_args(); + args.setPrincipal_name(principal_name); + args.setPrincipal_type(principal_type); + args.setHiveObject(hiveObject); + 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_privileges(); + } + } + + public void grant_privileges(PrivilegeBag privileges, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + grant_privileges_call method_call = new grant_privileges_call(privileges, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class grant_privileges_call extends TAsyncMethodCall { + private PrivilegeBag privileges; + public grant_privileges_call(PrivilegeBag privileges, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.privileges = privileges; + } + + 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.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_grant_privileges(); + } + } + + public void revoke_privileges(PrivilegeBag privileges, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + revoke_privileges_call method_call = new revoke_privileges_call(privileges, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class revoke_privileges_call extends TAsyncMethodCall { + private PrivilegeBag privileges; + public revoke_privileges_call(PrivilegeBag privileges, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + 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.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 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("alter_database", new alter_database()); + 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("create_role", new create_role()); + processMap_.put("drop_role", new drop_role()); + processMap_.put("grant_role", new grant_role()); + processMap_.put("revoke_role", new revoke_role()); + processMap_.put("list_roles", new list_roles()); + processMap_.put("get_privilege_set", new get_privilege_set()); + processMap_.put("list_privileges", new list_privileges()); + processMap_.put("grant_privileges", new grant_privileges()); + processMap_.put("revoke_privileges", new revoke_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_type_args args = new create_type_args(); + 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_type", TMessageType.EXCEPTION, seqid)); + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); - create_type_result result = new create_type_result(); + create_database_result result = new create_database_result(); try { - result.success = iface_.create_type(args.type); - result.setSuccessIsSet(true); + iface_.create_database(args.database); } catch (AlreadyExistsException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { @@ -3716,15 +4444,15 @@ } 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)); + 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_type", TMessageType.REPLY, seqid)); + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); @@ -3732,40 +4460,39 @@ } - private class drop_type implements ProcessFunction { + private class get_database implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { - drop_type_args args = new drop_type_args(); + 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("drop_type", TMessageType.EXCEPTION, seqid)); + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); - drop_type_result result = new drop_type_result(); + get_database_result result = new get_database_result(); try { - result.success = iface_.drop_type(args.type); - result.setSuccessIsSet(true); - } catch (MetaException o1) { + result.success = iface_.get_database(args.name); + } catch (NoSuchObjectException o1) { result.o1 = o1; - } catch (NoSuchObjectException o2) { + } catch (MetaException 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)); + 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("drop_type", TMessageType.REPLY, seqid)); + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); @@ -3773,37 +4500,41 @@ } - private class get_type_all implements ProcessFunction { + private class drop_database implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { - get_type_all_args args = new get_type_all_args(); + 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("get_type_all", TMessageType.EXCEPTION, seqid)); + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); - get_type_all_result result = new get_type_all_result(); + drop_database_result result = new drop_database_result(); try { - result.success = iface_.get_type_all(args.name); - } catch (MetaException o2) { + 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 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)); + 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("get_type_all", TMessageType.REPLY, seqid)); + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); @@ -3811,41 +4542,37 @@ } - private class get_fields implements ProcessFunction { + private class get_databases implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { - get_fields_args args = new get_fields_args(); + 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_fields", TMessageType.EXCEPTION, seqid)); + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); - get_fields_result result = new get_fields_result(); + get_databases_result result = new get_databases_result(); try { - result.success = iface_.get_fields(args.db_name, args.table_name); + result.success = iface_.get_databases(args.pattern); } 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)); + 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_fields", TMessageType.REPLY, seqid)); + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); @@ -3853,16 +4580,298 @@ } - private class get_schema implements ProcessFunction { + private class get_all_databases implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { - get_schema_args args = new get_schema_args(); + 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_schema", TMessageType.EXCEPTION, seqid)); + 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 alter_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_database_args args = new alter_database_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("alter_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + alter_database_result result = new alter_database_result(); + try { + iface_.alter_database(args.dbname, args.db); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_database"); + oprot.writeMessageBegin(new TMessage("alter_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_database", 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(); @@ -4383,39 +5392,79 @@ } - private class get_partition_by_name implements ProcessFunction { + private class get_partition_with_auth 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(); + 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_by_name", TMessageType.EXCEPTION, seqid)); + oprot.writeMessageBegin(new TMessage("get_partition_with_auth", 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(); + get_partition_with_auth_result result = new get_partition_with_auth_result(); try { - result.success = iface_.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); + 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_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)); + 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_by_name", TMessageType.REPLY, seqid)); + 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(); @@ -4463,6 +5512,46 @@ } + 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 { @@ -4539,6 +5628,46 @@ } + 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 { @@ -4886,144 +6015,9636 @@ oprot.getTransport().flush(); return; } - oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + 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; + } + 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 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); + 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); + 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 grant_role implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + grant_role_args args = new grant_role_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("grant_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + grant_role_result result = new grant_role_result(); + try { + result.success = iface_.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing grant_role", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing grant_role"); + oprot.writeMessageBegin(new TMessage("grant_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("grant_role", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class revoke_role implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + revoke_role_args args = new revoke_role_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("revoke_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + revoke_role_result result = new revoke_role_result(); + try { + result.success = iface_.revoke_role(args.role_name, args.principal_name, args.principal_type); + result.setSuccessIsSet(true); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing revoke_role", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing revoke_role"); + oprot.writeMessageBegin(new TMessage("revoke_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("revoke_role", 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.principal_type); + } 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 get_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_privilege_set_args args = new get_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_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_privilege_set_result result = new get_privilege_set_result(); + try { + result.success = iface_.get_privilege_set(args.hiveObject, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_privileges implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_privileges_args args = new list_privileges_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("list_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + list_privileges_result result = new list_privileges_result(); + try { + result.success = iface_.list_privileges(args.principal_name, args.principal_type, args.hiveObject); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_privileges", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_privileges"); + oprot.writeMessageBegin(new TMessage("list_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_privileges", 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.privileges); + 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.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(); + } + + } + + } + + 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 _list98 = iprot.readListBegin(); + this.success = new ArrayList(_list98.size); + for (int _i99 = 0; _i99 < _list98.size; ++_i99) + { + String _elem100; + _elem100 = iprot.readString(); + this.success.add(_elem100); + } + 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 _iter101 : this.success) + { + oprot.writeString(_iter101); + } + 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 _list102 = iprot.readListBegin(); + this.success = new ArrayList(_list102.size); + for (int _i103 = 0; _i103 < _list102.size; ++_i103) + { + String _elem104; + _elem104 = iprot.readString(); + this.success.add(_elem104); + } + 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 _iter105 : this.success) + { + oprot.writeString(_iter105); + } + 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 alter_database_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_database_args"); + + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField DB_FIELD_DESC = new TField("db", TType.STRUCT, (short)2); + + private String dbname; + private Database db; + + /** 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"), + DB((short)2, "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: // DBNAME + return DBNAME; + case 2: // 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 + + 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.DB, new FieldMetaData("db", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(alter_database_args.class, metaDataMap); + } + + public alter_database_args() { + } + + public alter_database_args( + String dbname, + Database db) + { + this(); + this.dbname = dbname; + this.db = db; + } + + /** + * Performs a deep copy on other. + */ + public alter_database_args(alter_database_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetDb()) { + this.db = new Database(other.db); + } + } + + public alter_database_args deepCopy() { + return new alter_database_args(this); + } + + @Override + public void clear() { + this.dbname = null; + this.db = 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 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 DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case DB: + if (value == null) { + unsetDb(); + } else { + setDb((Database)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DBNAME: + return getDbname(); + + 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 DBNAME: + return isSetDbname(); + case DB: + return isSetDb(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_database_args) + return this.equals((alter_database_args)that); + return false; + } + + public boolean equals(alter_database_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_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(alter_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_database_args typedOther = (alter_database_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(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: // DBNAME + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // 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.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + 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("alter_database_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("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 + } + + } + + public static class alter_database_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_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 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 { + 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_database_result.class, metaDataMap); + } + + public alter_database_result() { + } + + public alter_database_result( + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_database_result(alter_database_result other) { + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public alter_database_result deepCopy() { + return new alter_database_result(this); + } + + @Override + public void clear() { + this.o1 = null; + this.o2 = 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 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 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_database_result) + return this.equals((alter_database_result)that); + return false; + } + + public boolean equals(alter_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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(alter_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_database_result typedOther = (alter_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; + } + } + 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 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.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_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; + 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 _map106 = iprot.readMapBegin(); + this.success = new HashMap(2*_map106.size); + for (int _i107 = 0; _i107 < _map106.size; ++_i107) + { + String _key108; + Type _val109; + _key108 = iprot.readString(); + _val109 = new Type(); + _val109.read(iprot); + this.success.put(_key108, _val109); + } + 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 _iter110 : this.success.entrySet()) + { + oprot.writeString(_iter110.getKey()); + _iter110.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 _list111 = iprot.readListBegin(); + this.success = new ArrayList(_list111.size); + for (int _i112 = 0; _i112 < _list111.size; ++_i112) + { + FieldSchema _elem113; + _elem113 = new FieldSchema(); + _elem113.read(iprot); + 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; + 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 _iter114 : this.success) + { + _iter114.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; + } } - - } - - 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; + 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; } - 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; + } + 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; } - oprot.writeMessageBegin(new TMessage("get_index_by_name", 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_indexes 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_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; + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; } - 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; + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list115 = iprot.readListBegin(); + this.success = new ArrayList(_list115.size); + for (int _i116 = 0; _i116 < _list115.size; ++_i116) + { + FieldSchema _elem117; + _elem117 = new FieldSchema(); + _elem117.read(iprot); + this.success.add(_elem117); + } + 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); } - oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + iprot.readFieldEnd(); } - + iprot.readStructEnd(); + validate(); } - 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; + 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 _iter118 : this.success) + { + _iter118.write(oprot); + } + oprot.writeListEnd(); } - oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + 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_database_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_database_args"); + 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 DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)1); + private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1); - private Database database; + private Table tbl; /** 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"); + TBL((short)1, "tbl"); private static final Map byName = new HashMap(); @@ -5038,8 +15659,8 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DATABASE - return DATABASE; + case 1: // TBL + return TBL; default: return null; } @@ -5084,70 +15705,70 @@ 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.TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); } - public create_database_args() { + public create_table_args() { } - public create_database_args( - Database database) + public create_table_args( + Table tbl) { this(); - this.database = database; + this.tbl = tbl; } /** * 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_table_args(create_table_args other) { + if (other.isSetTbl()) { + this.tbl = new Table(other.tbl); } } - public create_database_args deepCopy() { - return new create_database_args(this); + public create_table_args deepCopy() { + return new create_table_args(this); } @Override public void clear() { - this.database = null; + this.tbl = null; } - public Database getDatabase() { - return this.database; + public Table getTbl() { + return this.tbl; } - public void setDatabase(Database database) { - this.database = database; + public void setTbl(Table tbl) { + this.tbl = tbl; } - public void unsetDatabase() { - this.database = null; + public void unsetTbl() { + this.tbl = null; } - /** 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 tbl is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl() { + return this.tbl != null; } - public void setDatabaseIsSet(boolean value) { + public void setTblIsSet(boolean value) { if (!value) { - this.database = null; + this.tbl = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DATABASE: + case TBL: if (value == null) { - unsetDatabase(); + unsetTbl(); } else { - setDatabase((Database)value); + setTbl((Table)value); } break; @@ -5156,8 +15777,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DATABASE: - return getDatabase(); + case TBL: + return getTbl(); } throw new IllegalStateException(); @@ -5170,8 +15791,8 @@ } switch (field) { - case DATABASE: - return isSetDatabase(); + case TBL: + return isSetTbl(); } throw new IllegalStateException(); } @@ -5180,21 +15801,21 @@ 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 create_table_args) + return this.equals((create_table_args)that); return false; } - public boolean equals(create_database_args that) { + public boolean equals(create_table_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)) + 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.database.equals(that.database)) + if (!this.tbl.equals(that.tbl)) return false; } @@ -5206,20 +15827,20 @@ return 0; } - public int compareTo(create_database_args other) { + public int compareTo(create_table_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; + create_table_args typedOther = (create_table_args)other; - lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(typedOther.isSetDatabase()); + lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); if (lastComparison != 0) { return lastComparison; } - if (isSetDatabase()) { - lastComparison = TBaseHelper.compareTo(this.database, typedOther.database); + if (isSetTbl()) { + lastComparison = TBaseHelper.compareTo(this.tbl, typedOther.tbl); if (lastComparison != 0) { return lastComparison; } @@ -5241,10 +15862,10 @@ break; } switch (field.id) { - case 1: // DATABASE + case 1: // TBL if (field.type == TType.STRUCT) { - this.database = new Database(); - this.database.read(iprot); + this.tbl = new Table(); + this.tbl.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -5262,9 +15883,9 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.database != null) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - this.database.write(oprot); + if (this.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + this.tbl.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5273,14 +15894,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_database_args("); + StringBuilder sb = new StringBuilder("create_table_args("); boolean first = true; - sb.append("database:"); - if (this.database == null) { + sb.append("tbl:"); + if (this.tbl == null) { sb.append("null"); } else { - sb.append(this.database); + sb.append(this.tbl); } first = false; sb.append(")"); @@ -5293,22 +15914,25 @@ } - 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 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"); + O3((short)3, "o3"), + O4((short)4, "o4"); private static final Map byName = new HashMap(); @@ -5329,6 +15953,8 @@ return O2; case 3: // O3 return O3; + case 4: // O4 + return O4; default: return null; } @@ -5379,28 +16005,32 @@ 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_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); } - public create_database_result() { + public create_table_result() { } - public create_database_result( + public create_table_result( AlreadyExistsException o1, InvalidObjectException o2, - MetaException o3) + 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_database_result(create_database_result other) { + public create_table_result(create_table_result other) { if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); } @@ -5410,10 +16040,13 @@ if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } } - public create_database_result deepCopy() { - return new create_database_result(this); + public create_table_result deepCopy() { + return new create_table_result(this); } @Override @@ -5421,6 +16054,7 @@ this.o1 = null; this.o2 = null; this.o3 = null; + this.o4 = null; } public AlreadyExistsException getO1() { @@ -5492,6 +16126,29 @@ } } + 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: @@ -5518,6 +16175,14 @@ } break; + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + } } @@ -5532,6 +16197,9 @@ case O3: return getO3(); + case O4: + return getO4(); + } throw new IllegalStateException(); } @@ -5549,6 +16217,8 @@ return isSetO2(); case O3: return isSetO3(); + case O4: + return isSetO4(); } throw new IllegalStateException(); } @@ -5557,12 +16227,12 @@ 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 create_table_result) + return this.equals((create_table_result)that); return false; } - public boolean equals(create_database_result that) { + public boolean equals(create_table_result that) { if (that == null) return false; @@ -5593,6 +16263,15 @@ 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; } @@ -5601,13 +16280,13 @@ return 0; } - public int compareTo(create_database_result other) { + public int compareTo(create_table_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; + create_table_result typedOther = (create_table_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { @@ -5639,6 +16318,16 @@ 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; } @@ -5680,6 +16369,14 @@ 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); } @@ -5704,6 +16401,10 @@ 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(); @@ -5711,7 +16412,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_database_result("); + StringBuilder sb = new StringBuilder("create_table_result("); boolean first = true; sb.append("o1:"); @@ -5737,6 +16438,14 @@ 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(); } @@ -5747,16 +16456,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 drop_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_table_args"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + 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 { - NAME((short)1, "name"); + DBNAME((short)1, "dbname"), + NAME((short)2, "name"), + DELETE_DATA((short)3, "deleteData"); private static final Map byName = new HashMap(); @@ -5771,8 +16486,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME + case 1: // DBNAME + return DBNAME; + case 2: // NAME return NAME; + case 3: // DELETE_DATA + return DELETE_DATA; default: return null; } @@ -5813,42 +16532,85 @@ } // 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(get_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); } - public get_database_args() { + public drop_table_args() { } - public get_database_args( - String name) + 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 get_database_args(get_database_args 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 get_database_args deepCopy() { - return new get_database_args(this); + 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() { @@ -5868,14 +16630,44 @@ return this.name != null; } - public void setNameIsSet(boolean value) { - if (!value) { - 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(); @@ -5884,14 +16676,28 @@ } 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(); } @@ -5903,8 +16709,12 @@ } switch (field) { + case DBNAME: + return isSetDbname(); case NAME: return isSetName(); + case DELETE_DATA: + return isSetDeleteData(); } throw new IllegalStateException(); } @@ -5913,15 +16723,24 @@ 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 drop_table_args) + return this.equals((drop_table_args)that); return false; } - public boolean equals(get_database_args that) { + 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) { @@ -5931,6 +16750,15 @@ 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; } @@ -5939,14 +16767,24 @@ return 0; } - public int compareTo(get_database_args other) { + public int compareTo(drop_table_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; + 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; @@ -5957,6 +16795,16 @@ 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; } @@ -5974,13 +16822,28 @@ break; } switch (field.id) { - case 1: // NAME + 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); } @@ -5994,20 +16857,36 @@ 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("get_database_args("); + 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"); @@ -6015,6 +16894,10 @@ sb.append(this.name); } first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; sb.append(")"); return sb.toString(); } @@ -6025,22 +16908,19 @@ } - 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 drop_table_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_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 static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2); - private Database success; private NoSuchObjectException o1; - private MetaException 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)2, "o3"); private static final Map byName = new HashMap(); @@ -6055,12 +16935,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 2: // O3 + return O3; default: return null; } @@ -6105,77 +16983,46 @@ 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, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); } - public get_database_result() { + public drop_table_result() { } - public get_database_result( - Database success, + public drop_table_result( NoSuchObjectException o1, - MetaException o2) + MetaException o3) { this(); - this.success = success; this.o1 = o1; - this.o2 = o2; + this.o3 = o3; } /** * Performs a deep copy on other. */ - public get_database_result(get_database_result other) { - if (other.isSetSuccess()) { - this.success = new Database(other.success); - } + public drop_table_result(drop_table_result other) { if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); } } - public get_database_result deepCopy() { - return new get_database_result(this); + public drop_table_result deepCopy() { + return new drop_table_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; - } + this.o3 = null; } public NoSuchObjectException getO1() { @@ -6201,39 +17048,31 @@ } } - public MetaException getO2() { - return this.o2; + public MetaException getO3() { + return this.o3; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setO3(MetaException o3) { + this.o3 = o3; } - public void unsetO2() { - this.o2 = null; + public void unsetO3() { + this.o3 = 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 o3 is set (has been asigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; } - public void setO2IsSet(boolean value) { + public void setO3IsSet(boolean value) { if (!value) { - this.o2 = null; + this.o3 = 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(); @@ -6242,11 +17081,11 @@ } break; - case O2: + case O3: if (value == null) { - unsetO2(); + unsetO3(); } else { - setO2((MetaException)value); + setO3((MetaException)value); } break; @@ -6255,14 +17094,11 @@ 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(); @@ -6275,12 +17111,10 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); + case O3: + return isSetO3(); } throw new IllegalStateException(); } @@ -6289,24 +17123,15 @@ 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 drop_table_result) + return this.equals((drop_table_result)that); return false; } - public boolean equals(get_database_result that) { + public boolean equals(drop_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) { @@ -6316,12 +17141,12 @@ 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_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.o2.equals(that.o2)) + if (!this.o3.equals(that.o3)) return false; } @@ -6333,24 +17158,14 @@ return 0; } - public int compareTo(get_database_result other) { + public int compareTo(drop_table_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; + drop_table_result typedOther = (drop_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; @@ -6361,12 +17176,12 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); if (lastComparison != 0) { return lastComparison; } @@ -6388,14 +17203,6 @@ 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(); @@ -6404,10 +17211,10 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 + case 2: // O3 if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + this.o3 = new MetaException(); + this.o3.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -6424,17 +17231,13 @@ 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()) { + 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); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -6443,17 +17246,9 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_database_result("); + StringBuilder sb = new StringBuilder("drop_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"); @@ -6462,11 +17257,11 @@ } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("o3:"); + if (this.o3 == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.o3); } first = false; sb.append(")"); @@ -6479,19 +17274,19 @@ } - 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_tables_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_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 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 name; - private boolean deleteData; + 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 { - NAME((short)1, "name"), - DELETE_DATA((short)2, "deleteData"); + DB_NAME((short)1, "db_name"), + PATTERN((short)2, "pattern"); private static final Map byName = new HashMap(); @@ -6506,10 +17301,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // DELETE_DATA - return DELETE_DATA; + case 1: // DB_NAME + return DB_NAME; + case 2: // PATTERN + return PATTERN; default: return null; } @@ -6550,116 +17345,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.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); } - public drop_database_args() { + public get_tables_args() { } - public drop_database_args( - String name, - boolean deleteData) + public get_tables_args( + String db_name, + String pattern) { this(); - this.name = name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.db_name = db_name; + this.pattern = pattern; } /** * 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_tables_args(get_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - this.deleteData = other.deleteData; + if (other.isSetPattern()) { + this.pattern = other.pattern; + } } - public drop_database_args deepCopy() { - return new drop_database_args(this); + public get_tables_args deepCopy() { + return new get_tables_args(this); } @Override public void clear() { - this.name = null; - setDeleteDataIsSet(false); - this.deleteData = false; + this.db_name = null; + this.pattern = null; } - public String getName() { - return this.name; + public String getDb_name() { + return this.db_name; } - public void setName(String name) { - this.name = name; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetName() { - this.name = null; + public void unsetDb_name() { + this.db_name = 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 db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setNameIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.name = null; + this.db_name = null; } } - public boolean isDeleteData() { - return this.deleteData; + public String getPattern() { + return this.pattern; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); + public void setPattern(String pattern) { + this.pattern = pattern; } - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + public void unsetPattern() { + this.pattern = 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 pattern is set (has been asigned a value) and false otherwise */ + public boolean isSetPattern() { + return this.pattern != null; } - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: + case DB_NAME: if (value == null) { - unsetName(); + unsetDb_name(); } else { - setName((String)value); + setDb_name((String)value); } break; - case DELETE_DATA: + case PATTERN: if (value == null) { - unsetDeleteData(); + unsetPattern(); } else { - setDeleteData((Boolean)value); + setPattern((String)value); } break; @@ -6668,11 +17460,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case DB_NAME: + return getDb_name(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case PATTERN: + return getPattern(); } throw new IllegalStateException(); @@ -6685,10 +17477,10 @@ } switch (field) { - case NAME: - return isSetName(); - case DELETE_DATA: - return isSetDeleteData(); + case DB_NAME: + return isSetDb_name(); + case PATTERN: + return isSetPattern(); } throw new IllegalStateException(); } @@ -6697,30 +17489,30 @@ 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_tables_args) + return this.equals((get_tables_args)that); return false; } - public boolean equals(drop_database_args that) { + public boolean equals(get_tables_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)) + 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.name.equals(that.name)) + if (!this.db_name.equals(that.db_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)) + 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.deleteData != that.deleteData) + if (!this.pattern.equals(that.pattern)) return false; } @@ -6732,30 +17524,30 @@ return 0; } - public int compareTo(drop_database_args other) { + public int compareTo(get_tables_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; + get_tables_args typedOther = (get_tables_args)other; - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetPattern()) { + lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); if (lastComparison != 0) { return lastComparison; } @@ -6777,17 +17569,16 @@ break; } switch (field.id) { - case 1: // NAME + case 1: // DB_NAME if (field.type == TType.STRING) { - this.name = iprot.readString(); + this.db_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); + case 2: // PATTERN + if (field.type == TType.STRING) { + this.pattern = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -6805,33 +17596,39 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - 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("drop_database_args("); + StringBuilder sb = new StringBuilder("get_tables_args("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } first = false; sb.append(")"); return sb.toString(); @@ -6843,22 +17640,19 @@ } - 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_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 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; + 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 { - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -6873,12 +17667,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 3: // O3 - return O3; default: return null; } @@ -6923,148 +17715,129 @@ 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.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); + FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); } - public drop_database_result() { + public get_tables_result() { } - public drop_database_result( - NoSuchObjectException o1, - InvalidOperationException o2, - MetaException o3) + public get_tables_result( + List success, + MetaException o1) { this(); + this.success = success; 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); + 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.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public drop_database_result deepCopy() { - return new drop_database_result(this); + public get_tables_result deepCopy() { + return new get_tables_result(this); } @Override public void clear() { + this.success = null; 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; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.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 getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void setO1IsSet(boolean value) { - if (!value) { - this.o1 = null; + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); } + this.success.add(elem); } - public InvalidOperationException getO2() { - return this.o2; + public List getSuccess() { + return this.success; } - public void setO2(InvalidOperationException o2) { - this.o2 = o2; + public void setSuccess(List success) { + this.success = success; } - public void unsetO2() { - this.o2 = null; + public void unsetSuccess() { + this.success = 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 success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public void setO2IsSet(boolean value) { + public void setSuccessIsSet(boolean value) { if (!value) { - this.o2 = null; + this.success = null; } } - public MetaException getO3() { - return this.o3; + public MetaException getO1() { + return this.o1; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetO3() { - this.o3 = null; + public void unsetO1() { + this.o1 = 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 o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setO3IsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.o3 = null; + this.o1 = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: + case SUCCESS: if (value == null) { - unsetO2(); + unsetSuccess(); } else { - setO2((InvalidOperationException)value); + setSuccess((List)value); } break; - case O3: + case O1: if (value == null) { - unsetO3(); + unsetO1(); } else { - setO3((MetaException)value); + setO1((MetaException)value); } break; @@ -7073,15 +17846,12 @@ 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(); } @@ -7093,12 +17863,10 @@ } switch (field) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); } throw new IllegalStateException(); } @@ -7107,15 +17875,24 @@ 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_tables_result) + return this.equals((get_tables_result)that); return false; } - public boolean equals(drop_database_result that) { + 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) { @@ -7125,24 +17902,6 @@ 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; } @@ -7151,40 +17910,30 @@ return 0; } - public int compareTo(drop_database_result other) { + public int compareTo(get_tables_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; + get_tables_result typedOther = (get_tables_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()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -7206,26 +17955,27 @@ 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); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list119 = iprot.readListBegin(); + this.success = new ArrayList(_list119.size); + for (int _i120 = 0; _i120 < _list119.size; ++_i120) + { + String _elem121; + _elem121 = iprot.readString(); + this.success.add(_elem121); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 + case 1: // O1 if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -7242,18 +17992,21 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter122 : this.success) + { + oprot.writeString(_iter122); + } + 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(); @@ -7261,30 +18014,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_database_result("); + StringBuilder sb = new StringBuilder("get_tables_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("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.o1); } first = false; sb.append(")"); @@ -7297,16 +18042,16 @@ } - 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_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 PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)1); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private String pattern; + 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 { - PATTERN((short)1, "pattern"); + DB_NAME((short)1, "db_name"); private static final Map byName = new HashMap(); @@ -7321,8 +18066,8 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PATTERN - return PATTERN; + case 1: // DB_NAME + return DB_NAME; default: return null; } @@ -7367,70 +18112,70 @@ 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, + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); } - public get_databases_args() { + public get_all_tables_args() { } - public get_databases_args( - String pattern) + public get_all_tables_args( + String db_name) { this(); - this.pattern = pattern; + this.db_name = db_name; } /** * Performs a deep copy on other. */ - public get_databases_args(get_databases_args other) { - if (other.isSetPattern()) { - this.pattern = other.pattern; + public get_all_tables_args(get_all_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } } - public get_databases_args deepCopy() { - return new get_databases_args(this); + public get_all_tables_args deepCopy() { + return new get_all_tables_args(this); } @Override public void clear() { - this.pattern = null; + this.db_name = null; } - public String getPattern() { - return this.pattern; + public String getDb_name() { + return this.db_name; } - public void setPattern(String pattern) { - this.pattern = pattern; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetPattern() { - this.pattern = null; + public void unsetDb_name() { + this.db_name = 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 db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setPatternIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.pattern = null; + this.db_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PATTERN: + case DB_NAME: if (value == null) { - unsetPattern(); + unsetDb_name(); } else { - setPattern((String)value); + setDb_name((String)value); } break; @@ -7439,8 +18184,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case PATTERN: - return getPattern(); + case DB_NAME: + return getDb_name(); } throw new IllegalStateException(); @@ -7453,8 +18198,8 @@ } switch (field) { - case PATTERN: - return isSetPattern(); + case DB_NAME: + return isSetDb_name(); } throw new IllegalStateException(); } @@ -7463,21 +18208,21 @@ 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_all_tables_args) + return this.equals((get_all_tables_args)that); return false; } - public boolean equals(get_databases_args that) { + public boolean equals(get_all_tables_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)) + 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.pattern.equals(that.pattern)) + if (!this.db_name.equals(that.db_name)) return false; } @@ -7489,20 +18234,20 @@ return 0; } - public int compareTo(get_databases_args other) { + public int compareTo(get_all_tables_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; + get_all_tables_args typedOther = (get_all_tables_args)other; - lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetPattern()) { - lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } @@ -7524,9 +18269,9 @@ break; } switch (field.id) { - case 1: // PATTERN + case 1: // DB_NAME if (field.type == TType.STRING) { - this.pattern = iprot.readString(); + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -7544,9 +18289,9 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -7555,14 +18300,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_databases_args("); + StringBuilder sb = new StringBuilder("get_all_tables_args("); boolean first = true; - sb.append("pattern:"); - if (this.pattern == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.pattern); + sb.append(this.db_name); } first = false; sb.append(")"); @@ -7575,8 +18320,8 @@ } - 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_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); @@ -7656,13 +18401,13 @@ tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); } - public get_databases_result() { + public get_all_tables_result() { } - public get_databases_result( + public get_all_tables_result( List success, MetaException o1) { @@ -7674,7 +18419,7 @@ /** * Performs a deep copy on other. */ - public get_databases_result(get_databases_result 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) { @@ -7687,8 +18432,8 @@ } } - public get_databases_result deepCopy() { - return new get_databases_result(this); + public get_all_tables_result deepCopy() { + return new get_all_tables_result(this); } @Override @@ -7810,12 +18555,12 @@ 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_all_tables_result) + return this.equals((get_all_tables_result)that); return false; } - public boolean equals(get_databases_result that) { + public boolean equals(get_all_tables_result that) { if (that == null) return false; @@ -7845,13 +18590,13 @@ return 0; } - public int compareTo(get_databases_result other) { + public int compareTo(get_all_tables_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; + get_all_tables_result typedOther = (get_all_tables_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -7893,13 +18638,13 @@ 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) + TList _list123 = iprot.readListBegin(); + this.success = new ArrayList(_list123.size); + for (int _i124 = 0; _i124 < _list123.size; ++_i124) { - String _elem65; - _elem65 = iprot.readString(); - this.success.add(_elem65); + String _elem125; + _elem125 = iprot.readString(); + this.success.add(_elem125); } iprot.readListEnd(); } @@ -7931,9 +18676,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter66 : this.success) + for (String _iter126 : this.success) { - oprot.writeString(_iter66); + oprot.writeString(_iter126); } oprot.writeListEnd(); } @@ -7949,7 +18694,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_databases_result("); + StringBuilder sb = new StringBuilder("get_all_tables_result("); boolean first = true; sb.append("success:"); @@ -7977,14 +18722,19 @@ } - 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_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(); @@ -7999,6 +18749,10 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 1: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; default: return null; } @@ -8037,37 +18791,129 @@ 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_all_databases_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); } - public get_all_databases_args() { + 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_all_databases_args(get_all_databases_args 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_all_databases_args deepCopy() { - return new get_all_databases_args(this); + 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(); } @@ -8079,6 +18925,10 @@ } switch (field) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); } throw new IllegalStateException(); } @@ -8087,15 +18937,33 @@ 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_table_args) + return this.equals((get_table_args)that); return false; } - public boolean equals(get_all_databases_args that) { + 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; } @@ -8104,14 +18972,34 @@ return 0; } - public int compareTo(get_all_databases_args other) { + public int compareTo(get_table_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; - + + 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; } @@ -8129,6 +19017,20 @@ 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); } @@ -8142,15 +19044,40 @@ 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_all_databases_args("); + 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(); } @@ -8161,19 +19088,22 @@ } - 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_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.LIST, (short)0); + 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 List success; + 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"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -8192,6 +19122,8 @@ return SUCCESS; case 1: // O1 return O1; + case 2: // O2 + return O2; default: return null; } @@ -8237,72 +19169,60 @@ 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)))); + 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_all_databases_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); } - public get_all_databases_result() { + public get_table_result() { } - public get_all_databases_result( - List success, - MetaException o1) + 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_all_databases_result(get_all_databases_result other) { + public get_table_result(get_table_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; + 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_all_databases_result deepCopy() { - return new get_all_databases_result(this); + public get_table_result deepCopy() { + return new get_table_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); + this.o2 = null; } - public List getSuccess() { + public Table getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(Table success) { this.success = success; } @@ -8344,13 +19264,36 @@ } } + 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((List)value); + setSuccess((Table)value); } break; @@ -8362,6 +19305,14 @@ } break; + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + } } @@ -8373,6 +19324,9 @@ case O1: return getO1(); + case O2: + return getO2(); + } throw new IllegalStateException(); } @@ -8388,6 +19342,8 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -8396,12 +19352,12 @@ 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_table_result) + return this.equals((get_table_result)that); return false; } - public boolean equals(get_all_databases_result that) { + public boolean equals(get_table_result that) { if (that == null) return false; @@ -8423,6 +19379,15 @@ 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; } @@ -8431,13 +19396,13 @@ return 0; } - public int compareTo(get_all_databases_result other) { + public int compareTo(get_table_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; + get_table_result typedOther = (get_table_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -8459,6 +19424,16 @@ 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; } @@ -8477,18 +19452,9 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.LIST) { - { - TList _list67 = iprot.readListBegin(); - this.success = new ArrayList(_list67.size); - for (int _i68 = 0; _i68 < _list67.size; ++_i68) - { - String _elem69; - _elem69 = iprot.readString(); - this.success.add(_elem69); - } - iprot.readListEnd(); - } + if (field.type == TType.STRUCT) { + this.success = new Table(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -8501,6 +19467,14 @@ 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); } @@ -8515,19 +19489,16 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter70 : this.success) - { - oprot.writeString(_iter70); - } - oprot.writeListEnd(); - } + 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(); @@ -8535,7 +19506,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_databases_result("); + StringBuilder sb = new StringBuilder("get_table_result("); boolean first = true; sb.append("success:"); @@ -8553,6 +19524,14 @@ 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(); } @@ -8563,19 +19542,22 @@ } - public static class alter_database_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_database_args"); + 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 DB_FIELD_DESC = new TField("db", TType.STRUCT, (short)2); + 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 Database db; + 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"), - DB((short)2, "db"); + TBL_NAME((short)2, "tbl_name"), + NEW_TBL((short)3, "new_tbl"); private static final Map byName = new HashMap(); @@ -8592,8 +19574,10 @@ switch(fieldId) { case 1: // DBNAME return DBNAME; - case 2: // DB - return DB; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_TBL + return NEW_TBL; default: return null; } @@ -8640,89 +19624,120 @@ 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.DB, new FieldMetaData("db", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.class))); + 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_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); } - public alter_database_args() { + public alter_table_args() { } - public alter_database_args( + public alter_table_args( String dbname, - Database db) + String tbl_name, + Table new_tbl) { this(); this.dbname = dbname; - this.db = db; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; } /** * Performs a deep copy on other. */ - public alter_database_args(alter_database_args other) { + public alter_table_args(alter_table_args other) { if (other.isSetDbname()) { this.dbname = other.dbname; } - if (other.isSetDb()) { - this.db = new Database(other.db); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_tbl()) { + this.new_tbl = new Table(other.new_tbl); } } - public alter_database_args deepCopy() { - return new alter_database_args(this); + public alter_table_args deepCopy() { + return new alter_table_args(this); } @Override public void clear() { this.dbname = null; - this.db = 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 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 unsetDbname() { - this.dbname = null; + public void unsetTbl_name() { + this.tbl_name = 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 tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setDbnameIsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.dbname = null; + this.tbl_name = null; } } - public Database getDb() { - return this.db; + public Table getNew_tbl() { + return this.new_tbl; } - public void setDb(Database db) { - this.db = db; + public void setNew_tbl(Table new_tbl) { + this.new_tbl = new_tbl; } - public void unsetDb() { - this.db = null; + public void unsetNew_tbl() { + this.new_tbl = null; } - /** Returns true if field db is set (has been asigned a value) and false otherwise */ - public boolean isSetDb() { - return this.db != 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 setDbIsSet(boolean value) { + public void setNew_tblIsSet(boolean value) { if (!value) { - this.db = null; + this.new_tbl = null; } } @@ -8736,11 +19751,19 @@ } break; - case DB: + case TBL_NAME: if (value == null) { - unsetDb(); + unsetTbl_name(); } else { - setDb((Database)value); + setTbl_name((String)value); + } + break; + + case NEW_TBL: + if (value == null) { + unsetNew_tbl(); + } else { + setNew_tbl((Table)value); } break; @@ -8752,8 +19775,11 @@ case DBNAME: return getDbname(); - case DB: - return getDb(); + case TBL_NAME: + return getTbl_name(); + + case NEW_TBL: + return getNew_tbl(); } throw new IllegalStateException(); @@ -8768,8 +19794,10 @@ switch (field) { case DBNAME: return isSetDbname(); - case DB: - return isSetDb(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_TBL: + return isSetNew_tbl(); } throw new IllegalStateException(); } @@ -8778,12 +19806,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_database_args) - return this.equals((alter_database_args)that); + if (that instanceof alter_table_args) + return this.equals((alter_table_args)that); return false; } - public boolean equals(alter_database_args that) { + public boolean equals(alter_table_args that) { if (that == null) return false; @@ -8796,12 +19824,21 @@ 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)) + 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.db.equals(that.db)) + 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; } @@ -8813,13 +19850,13 @@ return 0; } - public int compareTo(alter_database_args other) { + public int compareTo(alter_table_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_database_args typedOther = (alter_database_args)other; + alter_table_args typedOther = (alter_table_args)other; lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { @@ -8831,12 +19868,22 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDb()).compareTo(typedOther.isSetDb()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb()) { - lastComparison = TBaseHelper.compareTo(this.db, typedOther.db); + 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; } @@ -8865,10 +19912,17 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 2: // DB + 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.db = new Database(); - this.db.read(iprot); + this.new_tbl = new Table(); + this.new_tbl.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -8891,9 +19945,14 @@ oprot.writeString(this.dbname); oprot.writeFieldEnd(); } - if (this.db != null) { - oprot.writeFieldBegin(DB_FIELD_DESC); - this.db.write(oprot); + 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(); @@ -8902,7 +19961,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_database_args("); + StringBuilder sb = new StringBuilder("alter_table_args("); boolean first = true; sb.append("dbname:"); @@ -8913,11 +19972,19 @@ } first = false; if (!first) sb.append(", "); - sb.append("db:"); - if (this.db == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.db); + 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(")"); @@ -8930,14 +19997,14 @@ } - public static class alter_database_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_database_result"); + 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 MetaException o1; - private NoSuchObjectException o2; + 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 { @@ -9010,15 +20077,15 @@ tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); } - public alter_database_result() { + public alter_table_result() { } - public alter_database_result( - MetaException o1, - NoSuchObjectException o2) + public alter_table_result( + InvalidOperationException o1, + MetaException o2) { this(); this.o1 = o1; @@ -9028,17 +20095,17 @@ /** * Performs a deep copy on other. */ - public alter_database_result(alter_database_result other) { + public alter_table_result(alter_table_result other) { if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + this.o2 = new MetaException(other.o2); } } - public alter_database_result deepCopy() { - return new alter_database_result(this); + public alter_table_result deepCopy() { + return new alter_table_result(this); } @Override @@ -9047,11 +20114,11 @@ this.o2 = null; } - public MetaException getO1() { + public InvalidOperationException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(InvalidOperationException o1) { this.o1 = o1; } @@ -9070,11 +20137,11 @@ } } - public NoSuchObjectException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -9099,7 +20166,7 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((InvalidOperationException)value); } break; @@ -9107,7 +20174,7 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((MetaException)value); } break; @@ -9145,12 +20212,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_database_result) - return this.equals((alter_database_result)that); + if (that instanceof alter_table_result) + return this.equals((alter_table_result)that); return false; } - public boolean equals(alter_database_result that) { + public boolean equals(alter_table_result that) { if (that == null) return false; @@ -9180,13 +20247,13 @@ return 0; } - public int compareTo(alter_database_result other) { + public int compareTo(alter_table_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_database_result typedOther = (alter_database_result)other; + alter_table_result typedOther = (alter_table_result)other; lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { @@ -9227,7 +20294,7 @@ switch (field.id) { case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + this.o1 = new InvalidOperationException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -9235,7 +20302,7 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + this.o2 = new MetaException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -9268,7 +20335,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_database_result("); + StringBuilder sb = new StringBuilder("alter_table_result("); boolean first = true; sb.append("o1:"); @@ -9296,16 +20363,16 @@ } - 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 add_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_partition_args"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)1); - private String 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 { - NAME((short)1, "name"); + NEW_PART((short)1, "new_part"); private static final Map byName = new HashMap(); @@ -9320,8 +20387,8 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; + case 1: // NEW_PART + return NEW_PART; default: return null; } @@ -9366,70 +20433,70 @@ 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.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); } - public get_type_args() { + public add_partition_args() { } - public get_type_args( - String name) + public add_partition_args( + Partition new_part) { this(); - this.name = name; + this.new_part = new_part; } /** * Performs a deep copy on other. */ - public get_type_args(get_type_args other) { - if (other.isSetName()) { - this.name = other.name; + public add_partition_args(add_partition_args other) { + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); } } - public get_type_args deepCopy() { - return new get_type_args(this); + public add_partition_args deepCopy() { + return new add_partition_args(this); } @Override public void clear() { - this.name = null; + this.new_part = null; } - public String getName() { - return this.name; + public Partition getNew_part() { + return this.new_part; } - public void setName(String name) { - this.name = name; + public void setNew_part(Partition new_part) { + this.new_part = new_part; } - public void unsetName() { - this.name = null; + public void unsetNew_part() { + this.new_part = 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 new_part is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; } - public void setNameIsSet(boolean value) { + public void setNew_partIsSet(boolean value) { if (!value) { - this.name = null; + this.new_part = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: + case NEW_PART: if (value == null) { - unsetName(); + unsetNew_part(); } else { - setName((String)value); + setNew_part((Partition)value); } break; @@ -9438,8 +20505,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + case NEW_PART: + return getNew_part(); } throw new IllegalStateException(); @@ -9452,8 +20519,8 @@ } switch (field) { - case NAME: - return isSetName(); + case NEW_PART: + return isSetNew_part(); } throw new IllegalStateException(); } @@ -9462,21 +20529,21 @@ 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 add_partition_args) + return this.equals((add_partition_args)that); return false; } - public boolean equals(get_type_args that) { + public boolean equals(add_partition_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)) + 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.name.equals(that.name)) + if (!this.new_part.equals(that.new_part)) return false; } @@ -9488,20 +20555,20 @@ return 0; } - public int compareTo(get_type_args other) { + public int compareTo(add_partition_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; + add_partition_args typedOther = (add_partition_args)other; - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetNew_part()) { + lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } @@ -9523,9 +20590,10 @@ break; } switch (field.id) { - case 1: // NAME - if (field.type == TType.STRING) { - this.name = iprot.readString(); + 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); } @@ -9543,9 +20611,9 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + if (this.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -9554,14 +20622,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_args("); + StringBuilder sb = new StringBuilder("add_partition_args("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("new_part:"); + if (this.new_part == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.new_part); } first = false; sb.append(")"); @@ -9574,22 +20642,25 @@ } - 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 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 Type success; - private MetaException o1; - private NoSuchObjectException o2; + 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"); + O2((short)2, "o2"), + O3((short)3, "o3"); private static final Map byName = new HashMap(); @@ -9610,6 +20681,8 @@ return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; default: return null; } @@ -9655,46 +20728,53 @@ 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))); + 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(get_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); } - public get_type_result() { + public add_partition_result() { } - public get_type_result( - Type success, - MetaException o1, - NoSuchObjectException o2) + 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 get_type_result(get_type_result other) { + public add_partition_result(add_partition_result other) { if (other.isSetSuccess()) { - this.success = new Type(other.success); + this.success = new Partition(other.success); } if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); } } - public get_type_result deepCopy() { - return new get_type_result(this); + public add_partition_result deepCopy() { + return new add_partition_result(this); } @Override @@ -9702,13 +20782,14 @@ this.success = null; this.o1 = null; this.o2 = null; + this.o3 = null; } - public Type getSuccess() { + public Partition getSuccess() { return this.success; } - public void setSuccess(Type success) { + public void setSuccess(Partition success) { this.success = success; } @@ -9727,11 +20808,11 @@ } } - public MetaException getO1() { + public InvalidObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(InvalidObjectException o1) { this.o1 = o1; } @@ -9750,11 +20831,11 @@ } } - public NoSuchObjectException getO2() { + public AlreadyExistsException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(AlreadyExistsException o2) { this.o2 = o2; } @@ -9773,13 +20854,36 @@ } } + 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((Type)value); + setSuccess((Partition)value); } break; @@ -9787,7 +20891,7 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((InvalidObjectException)value); } break; @@ -9795,7 +20899,15 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); } break; @@ -9813,6 +20925,9 @@ case O2: return getO2(); + case O3: + return getO3(); + } throw new IllegalStateException(); } @@ -9830,6 +20945,8 @@ return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); } throw new IllegalStateException(); } @@ -9838,12 +20955,12 @@ 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 add_partition_result) + return this.equals((add_partition_result)that); return false; } - public boolean equals(get_type_result that) { + public boolean equals(add_partition_result that) { if (that == null) return false; @@ -9874,6 +20991,15 @@ 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; } @@ -9882,13 +21008,13 @@ return 0; } - public int compareTo(get_type_result other) { + public int compareTo(add_partition_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; + add_partition_result typedOther = (add_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -9920,6 +21046,16 @@ 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; } @@ -9939,7 +21075,7 @@ switch (field.id) { case 0: // SUCCESS if (field.type == TType.STRUCT) { - this.success = new Type(); + this.success = new Partition(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -9947,7 +21083,7 @@ break; case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -9955,12 +21091,20 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + 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); } @@ -9985,6 +21129,10 @@ 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(); @@ -9992,7 +21140,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_result("); + StringBuilder sb = new StringBuilder("add_partition_result("); boolean first = true; sb.append("success:"); @@ -10018,6 +21166,14 @@ 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(); } @@ -10028,16 +21184,22 @@ } - 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 append_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_args"); - private static final TField TYPE_FIELD_DESC = new TField("type", 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 Type type; + 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 { - TYPE((short)1, "type"); + 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(); @@ -10052,8 +21214,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TYPE - return TYPE; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; default: return null; } @@ -10079,89 +21245,187 @@ private final short _thriftId; private final String _fieldName; - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = 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; + } - public short getThriftFieldId() { - return _thriftId; - } + /** 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 String getFieldName() { - return _fieldName; + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; } } - // isset id assignments + public String getTbl_name() { + return this.tbl_name; + } - 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 void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public create_type_args() { + public void unsetTbl_name() { + this.tbl_name = null; } - public create_type_args( - Type type) - { - this(); - this.type = type; + /** 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 create_type_args(create_type_args other) { - if (other.isSetType()) { - this.type = new Type(other.type); + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; } } - public create_type_args deepCopy() { - return new create_type_args(this); + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); } - @Override - public void clear() { - this.type = null; + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); } - public Type getType() { - return this.type; + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); } - public void setType(Type type) { - this.type = type; + public List getPart_vals() { + return this.part_vals; } - public void unsetType() { - this.type = null; + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; } - /** Returns true if field type is set (has been asigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; + public void unsetPart_vals() { + this.part_vals = null; } - public void setTypeIsSet(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.type = null; + this.part_vals = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TYPE: + case DB_NAME: if (value == null) { - unsetType(); + unsetDb_name(); } else { - setType((Type)value); + 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; @@ -10170,8 +21434,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case TYPE: - return getType(); + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); } throw new IllegalStateException(); @@ -10184,8 +21454,12 @@ } switch (field) { - case TYPE: - return isSetType(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); } throw new IllegalStateException(); } @@ -10194,21 +21468,39 @@ 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 append_partition_args) + return this.equals((append_partition_args)that); return false; } - public boolean equals(create_type_args that) { + public boolean equals(append_partition_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)) + 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.type.equals(that.type)) + 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; } @@ -10220,20 +21512,40 @@ return 0; } - public int compareTo(create_type_args other) { + public int compareTo(append_partition_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; + append_partition_args typedOther = (append_partition_args)other; - lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetType()) { - lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + 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; } @@ -10255,10 +21567,33 @@ break; } switch (field.id) { - case 1: // TYPE - if (field.type == TType.STRUCT) { - this.type = new Type(); - this.type.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 _list127 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list127.size); + for (int _i128 = 0; _i128 < _list127.size; ++_i128) + { + String _elem129; + _elem129 = iprot.readString(); + this.part_vals.add(_elem129); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -10276,9 +21611,26 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - this.type.write(oprot); + 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 _iter130 : this.part_vals) + { + oprot.writeString(_iter130); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -10287,14 +21639,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_type_args("); + StringBuilder sb = new StringBuilder("append_partition_args("); boolean first = true; - sb.append("type:"); - if (this.type == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.type); + 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(")"); @@ -10307,17 +21675,17 @@ } - 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 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.BOOL, (short)0); + 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 boolean success; - private AlreadyExistsException o1; - private InvalidObjectException o2; + 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. */ @@ -10388,14 +21756,12 @@ } // 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))); + 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, @@ -10403,21 +21769,20 @@ tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); } - public create_type_result() { + public append_partition_result() { } - public create_type_result( - boolean success, - AlreadyExistsException o1, - InvalidObjectException o2, + public append_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, MetaException o3) { this(); this.success = success; - setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; @@ -10426,61 +21791,61 @@ /** * 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; + public append_partition_result(append_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); + this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); + this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); } } - public create_type_result deepCopy() { - return new create_type_result(this); + public append_partition_result deepCopy() { + return new append_partition_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.o1 = null; this.o2 = null; this.o3 = null; } - public boolean isSuccess() { + public Partition getSuccess() { return this.success; } - public void setSuccess(boolean success) { + public void setSuccess(Partition success) { this.success = success; - setSuccessIsSet(true); } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + this.success = 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); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } - public AlreadyExistsException getO1() { + public InvalidObjectException getO1() { return this.o1; } - public void setO1(AlreadyExistsException o1) { + public void setO1(InvalidObjectException o1) { this.o1 = o1; } @@ -10499,11 +21864,11 @@ } } - public InvalidObjectException getO2() { + public AlreadyExistsException getO2() { return this.o2; } - public void setO2(InvalidObjectException o2) { + public void setO2(AlreadyExistsException o2) { this.o2 = o2; } @@ -10551,7 +21916,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((Partition)value); } break; @@ -10559,7 +21924,7 @@ if (value == null) { unsetO1(); } else { - setO1((AlreadyExistsException)value); + setO1((InvalidObjectException)value); } break; @@ -10567,7 +21932,7 @@ if (value == null) { unsetO2(); } else { - setO2((InvalidObjectException)value); + setO2((AlreadyExistsException)value); } break; @@ -10585,7 +21950,7 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return new Boolean(isSuccess()); + return getSuccess(); case O1: return getO1(); @@ -10623,21 +21988,21 @@ 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 append_partition_result) + return this.equals((append_partition_result)that); return false; } - public boolean equals(create_type_result that) { + public boolean equals(append_partition_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) return false; } @@ -10676,13 +22041,13 @@ return 0; } - public int compareTo(create_type_result other) { + public int compareTo(append_partition_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; + append_partition_result typedOther = (append_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -10742,16 +22107,16 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + 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 AlreadyExistsException(); + this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -10759,7 +22124,7 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); + this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -10787,7 +22152,7 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -10808,11 +22173,15 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_type_result("); + StringBuilder sb = new StringBuilder("append_partition_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -10848,16 +22217,22 @@ } - 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 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 TYPE_FIELD_DESC = new TField("type", TType.STRING, (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_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); - private String type; + 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 { - TYPE((short)1, "type"); + 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(); @@ -10872,8 +22247,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TYPE - return TYPE; + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; default: return null; } @@ -10918,70 +22297,148 @@ 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, + 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_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); } - public drop_type_args() { + public append_partition_by_name_args() { } - public drop_type_args( - String type) + public append_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) { this(); - this.type = type; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public drop_type_args(drop_type_args other) { - if (other.isSetType()) { - this.type = other.type; + 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 drop_type_args deepCopy() { - return new drop_type_args(this); + public append_partition_by_name_args deepCopy() { + return new append_partition_by_name_args(this); } @Override public void clear() { - this.type = null; + this.db_name = null; + this.tbl_name = null; + this.part_name = null; } - public String getType() { - return this.type; + public String getDb_name() { + return this.db_name; } - public void setType(String type) { - this.type = type; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetType() { - this.type = null; + public void unsetDb_name() { + this.db_name = null; } - /** Returns true if field type is set (has been asigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != 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 setTypeIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.type = null; + 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 TYPE: + case DB_NAME: if (value == null) { - unsetType(); + unsetDb_name(); } else { - setType((String)value); + 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; @@ -10990,8 +22447,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case TYPE: - return getType(); + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); } throw new IllegalStateException(); @@ -11004,8 +22467,12 @@ } switch (field) { - case TYPE: - return isSetType(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); } throw new IllegalStateException(); } @@ -11014,21 +22481,39 @@ 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 append_partition_by_name_args) + return this.equals((append_partition_by_name_args)that); return false; } - public boolean equals(drop_type_args that) { + public boolean equals(append_partition_by_name_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)) + 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.type.equals(that.type)) + 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; } @@ -11040,20 +22525,40 @@ return 0; } - public int compareTo(drop_type_args other) { + public int compareTo(append_partition_by_name_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; + append_partition_by_name_args typedOther = (append_partition_by_name_args)other; - lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetType()) { - lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + 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; } @@ -11075,9 +22580,23 @@ break; } switch (field.id) { - case 1: // TYPE + case 1: // DB_NAME if (field.type == TType.STRING) { - this.type = iprot.readString(); + 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); } @@ -11095,9 +22614,19 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeString(this.type); + 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(); @@ -11106,14 +22635,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_type_args("); + StringBuilder sb = new StringBuilder("append_partition_by_name_args("); boolean first = true; - sb.append("type:"); - if (this.type == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.type); + 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(")"); @@ -11126,22 +22671,25 @@ } - 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 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.BOOL, (short)0); + 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 boolean success; - private MetaException o1; - private NoSuchObjectException o2; + 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"); + O2((short)2, "o2"), + O3((short)3, "o3"); private static final Map byName = new HashMap(); @@ -11162,6 +22710,8 @@ return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; default: return null; } @@ -11202,91 +22752,96 @@ } // 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))); + 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(drop_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); } - public drop_type_result() { + public append_partition_by_name_result() { } - public drop_type_result( - boolean success, - MetaException o1, - NoSuchObjectException o2) + public append_partition_by_name_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException 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 drop_type_result(drop_type_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.success = other.success; + 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 MetaException(other.o1); + this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); } } - public drop_type_result deepCopy() { - return new drop_type_result(this); + public append_partition_by_name_result deepCopy() { + return new append_partition_by_name_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.o1 = null; this.o2 = null; + this.o3 = null; } - public boolean isSuccess() { + public Partition getSuccess() { return this.success; } - public void setSuccess(boolean success) { + public void setSuccess(Partition success) { this.success = success; - setSuccessIsSet(true); } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + this.success = 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); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } - public MetaException getO1() { + public InvalidObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(InvalidObjectException o1) { this.o1 = o1; } @@ -11305,11 +22860,11 @@ } } - public NoSuchObjectException getO2() { + public AlreadyExistsException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(AlreadyExistsException o2) { this.o2 = o2; } @@ -11328,13 +22883,36 @@ } } + 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); + setSuccess((Partition)value); } break; @@ -11342,7 +22920,7 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((InvalidObjectException)value); } break; @@ -11350,7 +22928,15 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); } break; @@ -11360,7 +22946,7 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return new Boolean(isSuccess()); + return getSuccess(); case O1: return getO1(); @@ -11368,6 +22954,9 @@ case O2: return getO2(); + case O3: + return getO3(); + } throw new IllegalStateException(); } @@ -11385,6 +22974,8 @@ return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); } throw new IllegalStateException(); } @@ -11393,21 +22984,21 @@ 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 append_partition_by_name_result) + return this.equals((append_partition_by_name_result)that); return false; } - public boolean equals(drop_type_result that) { + public boolean equals(append_partition_by_name_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) return false; } @@ -11429,6 +23020,15 @@ 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; } @@ -11437,13 +23037,13 @@ return 0; } - public int compareTo(drop_type_result other) { + public int compareTo(append_partition_by_name_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; + append_partition_by_name_result typedOther = (append_partition_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -11475,6 +23075,16 @@ 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; } @@ -11493,16 +23103,16 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + 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 = new InvalidObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -11510,12 +23120,20 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + 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); } @@ -11530,7 +23148,7 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -11540,6 +23158,10 @@ 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(); @@ -11547,11 +23169,15 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_type_result("); + StringBuilder sb = new StringBuilder("append_partition_by_name_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -11569,6 +23195,14 @@ 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(); } @@ -11579,16 +23213,25 @@ } - 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 drop_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_partition_args"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (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 DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); - private String name; + 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 { - NAME((short)1, "name"); + 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(); @@ -11603,8 +23246,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; + 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; } @@ -11645,74 +23294,214 @@ } // 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, + 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(get_type_all_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); } - public get_type_all_args() { + public drop_partition_args() { } - public get_type_all_args( - String name) + public drop_partition_args( + String db_name, + String tbl_name, + List part_vals, + boolean deleteData) { this(); - this.name = name; + 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 get_type_all_args(get_type_all_args other) { - if (other.isSetName()) { - this.name = other.name; + 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 get_type_all_args deepCopy() { - return new get_type_all_args(this); + public drop_partition_args deepCopy() { + return new drop_partition_args(this); } @Override public void clear() { - this.name = null; + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + setDeleteDataIsSet(false); + this.deleteData = false; } - public String getName() { - return this.name; + public String getDb_name() { + return this.db_name; } - public void setName(String name) { - this.name = name; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetName() { - this.name = null; + public void unsetDb_name() { + this.db_name = 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 db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setNameIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.name = null; + 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 NAME: + case DB_NAME: if (value == null) { - unsetName(); + unsetDb_name(); } else { - setName((String)value); + 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; @@ -11721,8 +23510,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); + 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(); @@ -11735,8 +23533,14 @@ } switch (field) { - case NAME: - return isSetName(); + 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(); } @@ -11745,21 +23549,48 @@ 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 drop_partition_args) + return this.equals((drop_partition_args)that); return false; } - public boolean equals(get_type_all_args that) { + public boolean equals(drop_partition_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)) + 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.name.equals(that.name)) + 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; } @@ -11771,20 +23602,50 @@ return 0; } - public int compareTo(get_type_all_args other) { + public int compareTo(drop_partition_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()); + + 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 (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + 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; } @@ -11806,9 +23667,41 @@ break; } switch (field.id) { - case 1: // NAME + case 1: // DB_NAME if (field.type == TType.STRING) { - this.name = iprot.readString(); + 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 _list131 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list131.size); + for (int _i132 = 0; _i132 < _list131.size; ++_i132) + { + String _elem133; + _elem133 = iprot.readString(); + this.part_vals.add(_elem133); + } + 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); } @@ -11826,27 +23719,67 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + 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 _iter134 : this.part_vals) + { + oprot.writeString(_iter134); + } + 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("get_type_all_args("); + StringBuilder sb = new StringBuilder("drop_partition_args("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.name); + 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(); } @@ -11857,19 +23790,22 @@ } - 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 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.MAP, (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 static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private Map success; + 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"), - O2((short)1, "o2"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -11886,7 +23822,9 @@ switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // O2 + case 1: // O1 + return O1; + case 2: // O2 return O2; default: return null; @@ -11928,97 +23866,106 @@ } // 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 MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new StructMetaData(TType.STRUCT, Type.class)))); + 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(get_type_all_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); } - public get_type_all_result() { + public drop_partition_result() { } - public get_type_all_result( - Map success, + 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 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 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 get_type_all_result deepCopy() { - return new get_type_all_result(this); + public drop_partition_result deepCopy() { + return new drop_partition_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; + this.o1 = 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() { + public boolean isSuccess() { return this.success; } - public void setSuccess(Map 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) { + __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.success = null; + this.o1 = null; } } @@ -12051,7 +23998,15 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Map)value); + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); } break; @@ -12069,7 +24024,10 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); + + case O1: + return getO1(); case O2: return getO2(); @@ -12087,6 +24045,8 @@ switch (field) { case SUCCESS: return isSetSuccess(); + case O1: + return isSetO1(); case O2: return isSetO2(); } @@ -12097,21 +24057,30 @@ 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 drop_partition_result) + return this.equals((drop_partition_result)that); return false; } - public boolean equals(get_type_all_result that) { + public boolean equals(drop_partition_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_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; } @@ -12132,13 +24101,13 @@ return 0; } - public int compareTo(get_type_all_result other) { + public int compareTo(drop_partition_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; + drop_partition_result typedOther = (drop_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -12150,6 +24119,16 @@ 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; @@ -12168,36 +24147,32 @@ } 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 _map71 = iprot.readMapBegin(); - this.success = new HashMap(2*_map71.size); - for (int _i72 = 0; _i72 < _map71.size; ++_i72) - { - String _key73; - Type _val74; - _key73 = iprot.readString(); - _val74 = new Type(); - _val74.read(iprot); - this.success.put(_key73, _val74); - } - iprot.readMapEnd(); - } + 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: // O2 + 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); @@ -12219,15 +24194,11 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); - for (Map.Entry _iter75 : this.success.entrySet()) - { - oprot.writeString(_iter75.getKey()); - _iter75.getValue().write(oprot); - } - oprot.writeMapEnd(); - } + 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); @@ -12240,14 +24211,18 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_all_result("); + StringBuilder sb = new StringBuilder("drop_partition_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.o1); } first = false; if (!first) sb.append(", "); @@ -12268,19 +24243,25 @@ } - 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 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 TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + 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 table_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"), - TABLE_NAME((short)2, "table_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(); @@ -12297,8 +24278,12 @@ switch(fieldId) { case 1: // DB_NAME return DB_NAME; - case 2: // TABLE_NAME - return TABLE_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; } @@ -12339,50 +24324,70 @@ } // 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.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + 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(get_fields_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); } - public get_fields_args() { + public drop_partition_by_name_args() { } - public get_fields_args( + public drop_partition_by_name_args( String db_name, - String table_name) + String tbl_name, + String part_name, + boolean deleteData) { this(); this.db_name = db_name; - this.table_name = table_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ - public get_fields_args(get_fields_args 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.isSetTable_name()) { - this.table_name = other.table_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 get_fields_args deepCopy() { - return new get_fields_args(this); + public drop_partition_by_name_args deepCopy() { + return new drop_partition_by_name_args(this); } @Override public void clear() { this.db_name = null; - this.table_name = null; + this.tbl_name = null; + this.part_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; } public String getDb_name() { @@ -12408,29 +24413,74 @@ } } - public String getTable_name() { - return this.table_name; + public String getTbl_name() { + return this.tbl_name; } - public void setTable_name(String table_name) { - this.table_name = table_name; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetTable_name() { - this.table_name = null; + public void unsetTbl_name() { + this.tbl_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; + /** 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 setTable_nameIsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.table_name = null; + 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: @@ -12441,11 +24491,27 @@ } break; - case TABLE_NAME: + case TBL_NAME: if (value == null) { - unsetTable_name(); + unsetTbl_name(); } else { - setTable_name((String)value); + 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; @@ -12457,8 +24523,14 @@ case DB_NAME: return getDb_name(); - case TABLE_NAME: - return getTable_name(); + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case DELETE_DATA: + return new Boolean(isDeleteData()); } throw new IllegalStateException(); @@ -12473,8 +24545,12 @@ switch (field) { case DB_NAME: return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case DELETE_DATA: + return isSetDeleteData(); } throw new IllegalStateException(); } @@ -12483,12 +24559,12 @@ 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 drop_partition_by_name_args) + return this.equals((drop_partition_by_name_args)that); return false; } - public boolean equals(get_fields_args that) { + public boolean equals(drop_partition_by_name_args that) { if (that == null) return false; @@ -12501,12 +24577,30 @@ 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_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.table_name.equals(that.table_name)) + 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; } @@ -12518,13 +24612,13 @@ return 0; } - public int compareTo(get_fields_args other) { + public int compareTo(drop_partition_by_name_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; + drop_partition_by_name_args typedOther = (drop_partition_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -12536,16 +24630,36 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable_name()) { - lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + 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; + } + } return 0; } @@ -12570,9 +24684,24 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TABLE_NAME - if (field.type == TType.STRING) { - this.table_name = iprot.readString(); + 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); } @@ -12595,18 +24724,26 @@ oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); + 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("get_fields_args("); + StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); boolean first = true; sb.append("db_name:"); @@ -12617,13 +24754,25 @@ } first = false; if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.table_name); + 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(); } @@ -12634,25 +24783,22 @@ } - 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 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 SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + 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 List success; - private MetaException o1; - private UnknownTableException o2; - private UnknownDBException o3; + 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"), - O3((short)3, "o3"); + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -12673,8 +24819,6 @@ return O1; case 2: // O2 return O2; - case 3: // O3 - return O3; default: return null; } @@ -12715,116 +24859,91 @@ } // 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 StructMetaData(TType.STRUCT, FieldSchema.class)))); + 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(get_fields_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); } - public get_fields_result() { + public drop_partition_by_name_result() { } - public get_fields_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) + public drop_partition_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) { this(); this.success = success; + setSuccessIsSet(true); 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; - } + 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 MetaException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new UnknownTableException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new UnknownDBException(other.o3); + this.o2 = new MetaException(other.o2); } } - public get_fields_result deepCopy() { - return new get_fields_result(this); + public drop_partition_by_name_result deepCopy() { + return new drop_partition_by_name_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; 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() { + 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 getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -12843,11 +24962,11 @@ } } - public UnknownTableException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(UnknownTableException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -12866,36 +24985,13 @@ } } - 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); + setSuccess((Boolean)value); } break; @@ -12903,7 +24999,7 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); } break; @@ -12911,15 +25007,7 @@ if (value == null) { unsetO2(); } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); + setO2((MetaException)value); } break; @@ -12929,7 +25017,7 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); @@ -12937,9 +25025,6 @@ case O2: return getO2(); - case O3: - return getO3(); - } throw new IllegalStateException(); } @@ -12957,8 +25042,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); } throw new IllegalStateException(); } @@ -12967,21 +25050,21 @@ 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 drop_partition_by_name_result) + return this.equals((drop_partition_by_name_result)that); return false; } - public boolean equals(get_fields_result that) { + public boolean equals(drop_partition_by_name_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; } @@ -13003,15 +25086,6 @@ 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; } @@ -13020,13 +25094,13 @@ return 0; } - public int compareTo(get_fields_result 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; - get_fields_result typedOther = (get_fields_result)other; + drop_partition_by_name_result typedOther = (drop_partition_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -13058,16 +25132,6 @@ 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; } @@ -13086,26 +25150,16 @@ } 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(); - } + 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 = new NoSuchObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -13113,20 +25167,12 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new UnknownTableException(); + this.o2 = new MetaException(); 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); } @@ -13141,14 +25187,7 @@ 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.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -13158,10 +25197,6 @@ 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(); @@ -13169,15 +25204,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_fields_result("); + StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -13195,14 +25226,6 @@ 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(); } @@ -13213,19 +25236,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_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 TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + 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 table_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"), - TABLE_NAME((short)2, "table_name"); + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"); private static final Map byName = new HashMap(); @@ -13242,8 +25268,10 @@ switch(fieldId) { case 1: // DB_NAME return DB_NAME; - case 2: // TABLE_NAME - return TABLE_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_VALS + return PART_VALS; default: return null; } @@ -13290,44 +25318,57 @@ 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, + 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(get_schema_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); } - public get_schema_args() { + public get_partition_args() { } - public get_schema_args( + public get_partition_args( String db_name, - String table_name) + String tbl_name, + List part_vals) { this(); this.db_name = db_name; - this.table_name = table_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; } /** * Performs a deep copy on other. */ - public get_schema_args(get_schema_args other) { + public get_partition_args(get_partition_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } - if (other.isSetTable_name()) { - this.table_name = other.table_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 get_schema_args deepCopy() { - return new get_schema_args(this); + public get_partition_args deepCopy() { + return new get_partition_args(this); } @Override public void clear() { this.db_name = null; - this.table_name = null; + this.tbl_name = null; + this.part_vals = null; } public String getDb_name() { @@ -13353,26 +25394,64 @@ } } - public String getTable_name() { - return this.table_name; + public String getTbl_name() { + return this.tbl_name; } - public void setTable_name(String table_name) { - this.table_name = table_name; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetTable_name() { - this.table_name = null; + public void unsetTbl_name() { + this.tbl_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; + /** 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 setTable_nameIsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.table_name = null; + 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; } } @@ -13386,11 +25465,19 @@ } break; - case TABLE_NAME: + case TBL_NAME: if (value == null) { - unsetTable_name(); + unsetTbl_name(); } else { - setTable_name((String)value); + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); } break; @@ -13402,8 +25489,11 @@ case DB_NAME: return getDb_name(); - case TABLE_NAME: - return getTable_name(); + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); } throw new IllegalStateException(); @@ -13418,8 +25508,10 @@ switch (field) { case DB_NAME: return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); } throw new IllegalStateException(); } @@ -13428,12 +25520,12 @@ 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_partition_args) + return this.equals((get_partition_args)that); return false; } - public boolean equals(get_schema_args that) { + public boolean equals(get_partition_args that) { if (that == null) return false; @@ -13446,12 +25538,21 @@ 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_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.table_name.equals(that.table_name)) + 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; } @@ -13463,13 +25564,13 @@ return 0; } - public int compareTo(get_schema_args other) { + public int compareTo(get_partition_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; + get_partition_args typedOther = (get_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -13481,12 +25582,22 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetTable_name()) { - lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + 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; } @@ -13515,9 +25626,26 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TABLE_NAME + case 2: // TBL_NAME if (field.type == TType.STRING) { - this.table_name = iprot.readString(); + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list135 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list135.size); + for (int _i136 = 0; _i136 < _list135.size; ++_i136) + { + String _elem137; + _elem137 = iprot.readString(); + this.part_vals.add(_elem137); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -13540,9 +25668,21 @@ oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); + 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 _iter138 : this.part_vals) + { + oprot.writeString(_iter138); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -13551,7 +25691,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_schema_args("); + StringBuilder sb = new StringBuilder("get_partition_args("); boolean first = true; sb.append("db_name:"); @@ -13562,11 +25702,19 @@ } first = false; if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.table_name); + 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(")"); @@ -13579,25 +25727,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 get_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + 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 List success; + private Partition success; private MetaException o1; - private UnknownTableException o2; - private UnknownDBException o3; + 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"), - O3((short)3, "o3"); + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -13618,8 +25763,6 @@ return O1; case 2: // O2 return O2; - case 3: // O3 - return O3; default: return null; } @@ -13665,88 +25808,60 @@ 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)))); + 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(get_schema_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); } - public get_schema_result() { + public get_partition_result() { } - public get_schema_result( - List success, + public get_partition_result( + Partition success, MetaException o1, - UnknownTableException o2, - UnknownDBException o3) + NoSuchObjectException o2) { 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) { + public get_partition_result(get_partition_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; + this.success = new Partition(other.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); + this.o2 = new NoSuchObjectException(other.o2); } } - 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 get_partition_result deepCopy() { + return new get_partition_result(this); } - public List getSuccess() { + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Partition getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(Partition success) { this.success = success; } @@ -13788,11 +25903,11 @@ } } - public UnknownTableException getO2() { + public NoSuchObjectException getO2() { return this.o2; } - public void setO2(UnknownTableException o2) { + public void setO2(NoSuchObjectException o2) { this.o2 = o2; } @@ -13811,36 +25926,13 @@ } } - 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); + setSuccess((Partition)value); } break; @@ -13856,15 +25948,7 @@ if (value == null) { unsetO2(); } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); + setO2((NoSuchObjectException)value); } break; @@ -13882,9 +25966,6 @@ case O2: return getO2(); - case O3: - return getO3(); - } throw new IllegalStateException(); } @@ -13902,8 +25983,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); } throw new IllegalStateException(); } @@ -13912,12 +25991,12 @@ 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 get_partition_result) + return this.equals((get_partition_result)that); return false; } - public boolean equals(get_schema_result that) { + public boolean equals(get_partition_result that) { if (that == null) return false; @@ -13948,15 +26027,6 @@ 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; } @@ -13965,13 +26035,13 @@ return 0; } - public int compareTo(get_schema_result other) { + public int compareTo(get_partition_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; + get_partition_result typedOther = (get_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -14003,16 +26073,6 @@ 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; } @@ -14031,19 +26091,9 @@ } 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(); - } + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -14058,20 +26108,12 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new UnknownTableException(); + this.o2 = new NoSuchObjectException(); 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); } @@ -14086,14 +26128,7 @@ 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(); - } + this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -14103,10 +26138,6 @@ 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(); @@ -14114,7 +26145,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_schema_result("); + StringBuilder sb = new StringBuilder("get_partition_result("); boolean first = true; sb.append("success:"); @@ -14140,158 +26171,366 @@ 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 void validate() throws TException { + // check for required fields + } + + } + + 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 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 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 { + 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(); + + 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: // USER_NAME + return USER_NAME; + case 5: // GROUP_NAMES + return GROUP_NAMES; + 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)))); + 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_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 static class create_table_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_table_args"); + public void unsetDb_name() { + this.db_name = null; + } - private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1); + /** 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; + } - private Table tbl; + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } - /** 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"); + public String getTbl_name() { + return this.tbl_name; + } - private static final Map byName = new HashMap(); + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } + public void unsetTbl_name() { + this.tbl_name = null; + } - /** - * 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; - } - } + /** 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; + } - /** - * 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 setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; } + } - /** - * 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 getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); + } - private final short _thriftId; - private final String _fieldName; + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); } + this.part_vals.add(elem); + } - public short getThriftFieldId() { - return _thriftId; - } + public List getPart_vals() { + return this.part_vals; + } - public String getFieldName() { - return _fieldName; + 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; } } - // isset id assignments + public String getUser_name() { + return this.user_name; + } - 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 void setUser_name(String user_name) { + this.user_name = user_name; } - public create_table_args() { + public void unsetUser_name() { + this.user_name = null; } - public create_table_args( - Table tbl) - { - this(); - this.tbl = tbl; + /** 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; } - /** - * Performs a deep copy on other. - */ - public create_table_args(create_table_args other) { - if (other.isSetTbl()) { - this.tbl = new Table(other.tbl); + public void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; } } - public create_table_args deepCopy() { - return new create_table_args(this); + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - @Override - public void clear() { - this.tbl = null; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public Table getTbl() { - return this.tbl; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); } - public void setTbl(Table tbl) { - this.tbl = tbl; + public List getGroup_names() { + return this.group_names; } - public void unsetTbl() { - this.tbl = null; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - /** Returns true if field tbl is set (has been asigned a value) and false otherwise */ - public boolean isSetTbl() { - return this.tbl != null; + public void unsetGroup_names() { + this.group_names = null; } - public void setTblIsSet(boolean value) { + /** 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.tbl = null; + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case TBL: + case DB_NAME: if (value == null) { - unsetTbl(); + unsetDb_name(); } else { - setTbl((Table)value); + 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 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; @@ -14300,8 +26539,20 @@ public Object getFieldValue(_Fields field) { switch (field) { - case TBL: - return getTbl(); + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -14314,31 +26565,75 @@ } switch (field) { - case TBL: - return isSetTbl(); + 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(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_with_auth_args) + return this.equals((get_partition_with_auth_args)that); + return false; + } + + public boolean equals(get_partition_with_auth_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; } - 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_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_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_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.tbl.equals(that.tbl)) + if (!this.group_names.equals(that.group_names)) return false; } @@ -14350,20 +26645,60 @@ return 0; } - public int compareTo(create_table_args 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; - create_table_args typedOther = (create_table_args)other; + get_partition_with_auth_args typedOther = (get_partition_with_auth_args)other; - lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl()) { - lastComparison = TBaseHelper.compareTo(this.tbl, typedOther.tbl); + 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(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; } @@ -14385,10 +26720,57 @@ break; } switch (field.id) { - case 1: // TBL - if (field.type == TType.STRUCT) { - this.tbl = new Table(); - this.tbl.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 _list139 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list139.size); + for (int _i140 = 0; _i140 < _list139.size; ++_i140) + { + String _elem141; + _elem141 = iprot.readString(); + this.part_vals.add(_elem141); + } + iprot.readListEnd(); + } + } 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 _list142 = iprot.readListBegin(); + this.group_names = new ArrayList(_list142.size); + for (int _i143 = 0; _i143 < _list142.size; ++_i143) + { + String _elem144; + _elem144 = iprot.readString(); + this.group_names.add(_elem144); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -14406,9 +26788,43 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); + 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 _iter145 : this.part_vals) + { + oprot.writeString(_iter145); + } + 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 _iter146 : this.group_names) + { + oprot.writeString(_iter146); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -14417,14 +26833,46 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_table_args("); + StringBuilder sb = new StringBuilder("get_partition_with_auth_args("); boolean first = true; - sb.append("tbl:"); - if (this.tbl == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.tbl); + 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("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(")"); @@ -14437,25 +26885,22 @@ } - 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_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 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 O4_FIELD_DESC = new TField("o4", TType.STRUCT, (short)4); - private AlreadyExistsException o1; - private InvalidObjectException o2; - private MetaException o3; - private NoSuchObjectException o4; + 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 { + SUCCESS((short)0, "success"), O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"), - O4((short)4, "o4"); + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -14470,14 +26915,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 4: // O4 - return O4; default: return null; } @@ -14522,69 +26965,84 @@ 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.O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_with_auth_result.class, metaDataMap); } - public create_table_result() { + public get_partition_with_auth_result() { } - public create_table_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) + public get_partition_with_auth_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); + this.success = success; 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) { + public get_partition_with_auth_result(get_partition_with_auth_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); + this.o1 = new MetaException(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); + this.o2 = new NoSuchObjectException(other.o2); } } - public create_table_result deepCopy() { - return new create_table_result(this); + public get_partition_with_auth_result deepCopy() { + return new get_partition_with_auth_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; } - @Override - public void clear() { - this.o1 = null; - this.o2 = null; - this.o3 = null; - this.o4 = null; + /** Returns true if field success is set (has been asigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; } - public AlreadyExistsException getO1() { + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { return this.o1; } - public void setO1(AlreadyExistsException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -14603,11 +27061,11 @@ } } - public InvalidObjectException getO2() { + public NoSuchObjectException getO2() { return this.o2; } - public void setO2(InvalidObjectException o2) { + public void setO2(NoSuchObjectException o2) { this.o2 = o2; } @@ -14626,83 +27084,29 @@ } } - 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: + case SUCCESS: if (value == null) { - unsetO2(); + unsetSuccess(); } else { - setO2((InvalidObjectException)value); + setSuccess((Partition)value); } break; - case O3: + case O1: if (value == null) { - unsetO3(); + unsetO1(); } else { - setO3((MetaException)value); + setO1((MetaException)value); } break; - case O4: + case O2: if (value == null) { - unsetO4(); + unsetO2(); } else { - setO4((NoSuchObjectException)value); + setO2((NoSuchObjectException)value); } break; @@ -14711,18 +27115,15 @@ public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); case O2: return getO2(); - case O3: - return getO3(); - - case O4: - return getO4(); - } throw new IllegalStateException(); } @@ -14734,14 +27135,12 @@ } switch (field) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); } throw new IllegalStateException(); } @@ -14750,15 +27149,24 @@ 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_partition_with_auth_result) + return this.equals((get_partition_with_auth_result)that); return false; } - public boolean equals(create_table_result that) { + public boolean equals(get_partition_with_auth_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) { @@ -14777,24 +27185,6 @@ 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; } @@ -14803,50 +27193,40 @@ return 0; } - public int compareTo(create_table_result 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; - create_table_result typedOther = (create_table_result)other; + get_partition_with_auth_result typedOther = (get_partition_with_auth_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()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetO2()) { - lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } - if (isSetO4()) { - lastComparison = TBaseHelper.compareTo(this.o4, typedOther.o4); + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -14868,34 +27248,26 @@ 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 + case 0: // SUCCESS if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); + this.success = new Partition(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // O3 + case 1: // O1 if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: // O4 + case 2: // O2 if (field.type == TType.STRUCT) { - this.o4 = new NoSuchObjectException(); - this.o4.read(iprot); + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -14912,7 +27284,11 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + 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(); @@ -14920,14 +27296,6 @@ 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(); @@ -14935,9 +27303,17 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_table_result("); + StringBuilder sb = new StringBuilder("get_partition_with_auth_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"); @@ -14953,22 +27329,6 @@ 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(); } @@ -14979,22 +27339,22 @@ } - 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_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 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 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 dbname; - private String name; - private boolean deleteData; + 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 { - DBNAME((short)1, "dbname"), - NAME((short)2, "name"), - DELETE_DATA((short)3, "deleteData"); + 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(); @@ -15009,12 +27369,12 @@ */ 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 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; default: return null; } @@ -15055,155 +27415,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.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); } - public drop_table_args() { + public get_partition_by_name_args() { } - - public drop_table_args( - String dbname, - String name, - boolean deleteData) + + public get_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) { this(); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; } /** * 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_partition_by_name_args(get_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetName()) { - this.name = other.name; + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } - this.deleteData = other.deleteData; + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } } - public drop_table_args deepCopy() { - return new drop_table_args(this); + public get_partition_by_name_args deepCopy() { + return new get_partition_by_name_args(this); } @Override public void clear() { - this.dbname = null; - this.name = null; - setDeleteDataIsSet(false); - this.deleteData = false; + this.db_name = null; + this.tbl_name = null; + this.part_name = null; } - public String getDbname() { - return this.dbname; + public String getDb_name() { + return this.db_name; } - public void setDbname(String dbname) { - this.dbname = dbname; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetDbname() { - this.dbname = null; + public void unsetDb_name() { + this.db_name = 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 db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setDbnameIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.dbname = null; + this.db_name = null; } } - public String getName() { - return this.name; + public String getTbl_name() { + return this.tbl_name; } - public void setName(String name) { - this.name = name; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetName() { - this.name = null; + public void unsetTbl_name() { + this.tbl_name = 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 tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setNameIsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.name = null; + this.tbl_name = null; } } - public boolean isDeleteData() { - return this.deleteData; + public String getPart_name() { + return this.part_name; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + public void unsetPart_name() { + this.part_name = 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 part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DBNAME: + case DB_NAME: if (value == null) { - unsetDbname(); + unsetDb_name(); } else { - setDbname((String)value); + setDb_name((String)value); } break; - case NAME: + case TBL_NAME: if (value == null) { - unsetName(); + unsetTbl_name(); } else { - setName((String)value); + setTbl_name((String)value); } break; - case DELETE_DATA: + case PART_NAME: if (value == null) { - unsetDeleteData(); + unsetPart_name(); } else { - setDeleteData((Boolean)value); + setPart_name((String)value); } break; @@ -15212,14 +27569,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DBNAME: - return getDbname(); + case DB_NAME: + return getDb_name(); - case NAME: - return getName(); + case TBL_NAME: + return getTbl_name(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case PART_NAME: + return getPart_name(); } throw new IllegalStateException(); @@ -15232,12 +27589,12 @@ } switch (field) { - case DBNAME: - return isSetDbname(); - case NAME: - return isSetName(); - case DELETE_DATA: - return isSetDeleteData(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); } throw new IllegalStateException(); } @@ -15246,39 +27603,39 @@ 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_partition_by_name_args) + return this.equals((get_partition_by_name_args)that); return false; } - public boolean equals(drop_table_args that) { + public boolean equals(get_partition_by_name_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)) + 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.dbname.equals(that.dbname)) + if (!this.db_name.equals(that.db_name)) 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_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.name.equals(that.name)) + if (!this.tbl_name.equals(that.tbl_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)) + 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.deleteData != that.deleteData) + if (!this.part_name.equals(that.part_name)) return false; } @@ -15290,40 +27647,40 @@ return 0; } - public int compareTo(drop_table_args 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_table_args typedOther = (drop_table_args)other; + get_partition_by_name_args typedOther = (get_partition_by_name_args)other; - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetDbname()) { - lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetName()) { - lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } @@ -15345,24 +27702,23 @@ break; } switch (field.id) { - case 1: // DBNAME + case 1: // DB_NAME if (field.type == TType.STRING) { - this.dbname = iprot.readString(); + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // NAME + case 2: // TBL_NAME if (field.type == TType.STRING) { - this.name = iprot.readString(); + this.tbl_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); + case 3: // PART_NAME + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -15380,46 +27736,52 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - 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("drop_table_args("); + StringBuilder sb = new StringBuilder("get_partition_by_name_args("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.dbname); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); + 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(); @@ -15431,19 +27793,22 @@ } - 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 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 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 O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private NoSuchObjectException o1; - private MetaException o3; + 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 { + SUCCESS((short)0, "success"), O1((short)1, "o1"), - O3((short)2, "o3"); + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -15458,10 +27823,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; case 1: // O1 return O1; - case 2: // O3 - return O3; + case 2: // O2 + return O2; default: return null; } @@ -15506,53 +27873,84 @@ 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.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); } - public drop_table_result() { + public get_partition_by_name_result() { } - public drop_table_result( - NoSuchObjectException o1, - MetaException o3) + public get_partition_by_name_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); + this.success = success; this.o1 = o1; - this.o3 = o3; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public drop_table_result(drop_table_result other) { + 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 NoSuchObjectException(other.o1); + this.o1 = new MetaException(other.o1); } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); } } - public drop_table_result deepCopy() { - return new drop_table_result(this); + public get_partition_by_name_result deepCopy() { + return new get_partition_by_name_result(this); } @Override public void clear() { + this.success = null; this.o1 = null; - this.o3 = null; + this.o2 = null; } - public NoSuchObjectException getO1() { + 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 MetaException getO1() { return this.o1; } - public void setO1(NoSuchObjectException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -15571,44 +27969,52 @@ } } - public MetaException getO3() { - return this.o3; + public NoSuchObjectException getO2() { + return this.o2; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; } - public void unsetO3() { - this.o3 = null; + public void unsetO2() { + this.o2 = 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 o2 is set (has been asigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; } - public void setO3IsSet(boolean value) { + public void setO2IsSet(boolean value) { if (!value) { - this.o3 = null; + 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) { unsetO1(); } else { - setO1((NoSuchObjectException)value); + setO1((MetaException)value); } break; - case O3: + case O2: if (value == null) { - unsetO3(); + unsetO2(); } else { - setO3((MetaException)value); + setO2((NoSuchObjectException)value); } break; @@ -15617,11 +28023,14 @@ public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); - case O3: - return getO3(); + case O2: + return getO2(); } throw new IllegalStateException(); @@ -15634,10 +28043,12 @@ } switch (field) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); - case O3: - return isSetO3(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -15646,15 +28057,24 @@ 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 get_partition_by_name_result) + return this.equals((get_partition_by_name_result)that); return false; } - public boolean equals(drop_table_result that) { + 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) { @@ -15664,12 +28084,12 @@ 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_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.o3.equals(that.o3)) + if (!this.o2.equals(that.o2)) return false; } @@ -15681,14 +28101,24 @@ return 0; } - public int compareTo(drop_table_result 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; - drop_table_result typedOther = (drop_table_result)other; + get_partition_by_name_result typedOther = (get_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; @@ -15699,12 +28129,12 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; } - if (isSetO3()) { - lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (isSetO2()) { + lastComparison = TBaseHelper.compareTo(this.o2, typedOther.o2); if (lastComparison != 0) { return lastComparison; } @@ -15726,18 +28156,26 @@ 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 NoSuchObjectException(); + this.o1 = new MetaException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O3 + case 2: // O2 if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -15754,13 +28192,17 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + 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.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -15769,9 +28211,17 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_table_result("); + StringBuilder sb = new StringBuilder("get_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"); @@ -15780,11 +28230,11 @@ } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("o2:"); + if (this.o2 == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.o2); } first = false; sb.append(")"); @@ -15797,19 +28247,22 @@ } - 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 get_partitions_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partitions_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 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 String db_name; - private String pattern; + 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 { DB_NAME((short)1, "db_name"), - PATTERN((short)2, "pattern"); + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); private static final Map byName = new HashMap(); @@ -15826,8 +28279,10 @@ switch(fieldId) { case 1: // DB_NAME return DB_NAME; - case 2: // PATTERN - return PATTERN; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -15868,50 +28323,64 @@ } // 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.PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + 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_tables_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); } - public get_tables_args() { + public get_partitions_args() { + this.max_parts = (short)-1; + } - public get_tables_args( + public get_partitions_args( String db_name, - String pattern) + String tbl_name, + short max_parts) { this(); this.db_name = db_name; - this.pattern = pattern; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ - public get_tables_args(get_tables_args 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; } - if (other.isSetPattern()) { - this.pattern = other.pattern; + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } + this.max_parts = other.max_parts; } - public get_tables_args deepCopy() { - return new get_tables_args(this); + public get_partitions_args deepCopy() { + return new get_partitions_args(this); } @Override public void clear() { this.db_name = null; - this.pattern = null; + this.tbl_name = null; + this.max_parts = (short)-1; + } public String getDb_name() { @@ -15937,44 +28406,74 @@ } } - public String getPattern() { - return this.pattern; + public String getTbl_name() { + return this.tbl_name; } - public void setPattern(String pattern) { - this.pattern = pattern; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetPattern() { - this.pattern = null; + public void unsetTbl_name() { + this.tbl_name = 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 tbl_name is set (has been asigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public void setPatternIsSet(boolean value) { + public void setTbl_nameIsSet(boolean value) { if (!value) { - this.pattern = null; + this.tbl_name = 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); + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); } break; - case PATTERN: + case MAX_PARTS: if (value == null) { - unsetPattern(); + unsetMax_parts(); } else { - setPattern((String)value); + setMax_parts((Short)value); } break; @@ -15986,8 +28485,11 @@ case DB_NAME: return getDb_name(); - case PATTERN: - return getPattern(); + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return new Short(getMax_parts()); } throw new IllegalStateException(); @@ -16002,8 +28504,10 @@ switch (field) { case DB_NAME: return isSetDb_name(); - case PATTERN: - return isSetPattern(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -16012,12 +28516,12 @@ 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 get_partitions_args) + return this.equals((get_partitions_args)that); return false; } - public boolean equals(get_tables_args that) { + public boolean equals(get_partitions_args that) { if (that == null) return false; @@ -16030,12 +28534,21 @@ 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_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.pattern.equals(that.pattern)) + 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; } @@ -16047,13 +28560,13 @@ return 0; } - public int compareTo(get_tables_args other) { + public int compareTo(get_partitions_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; + get_partitions_args typedOther = (get_partitions_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -16065,12 +28578,22 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetPattern()) { - lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + 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; } @@ -16099,9 +28622,17 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 2: // PATTERN + case 2: // TBL_NAME if (field.type == TType.STRING) { - this.pattern = iprot.readString(); + 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); } @@ -16124,18 +28655,21 @@ oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); + 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_tables_args("); + StringBuilder sb = new StringBuilder("get_partitions_args("); boolean first = true; sb.append("db_name:"); @@ -16146,13 +28680,17 @@ } first = false; if (!first) sb.append(", "); - sb.append("pattern:"); - if (this.pattern == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.pattern); + 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(); } @@ -16163,19 +28701,22 @@ } - 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 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 MetaException o1; + 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"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -16194,6 +28735,8 @@ return SUCCESS; case 1: // O1 return O1; + case 2: // O2 + return O2; default: return null; } @@ -16240,71 +28783,79 @@ 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)))); + 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_tables_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); } - public get_tables_result() { + public get_partitions_result() { } - public get_tables_result( - List success, - MetaException o1) + 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_tables_result(get_tables_result other) { + public get_partitions_result(get_partitions_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); + 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); + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public get_tables_result deepCopy() { - return new get_tables_result(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() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(String elem) { + public void addToSuccess(Partition elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(List success) { this.success = success; } @@ -16323,11 +28874,11 @@ } } - public MetaException getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -16346,13 +28897,36 @@ } } + 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((List)value); + setSuccess((List)value); } break; @@ -16360,7 +28934,15 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -16375,6 +28957,9 @@ case O1: return getO1(); + case O2: + return getO2(); + } throw new IllegalStateException(); } @@ -16390,6 +28975,8 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -16398,12 +28985,12 @@ 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 get_partitions_result) + return this.equals((get_partitions_result)that); return false; } - public boolean equals(get_tables_result that) { + public boolean equals(get_partitions_result that) { if (that == null) return false; @@ -16425,6 +29012,15 @@ 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; } @@ -16433,13 +29029,13 @@ return 0; } - public int compareTo(get_tables_result other) { + public int compareTo(get_partitions_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; + get_partitions_result typedOther = (get_partitions_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -16461,6 +29057,16 @@ 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; } @@ -16481,13 +29087,14 @@ 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) + TList _list147 = iprot.readListBegin(); + this.success = new ArrayList(_list147.size); + for (int _i148 = 0; _i148 < _list147.size; ++_i148) { - String _elem86; - _elem86 = iprot.readString(); - this.success.add(_elem86); + Partition _elem149; + _elem149 = new Partition(); + _elem149.read(iprot); + this.success.add(_elem149); } iprot.readListEnd(); } @@ -16497,12 +29104,20 @@ break; case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + 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); } @@ -16518,10 +29133,10 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter87 : this.success) + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter150 : this.success) { - oprot.writeString(_iter87); + _iter150.write(oprot); } oprot.writeListEnd(); } @@ -16530,6 +29145,10 @@ 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(); @@ -16537,7 +29156,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_tables_result("); + StringBuilder sb = new StringBuilder("get_partitions_result("); boolean first = true; sb.append("success:"); @@ -16555,6 +29174,14 @@ 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(); } @@ -16565,16 +29192,28 @@ } - 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 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 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 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 { - DB_NAME((short)1, "db_name"); + 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(); @@ -16591,6 +29230,14 @@ switch(fieldId) { 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; } @@ -16631,42 +29278,85 @@ } // 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.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_all_tables_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_args.class, metaDataMap); } - public get_all_tables_args() { + public get_partitions_with_auth_args() { + this.max_parts = (short)-1; + } - public get_all_tables_args( - String db_name) + public get_partitions_with_auth_args( + String db_name, + String tbl_name, + short max_parts, + String user_name, + List group_names) { this(); 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_tables_args(get_all_tables_args other) { + 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.group_names = __this__group_names; + } } - public get_all_tables_args deepCopy() { - return new get_all_tables_args(this); + 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() { @@ -16692,6 +29382,112 @@ } } + 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 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 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 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 DB_NAME: @@ -16702,6 +29498,38 @@ } break; + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + 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; + } } @@ -16710,6 +29538,18 @@ case DB_NAME: return getDb_name(); + 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(); } @@ -16723,6 +29563,14 @@ switch (field) { 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(); } @@ -16731,12 +29579,12 @@ 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 get_partitions_with_auth_args) + return this.equals((get_partitions_with_auth_args)that); return false; } - public boolean equals(get_all_tables_args that) { + public boolean equals(get_partitions_with_auth_args that) { if (that == null) return false; @@ -16749,6 +29597,42 @@ 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_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; + } + return true; } @@ -16757,20 +29641,60 @@ return 0; } - public int compareTo(get_all_tables_args 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_tables_args typedOther = (get_all_tables_args)other; + get_partitions_with_auth_args typedOther = (get_partitions_with_auth_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 (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(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; } @@ -16799,6 +29723,45 @@ 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 _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); + } + break; default: TProtocolUtil.skip(iprot, field.type); } @@ -16817,13 +29780,38 @@ 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.group_names.size())); + for (String _iter154 : this.group_names) + { + oprot.writeString(_iter154); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_args("); + StringBuilder sb = new StringBuilder("get_partitions_with_auth_args("); boolean first = true; sb.append("db_name:"); @@ -16833,6 +29821,34 @@ 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("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(")"); return sb.toString(); } @@ -16843,19 +29859,22 @@ } - 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 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 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 MetaException o1; + 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"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -16874,6 +29893,8 @@ return SUCCESS; case 1: // O1 return O1; + case 2: // O2 + return O2; default: return null; } @@ -16920,71 +29941,79 @@ 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)))); + 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_tables_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_result.class, metaDataMap); } - public get_all_tables_result() { + public get_partitions_with_auth_result() { } - public get_all_tables_result( - List success, - MetaException o1) + public get_partitions_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_all_tables_result(get_all_tables_result other) { + public get_partitions_with_auth_result(get_partitions_with_auth_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); + 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); + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public get_all_tables_result deepCopy() { - return new get_all_tables_result(this); + public get_partitions_with_auth_result deepCopy() { + return new get_partitions_with_auth_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() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(String elem) { + public void addToSuccess(Partition elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(List success) { this.success = success; } @@ -17003,11 +30032,11 @@ } } - public MetaException getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -17026,13 +30055,36 @@ } } + 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((List)value); + setSuccess((List)value); } break; @@ -17040,7 +30092,15 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -17055,6 +30115,9 @@ case O1: return getO1(); + case O2: + return getO2(); + } throw new IllegalStateException(); } @@ -17070,6 +30133,8 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -17078,12 +30143,12 @@ 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 get_partitions_with_auth_result) + return this.equals((get_partitions_with_auth_result)that); return false; } - public boolean equals(get_all_tables_result that) { + public boolean equals(get_partitions_with_auth_result that) { if (that == null) return false; @@ -17105,6 +30170,15 @@ 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; } @@ -17113,13 +30187,13 @@ return 0; } - public int compareTo(get_all_tables_result 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_all_tables_result typedOther = (get_all_tables_result)other; + get_partitions_with_auth_result typedOther = (get_partitions_with_auth_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -17141,6 +30215,16 @@ 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; } @@ -17161,13 +30245,14 @@ 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) + TList _list155 = iprot.readListBegin(); + this.success = new ArrayList(_list155.size); + for (int _i156 = 0; _i156 < _list155.size; ++_i156) { - String _elem90; - _elem90 = iprot.readString(); - this.success.add(_elem90); + Partition _elem157; + _elem157 = new Partition(); + _elem157.read(iprot); + this.success.add(_elem157); } iprot.readListEnd(); } @@ -17177,12 +30262,20 @@ break; case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + 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); } @@ -17198,10 +30291,10 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter91 : this.success) + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter158 : this.success) { - oprot.writeString(_iter91); + _iter158.write(oprot); } oprot.writeListEnd(); } @@ -17210,6 +30303,10 @@ 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(); @@ -17217,7 +30314,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_result("); + StringBuilder sb = new StringBuilder("get_partitions_with_auth_result("); boolean first = true; sb.append("success:"); @@ -17235,6 +30332,14 @@ 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(); } @@ -17245,19 +30350,22 @@ } - 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 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 DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (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 String dbname; + 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 { - DBNAME((short)1, "dbname"), - TBL_NAME((short)2, "tbl_name"); + 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(); @@ -17272,10 +30380,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DBNAME - return DBNAME; + case 1: // DB_NAME + return DB_NAME; case 2: // TBL_NAME return TBL_NAME; + case 3: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -17316,72 +30426,86 @@ } // 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.DBNAME, new FieldMetaData("dbname", 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))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); } - public get_table_args() { + public get_partition_names_args() { + this.max_parts = (short)-1; + } - public get_table_args( - String dbname, - String tbl_name) + public get_partition_names_args( + String db_name, + String tbl_name, + short max_parts) { this(); - this.dbname = dbname; + 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_table_args(get_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; + 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.isSetTbl_name()) { this.tbl_name = other.tbl_name; } + this.max_parts = other.max_parts; } - public get_table_args deepCopy() { - return new get_table_args(this); + public get_partition_names_args deepCopy() { + return new get_partition_names_args(this); } @Override public void clear() { - this.dbname = null; + this.db_name = null; this.tbl_name = null; + this.max_parts = (short)-1; + } - public String getDbname() { - return this.dbname; + public String getDb_name() { + return this.db_name; } - public void setDbname(String dbname) { - this.dbname = dbname; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetDbname() { - this.dbname = null; + public void unsetDb_name() { + this.db_name = 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 db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setDbnameIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.dbname = null; + this.db_name = null; } } @@ -17408,13 +30532,35 @@ } } + 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 DBNAME: + case DB_NAME: if (value == null) { - unsetDbname(); + unsetDb_name(); } else { - setDbname((String)value); + setDb_name((String)value); } break; @@ -17426,17 +30572,28 @@ } break; + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { - case DBNAME: - return getDbname(); + case DB_NAME: + return getDb_name(); case TBL_NAME: return getTbl_name(); + case MAX_PARTS: + return new Short(getMax_parts()); + } throw new IllegalStateException(); } @@ -17448,10 +30605,12 @@ } switch (field) { - case DBNAME: - return isSetDbname(); + case DB_NAME: + return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -17460,21 +30619,21 @@ 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 get_partition_names_args) + return this.equals((get_partition_names_args)that); return false; } - public boolean equals(get_table_args that) { + public boolean equals(get_partition_names_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)) + 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.dbname.equals(that.dbname)) + if (!this.db_name.equals(that.db_name)) return false; } @@ -17487,6 +30646,15 @@ 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; + } + return true; } @@ -17495,20 +30663,20 @@ return 0; } - public int compareTo(get_table_args 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_table_args typedOther = (get_table_args)other; + get_partition_names_args typedOther = (get_partition_names_args)other; - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetDbname()) { - lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } @@ -17523,6 +30691,16 @@ 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; + } + } return 0; } @@ -17540,9 +30718,9 @@ break; } switch (field.id) { - case 1: // DBNAME + case 1: // DB_NAME if (field.type == TType.STRING) { - this.dbname = iprot.readString(); + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -17554,6 +30732,14 @@ 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; default: TProtocolUtil.skip(iprot, field.type); } @@ -17567,9 +30753,9 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { @@ -17577,20 +30763,23 @@ 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_table_args("); + StringBuilder sb = new StringBuilder("get_partition_names_args("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.dbname); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); @@ -17601,6 +30790,10 @@ 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(); } @@ -17611,22 +30804,19 @@ } - 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 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 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 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 Table success; - private MetaException o1; - private NoSuchObjectException o2; + 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 { SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + O2((short)1, "o2"); private static final Map byName = new HashMap(); @@ -17643,9 +30833,7 @@ switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // O1 - return O1; - case 2: // O2 + case 1: // O2 return O2; default: return null; @@ -17692,60 +30880,72 @@ 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))); + 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(get_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); } - public get_table_result() { + public get_partition_names_result() { } - public get_table_result( - Table success, - MetaException o1, - NoSuchObjectException o2) + public get_partition_names_result( + List success, + MetaException 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) { + public get_partition_names_result(get_partition_names_result other) { if (other.isSetSuccess()) { - this.success = new Table(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + 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 NoSuchObjectException(other.o2); + this.o2 = new MetaException(other.o2); } } - public get_table_result deepCopy() { - return new get_table_result(this); + public get_partition_names_result deepCopy() { + return new get_partition_names_result(this); } @Override public void clear() { this.success = null; - this.o1 = null; this.o2 = null; } - public Table getSuccess() { + 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(Table success) { + public void setSuccess(List success) { this.success = success; } @@ -17764,34 +30964,11 @@ } } - 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() { + public MetaException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -17811,20 +30988,12 @@ } public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Table)value); - } - break; - - case O1: + switch (field) { + case SUCCESS: if (value == null) { - unsetO1(); + unsetSuccess(); } else { - setO1((MetaException)value); + setSuccess((List)value); } break; @@ -17832,7 +31001,7 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((MetaException)value); } break; @@ -17844,9 +31013,6 @@ case SUCCESS: return getSuccess(); - case O1: - return getO1(); - case O2: return getO2(); @@ -17863,8 +31029,6 @@ switch (field) { case SUCCESS: return isSetSuccess(); - case O1: - return isSetO1(); case O2: return isSetO2(); } @@ -17875,12 +31039,12 @@ 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 get_partition_names_result) + return this.equals((get_partition_names_result)that); return false; } - public boolean equals(get_table_result that) { + public boolean equals(get_partition_names_result that) { if (that == null) return false; @@ -17893,15 +31057,6 @@ 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) { @@ -17919,13 +31074,13 @@ return 0; } - public int compareTo(get_table_result other) { + public int compareTo(get_partition_names_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; + get_partition_names_result typedOther = (get_partition_names_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -17937,16 +31092,6 @@ 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; @@ -17975,24 +31120,25 @@ } 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); + if (field.type == TType.LIST) { + { + TList _list159 = iprot.readListBegin(); + this.success = new ArrayList(_list159.size); + for (int _i160 = 0; _i160 < _list159.size; ++_i160) + { + String _elem161; + _elem161 = iprot.readString(); + this.success.add(_elem161); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 + case 1: // O2 if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + this.o2 = new MetaException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -18012,11 +31158,14 @@ 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.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter162 : this.success) + { + oprot.writeString(_iter162); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); @@ -18029,7 +31178,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_table_result("); + StringBuilder sb = new StringBuilder("get_partition_names_result("); boolean first = true; sb.append("success:"); @@ -18040,14 +31189,6 @@ } 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"); @@ -18065,22 +31206,25 @@ } - 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 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 DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (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 NEW_TBL_FIELD_DESC = new TField("new_tbl", TType.STRUCT, (short)3); + 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 String dbname; + private String db_name; private String tbl_name; - private Table new_tbl; + 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 { - DBNAME((short)1, "dbname"), + DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - NEW_TBL((short)3, "new_tbl"); + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); @@ -18095,12 +31239,14 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // DBNAME - return DBNAME; + case 1: // DB_NAME + return DB_NAME; case 2: // TBL_NAME return TBL_NAME; - case 3: // NEW_TBL - return NEW_TBL; + case 3: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -18141,80 +31287,99 @@ } // 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.DBNAME, new FieldMetaData("dbname", 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.NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); + 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(alter_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); } - public alter_table_args() { + public get_partitions_ps_args() { + this.max_parts = (short)-1; + } - public alter_table_args( - String dbname, + public get_partitions_ps_args( + String db_name, String tbl_name, - Table new_tbl) + List part_vals, + short max_parts) { this(); - this.dbname = dbname; + this.db_name = db_name; this.tbl_name = tbl_name; - this.new_tbl = new_tbl; + this.part_vals = part_vals; + this.max_parts = max_parts; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ - public alter_table_args(alter_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; + public get_partitions_ps_args(get_partitions_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.isSetNew_tbl()) { - this.new_tbl = new Table(other.new_tbl); + 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 alter_table_args deepCopy() { - return new alter_table_args(this); + public get_partitions_ps_args deepCopy() { + return new get_partitions_ps_args(this); } @Override public void clear() { - this.dbname = null; + this.db_name = null; this.tbl_name = null; - this.new_tbl = null; + this.part_vals = null; + this.max_parts = (short)-1; + } - public String getDbname() { - return this.dbname; + public String getDb_name() { + return this.db_name; } - public void setDbname(String dbname) { - this.dbname = dbname; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetDbname() { - this.dbname = null; + public void unsetDb_name() { + this.db_name = 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 db_name is set (has been asigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; } - public void setDbnameIsSet(boolean value) { + public void setDb_nameIsSet(boolean value) { if (!value) { - this.dbname = null; + this.db_name = null; } } @@ -18241,36 +31406,73 @@ } } - public Table getNew_tbl() { - return this.new_tbl; + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); } - public void setNew_tbl(Table new_tbl) { - this.new_tbl = new_tbl; + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); } - public void unsetNew_tbl() { - this.new_tbl = 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 new_tbl is set (has been asigned a value) and false otherwise */ - public boolean isSetNew_tbl() { - return this.new_tbl != null; + public List getPart_vals() { + return this.part_vals; } - public void setNew_tblIsSet(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.new_tbl = 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 DBNAME: + case DB_NAME: if (value == null) { - unsetDbname(); + unsetDb_name(); } else { - setDbname((String)value); + setDb_name((String)value); } break; @@ -18282,11 +31484,19 @@ } break; - case NEW_TBL: + case PART_VALS: if (value == null) { - unsetNew_tbl(); + unsetPart_vals(); } else { - setNew_tbl((Table)value); + setPart_vals((List)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -18295,14 +31505,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DBNAME: - return getDbname(); + case DB_NAME: + return getDb_name(); case TBL_NAME: return getTbl_name(); - case NEW_TBL: - return getNew_tbl(); + case PART_VALS: + return getPart_vals(); + + case MAX_PARTS: + return new Short(getMax_parts()); } throw new IllegalStateException(); @@ -18315,12 +31528,14 @@ } switch (field) { - case DBNAME: - return isSetDbname(); + case DB_NAME: + return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case NEW_TBL: - return isSetNew_tbl(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -18329,21 +31544,21 @@ 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 get_partitions_ps_args) + return this.equals((get_partitions_ps_args)that); return false; } - public boolean equals(alter_table_args that) { + public boolean equals(get_partitions_ps_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)) + 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.dbname.equals(that.dbname)) + if (!this.db_name.equals(that.db_name)) return false; } @@ -18356,12 +31571,21 @@ 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_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.new_tbl.equals(that.new_tbl)) + 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; } @@ -18373,20 +31597,20 @@ return 0; } - public int compareTo(alter_table_args other) { + public int compareTo(get_partitions_ps_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; + get_partitions_ps_args typedOther = (get_partitions_ps_args)other; - lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetDbname()) { - lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); if (lastComparison != 0) { return lastComparison; } @@ -18401,12 +31625,22 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_tbl()) { - lastComparison = TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); + 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; } @@ -18428,9 +31662,9 @@ break; } switch (field.id) { - case 1: // DBNAME + case 1: // DB_NAME if (field.type == TType.STRING) { - this.dbname = iprot.readString(); + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -18442,10 +31676,27 @@ 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); + case 3: // PART_VALS + if (field.type == TType.LIST) { + { + TList _list163 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list163.size); + for (int _i164 = 0; _i164 < _list163.size; ++_i164) + { + String _elem165; + _elem165 = iprot.readString(); + this.part_vals.add(_elem165); + } + 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); } @@ -18463,9 +31714,9 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } if (this.tbl_name != null) { @@ -18473,25 +31724,35 @@ oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - if (this.new_tbl != null) { - oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); - this.new_tbl.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 _iter166 : this.part_vals) + { + oprot.writeString(_iter166); + } + 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("alter_table_args("); + StringBuilder sb = new StringBuilder("get_partitions_ps_args("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.dbname); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); @@ -18503,13 +31764,17 @@ } first = false; if (!first) sb.append(", "); - sb.append("new_tbl:"); - if (this.new_tbl == null) { + sb.append("part_vals:"); + if (this.part_vals == null) { sb.append("null"); } else { - sb.append(this.new_tbl); + 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(); } @@ -18520,19 +31785,19 @@ } - 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 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 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 InvalidOperationException o1; - private MetaException o2; + 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 { - O1((short)1, "o1"), - O2((short)2, "o2"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -18547,10 +31812,10 @@ */ 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; } @@ -18595,109 +31860,129 @@ 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(alter_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); } - public alter_table_result() { + public get_partitions_ps_result() { } - public alter_table_result( - InvalidOperationException o1, - MetaException o2) + public get_partitions_ps_result( + List success, + MetaException o1) { this(); + this.success = success; 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); + 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.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public alter_table_result deepCopy() { - return new alter_table_result(this); + public get_partitions_ps_result deepCopy() { + return new get_partitions_ps_result(this); } @Override public void clear() { + this.success = null; this.o1 = null; - this.o2 = null; } - public InvalidOperationException getO1() { - return this.o1; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setO1(InvalidOperationException o1) { - this.o1 = o1; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetO1() { - this.o1 = null; + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.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 getSuccess() { + return this.success; } - public void setO1IsSet(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.o1 = null; + this.success = null; } } - 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; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: + case SUCCESS: if (value == null) { - unsetO1(); + unsetSuccess(); } else { - setO1((InvalidOperationException)value); + setSuccess((List)value); } break; - case O2: + case O1: if (value == null) { - unsetO2(); + unsetO1(); } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -18706,12 +31991,12 @@ public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); - case O2: - return getO2(); - } throw new IllegalStateException(); } @@ -18723,10 +32008,10 @@ } switch (field) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -18735,15 +32020,24 @@ 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 get_partitions_ps_result) + return this.equals((get_partitions_ps_result)that); return false; } - public boolean equals(alter_table_result that) { + public boolean equals(get_partitions_ps_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) { @@ -18753,15 +32047,6 @@ 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; } @@ -18770,30 +32055,30 @@ return 0; } - public int compareTo(alter_table_result other) { + public int compareTo(get_partitions_ps_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; + get_partitions_ps_result typedOther = (get_partitions_ps_result)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { 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; } @@ -18815,18 +32100,28 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list167 = iprot.readListBegin(); + this.success = new ArrayList(_list167.size); + for (int _i168 = 0; _i168 < _list167.size; ++_i168) + { + Partition _elem169; + _elem169 = new Partition(); + _elem169.read(iprot); + this.success.add(_elem169); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // 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); } @@ -18843,14 +32138,21 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter170 : this.success) + { + _iter170.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(); @@ -18858,22 +32160,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_table_result("); + StringBuilder sb = new StringBuilder("get_partitions_ps_result("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.o1); + 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(")"); @@ -18886,16 +32188,31 @@ } - 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 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 NEW_PART_FIELD_DESC = new TField("new_part", 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 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 Partition new_part; + 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 { - NEW_PART((short)1, "new_part"); + 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(); @@ -18910,8 +32227,18 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NEW_PART - return NEW_PART; + 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; } @@ -18934,92 +32261,332 @@ 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 + 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; + } + } + + 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 short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + setMax_partsIsSet(true); + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } + public void unsetMax_parts() { + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + } - public short getThriftFieldId() { - return _thriftId; - } + /** 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 String getFieldName() { - return _fieldName; - } + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } - // isset id assignments + public String getUser_name() { + return this.user_name; + } - 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 void setUser_name(String user_name) { + this.user_name = user_name; } - public add_partition_args() { + public void unsetUser_name() { + this.user_name = null; } - public add_partition_args( - Partition new_part) - { - this(); - this.new_part = new_part; + /** 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; } - /** - * 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 void setUser_nameIsSet(boolean value) { + if (!value) { + this.user_name = null; } } - public add_partition_args deepCopy() { - return new add_partition_args(this); + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - @Override - public void clear() { - this.new_part = null; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public Partition getNew_part() { - return this.new_part; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); } - public void setNew_part(Partition new_part) { - this.new_part = new_part; + public List getGroup_names() { + return this.group_names; } - public void unsetNew_part() { - this.new_part = null; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - /** 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 unsetGroup_names() { + this.group_names = null; } - public void setNew_partIsSet(boolean value) { + /** 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.new_part = null; + this.group_names = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NEW_PART: + case DB_NAME: if (value == null) { - unsetNew_part(); + unsetDb_name(); } else { - setNew_part((Partition)value); + 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 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; @@ -19028,8 +32595,23 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NEW_PART: - return getNew_part(); + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + 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(); @@ -19042,8 +32624,18 @@ } switch (field) { - case NEW_PART: - return isSetNew_part(); + 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(); } @@ -19052,46 +32644,141 @@ 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 get_partitions_ps_with_auth_args) + return this.equals((get_partitions_ps_with_auth_args)that); return false; } - public boolean equals(add_partition_args that) { + public boolean equals(get_partitions_ps_with_auth_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)) + 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.new_part.equals(that.new_part)) + if (!this.db_name.equals(that.db_name)) 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()); + + 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; + } + + 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; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + 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; + get_partitions_ps_with_auth_args typedOther = (get_partitions_ps_with_auth_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(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; + } } - - int lastComparison = 0; - add_partition_args typedOther = (add_partition_args)other; - - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_part()) { - lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -19113,10 +32800,65 @@ break; } switch (field.id) { - case 1: // NEW_PART - if (field.type == TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.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 _list171 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list171.size); + for (int _i172 = 0; _i172 < _list171.size; ++_i172) + { + String _elem173; + _elem173 = iprot.readString(); + this.part_vals.add(_elem173); + } + 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 _list174 = iprot.readListBegin(); + this.group_names = new ArrayList(_list174.size); + for (int _i175 = 0; _i175 < _list174.size; ++_i175) + { + String _elem176; + _elem176 = iprot.readString(); + this.group_names.add(_elem176); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -19134,9 +32876,46 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); + 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 _iter177 : this.part_vals) + { + oprot.writeString(_iter177); + } + 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 _iter178 : this.group_names) + { + oprot.writeString(_iter178); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -19145,14 +32924,50 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_partition_args("); + StringBuilder sb = new StringBuilder("get_partitions_ps_with_auth_args("); boolean first = true; - sb.append("new_part:"); - if (this.new_part == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.new_part); + 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("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(")"); @@ -19165,25 +32980,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_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 SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 Partition success; - private InvalidObjectException o1; - private AlreadyExistsException o2; - private MetaException o3; + 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"), - O3((short)3, "o3"); + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -19204,8 +33016,6 @@ return O1; case 2: // O2 return O2; - case 3: // O3 - return O3; default: return null; } @@ -19251,53 +33061,51 @@ 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))); + 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.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_result.class, metaDataMap); } - public add_partition_result() { + public get_partitions_ps_with_auth_result() { } - public add_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_partitions_ps_with_auth_result( + List success, + NoSuchObjectException o1, + MetaException o2) { 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) { + public get_partitions_ps_with_auth_result(get_partitions_ps_with_auth_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + 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 InvalidObjectException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + this.o2 = new MetaException(other.o2); } } - public add_partition_result deepCopy() { - return new add_partition_result(this); + public get_partitions_ps_with_auth_result deepCopy() { + return new get_partitions_ps_with_auth_result(this); } @Override @@ -19305,14 +33113,28 @@ this.success = null; this.o1 = null; this.o2 = null; - this.o3 = null; } - public Partition getSuccess() { + 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(Partition success) { + public void setSuccess(List success) { this.success = success; } @@ -19331,11 +33153,11 @@ } } - public InvalidObjectException getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(InvalidObjectException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -19354,11 +33176,11 @@ } } - public AlreadyExistsException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(AlreadyExistsException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -19377,36 +33199,13 @@ } } - 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); + setSuccess((List)value); } break; @@ -19414,7 +33213,7 @@ if (value == null) { unsetO1(); } else { - setO1((InvalidObjectException)value); + setO1((NoSuchObjectException)value); } break; @@ -19422,15 +33221,7 @@ if (value == null) { unsetO2(); } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((MetaException)value); } break; @@ -19448,9 +33239,6 @@ case O2: return getO2(); - case O3: - return getO3(); - } throw new IllegalStateException(); } @@ -19468,8 +33256,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); } throw new IllegalStateException(); } @@ -19478,12 +33264,12 @@ 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_partitions_ps_with_auth_result) + return this.equals((get_partitions_ps_with_auth_result)that); return false; } - public boolean equals(add_partition_result that) { + public boolean equals(get_partitions_ps_with_auth_result that) { if (that == null) return false; @@ -19514,15 +33300,6 @@ 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; } @@ -19531,13 +33308,13 @@ return 0; } - public int compareTo(add_partition_result 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; - add_partition_result typedOther = (add_partition_result)other; + get_partitions_ps_with_auth_result typedOther = (get_partitions_ps_with_auth_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -19569,16 +33346,6 @@ 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; } @@ -19597,16 +33364,26 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); + if (field.type == TType.LIST) { + { + TList _list179 = iprot.readListBegin(); + this.success = new ArrayList(_list179.size); + for (int _i180 = 0; _i180 < _list179.size; ++_i180) + { + Partition _elem181; + _elem181 = new Partition(); + _elem181.read(iprot); + this.success.add(_elem181); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); + this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -19614,20 +33391,12 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); + this.o2 = new MetaException(); 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); } @@ -19642,7 +33411,14 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter182 : this.success) + { + _iter182.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -19652,10 +33428,6 @@ 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(); @@ -19663,7 +33435,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_partition_result("); + StringBuilder sb = new StringBuilder("get_partitions_ps_with_auth_result("); boolean first = true; sb.append("success:"); @@ -19689,14 +33461,6 @@ 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(); } @@ -19707,22 +33471,25 @@ } - 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_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 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 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"); + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); @@ -19743,6 +33510,8 @@ return TBL_NAME; case 3: // PART_VALS return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -19783,6 +33552,8 @@ } // 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 { @@ -19794,28 +33565,37 @@ 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(append_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); } - public append_partition_args() { + public get_partition_names_ps_args() { + this.max_parts = (short)-1; + } - public append_partition_args( + public get_partition_names_ps_args( String db_name, String tbl_name, - List part_vals) + List part_vals, + short max_parts) { 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 append_partition_args(append_partition_args 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; } @@ -19829,10 +33609,11 @@ } this.part_vals = __this__part_vals; } + this.max_parts = other.max_parts; } - public append_partition_args deepCopy() { - return new append_partition_args(this); + public get_partition_names_ps_args deepCopy() { + return new get_partition_names_ps_args(this); } @Override @@ -19840,6 +33621,8 @@ this.db_name = null; this.tbl_name = null; this.part_vals = null; + this.max_parts = (short)-1; + } public String getDb_name() { @@ -19926,6 +33709,28 @@ } } + 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: @@ -19952,6 +33757,14 @@ } break; + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + } } @@ -19966,6 +33779,9 @@ case PART_VALS: return getPart_vals(); + case MAX_PARTS: + return new Short(getMax_parts()); + } throw new IllegalStateException(); } @@ -19983,6 +33799,8 @@ return isSetTbl_name(); case PART_VALS: return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -19991,12 +33809,12 @@ 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_partition_names_ps_args) + return this.equals((get_partition_names_ps_args)that); return false; } - public boolean equals(append_partition_args that) { + public boolean equals(get_partition_names_ps_args that) { if (that == null) return false; @@ -20027,6 +33845,15 @@ 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; + } + return true; } @@ -20035,13 +33862,13 @@ return 0; } - public int compareTo(append_partition_args 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; - append_partition_args typedOther = (append_partition_args)other; + get_partition_names_ps_args typedOther = (get_partition_names_ps_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -20073,6 +33900,16 @@ 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; + } + } return 0; } @@ -20107,13 +33944,13 @@ 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) + TList _list183 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list183.size); + for (int _i184 = 0; _i184 < _list183.size; ++_i184) { - String _elem94; - _elem94 = iprot.readString(); - this.part_vals.add(_elem94); + String _elem185; + _elem185 = iprot.readString(); + this.part_vals.add(_elem185); } iprot.readListEnd(); } @@ -20121,6 +33958,14 @@ 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; default: TProtocolUtil.skip(iprot, field.type); } @@ -20148,21 +33993,24 @@ oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter95 : this.part_vals) + for (String _iter186 : this.part_vals) { - oprot.writeString(_iter95); + oprot.writeString(_iter186); } 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("append_partition_args("); + StringBuilder sb = new StringBuilder("get_partition_names_ps_args("); boolean first = true; sb.append("db_name:"); @@ -20188,6 +34036,10 @@ 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(); } @@ -20198,25 +34050,19 @@ } - 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_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 SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 Partition success; - private InvalidObjectException o1; - private AlreadyExistsException o2; - private MetaException o3; + 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"), - O2((short)2, "o2"), - O3((short)3, "o3"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -20235,10 +34081,6 @@ return SUCCESS; case 1: // O1 return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; default: return null; } @@ -20284,68 +34126,72 @@ 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))); + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); 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); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); } - public append_partition_result() { + public get_partition_names_ps_result() { } - public append_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_partition_names_ps_result( + List success, + MetaException o1) { 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) { + public get_partition_names_ps_result(get_partition_names_ps_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + 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 InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + this.o1 = new MetaException(other.o1); } } - public append_partition_result deepCopy() { - return new append_partition_result(this); + public get_partition_names_ps_result deepCopy() { + return new get_partition_names_ps_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(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - public Partition getSuccess() { + public List getSuccess() { return this.success; } - public void setSuccess(Partition success) { + public void setSuccess(List success) { this.success = success; } @@ -20364,11 +34210,11 @@ } } - public InvalidObjectException getO1() { + public MetaException getO1() { return this.o1; } - public void setO1(InvalidObjectException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -20387,59 +34233,13 @@ } } - 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); + setSuccess((List)value); } break; @@ -20447,23 +34247,7 @@ 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); + setO1((MetaException)value); } break; @@ -20478,12 +34262,6 @@ case O1: return getO1(); - case O2: - return getO2(); - - case O3: - return getO3(); - } throw new IllegalStateException(); } @@ -20499,10 +34277,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); } throw new IllegalStateException(); } @@ -20511,12 +34285,12 @@ 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_partition_names_ps_result) + return this.equals((get_partition_names_ps_result)that); return false; } - public boolean equals(append_partition_result that) { + public boolean equals(get_partition_names_ps_result that) { if (that == null) return false; @@ -20538,24 +34312,6 @@ 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; } @@ -20564,13 +34320,13 @@ return 0; } - public int compareTo(append_partition_result 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; - append_partition_result typedOther = (append_partition_result)other; + get_partition_names_ps_result typedOther = (get_partition_names_ps_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -20592,26 +34348,6 @@ 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; } @@ -20630,37 +34366,30 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); + if (field.type == TType.LIST) { + { + TList _list187 = iprot.readListBegin(); + this.success = new ArrayList(_list187.size); + for (int _i188 = 0; _i188 < _list187.size; ++_i188) + { + String _elem189; + _elem189 = iprot.readString(); + this.success.add(_elem189); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); + 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 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); } @@ -20675,20 +34404,19 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter190 : this.success) + { + oprot.writeString(_iter190); + } + 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(); @@ -20696,7 +34424,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_result("); + StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); boolean first = true; sb.append("success:"); @@ -20714,22 +34442,6 @@ 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(); } @@ -20740,22 +34452,25 @@ } - 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_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 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 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 String db_name; private String tbl_name; - private String part_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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"); + FILTER((short)3, "filter"), + MAX_PARTS((short)4, "max_parts"); private static final Map byName = new HashMap(); @@ -20774,8 +34489,10 @@ return DB_NAME; case 2: // TBL_NAME return TBL_NAME; - case 3: // PART_NAME - return PART_NAME; + case 3: // FILTER + return FILTER; + case 4: // MAX_PARTS + return MAX_PARTS; default: return null; } @@ -20816,6 +34533,8 @@ } // 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 { @@ -20824,50 +34543,62 @@ 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, + 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(append_partition_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); } - public append_partition_by_name_args() { + public get_partitions_by_filter_args() { + this.max_parts = (short)-1; + } - public append_partition_by_name_args( + public get_partitions_by_filter_args( String db_name, String tbl_name, - String part_name) + String filter, + short max_parts) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.part_name = part_name; + this.filter = filter; + this.max_parts = max_parts; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ - public append_partition_by_name_args(append_partition_by_name_args 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.isSetPart_name()) { - this.part_name = other.part_name; + if (other.isSetFilter()) { + this.filter = other.filter; } + this.max_parts = other.max_parts; } - public append_partition_by_name_args deepCopy() { - return new append_partition_by_name_args(this); + 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.part_name = null; + this.filter = null; + this.max_parts = (short)-1; + } public String getDb_name() { @@ -20916,27 +34647,49 @@ } } - public String getPart_name() { - return this.part_name; + public String getFilter() { + return this.filter; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setFilter(String filter) { + this.filter = filter; } - public void unsetPart_name() { - this.part_name = null; + public void unsetFilter() { + this.filter = 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 filter is set (has been asigned a value) and false otherwise */ + public boolean isSetFilter() { + return this.filter != null; + } + + public void setFilterIsSet(boolean value) { + if (!value) { + this.filter = 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 setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -20957,11 +34710,19 @@ } break; - case PART_NAME: + case FILTER: if (value == null) { - unsetPart_name(); + unsetFilter(); } else { - setPart_name((String)value); + setFilter((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -20976,8 +34737,11 @@ case TBL_NAME: return getTbl_name(); - case PART_NAME: - return getPart_name(); + case FILTER: + return getFilter(); + + case MAX_PARTS: + return new Short(getMax_parts()); } throw new IllegalStateException(); @@ -20994,8 +34758,10 @@ return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); + case FILTER: + return isSetFilter(); + case MAX_PARTS: + return isSetMax_parts(); } throw new IllegalStateException(); } @@ -21004,12 +34770,12 @@ 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_partitions_by_filter_args) + return this.equals((get_partitions_by_filter_args)that); return false; } - public boolean equals(append_partition_by_name_args that) { + public boolean equals(get_partitions_by_filter_args that) { if (that == null) return false; @@ -21031,12 +34797,21 @@ 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_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.part_name.equals(that.part_name)) + if (!this.filter.equals(that.filter)) + 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; } @@ -21048,13 +34823,13 @@ return 0; } - public int compareTo(append_partition_by_name_args 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; - append_partition_by_name_args typedOther = (append_partition_by_name_args)other; + get_partitions_by_filter_args typedOther = (get_partitions_by_filter_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -21076,12 +34851,22 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetFilter()) { + lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter); + 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; } @@ -21117,9 +34902,17 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 3: // PART_NAME + case 3: // FILTER if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + this.filter = iprot.readString(); + } 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); } @@ -21147,18 +34940,21 @@ oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + 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("append_partition_by_name_args("); + StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); boolean first = true; sb.append("db_name:"); @@ -21177,13 +34973,17 @@ } first = false; if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("filter:"); + if (this.filter == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.filter); } first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -21194,25 +34994,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_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 SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 Partition success; - private InvalidObjectException o1; - private AlreadyExistsException o2; - private MetaException o3; + 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 { SUCCESS((short)0, "success"), O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -21233,8 +35030,6 @@ return O1; case 2: // O2 return O2; - case 3: // O3 - return O3; default: return null; } @@ -21280,53 +35075,51 @@ 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))); + 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.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); } - public append_partition_by_name_result() { + public get_partitions_by_filter_result() { } - public append_partition_by_name_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_partitions_by_filter_result( + List success, + MetaException o1, + NoSuchObjectException o2) { 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) { + public get_partitions_by_filter_result(get_partitions_by_filter_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + 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 InvalidObjectException(other.o1); + this.o1 = new MetaException(other.o1); } if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + this.o2 = new NoSuchObjectException(other.o2); } } - public append_partition_by_name_result deepCopy() { - return new append_partition_by_name_result(this); + public get_partitions_by_filter_result deepCopy() { + return new get_partitions_by_filter_result(this); } @Override @@ -21334,14 +35127,28 @@ this.success = null; this.o1 = null; this.o2 = null; - this.o3 = null; } - public Partition getSuccess() { + 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(Partition success) { + public void setSuccess(List success) { this.success = success; } @@ -21360,11 +35167,11 @@ } } - public InvalidObjectException getO1() { + public MetaException getO1() { return this.o1; } - public void setO1(InvalidObjectException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -21383,11 +35190,11 @@ } } - public AlreadyExistsException getO2() { + public NoSuchObjectException getO2() { return this.o2; } - public void setO2(AlreadyExistsException o2) { + public void setO2(NoSuchObjectException o2) { this.o2 = o2; } @@ -21406,36 +35213,13 @@ } } - 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); + setSuccess((List)value); } break; @@ -21443,7 +35227,7 @@ if (value == null) { unsetO1(); } else { - setO1((InvalidObjectException)value); + setO1((MetaException)value); } break; @@ -21451,15 +35235,7 @@ if (value == null) { unsetO2(); } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((NoSuchObjectException)value); } break; @@ -21477,9 +35253,6 @@ case O2: return getO2(); - case O3: - return getO3(); - } throw new IllegalStateException(); } @@ -21497,8 +35270,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); } throw new IllegalStateException(); } @@ -21507,12 +35278,12 @@ 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_partitions_by_filter_result) + return this.equals((get_partitions_by_filter_result)that); return false; } - public boolean equals(append_partition_by_name_result that) { + public boolean equals(get_partitions_by_filter_result that) { if (that == null) return false; @@ -21543,15 +35314,6 @@ 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; } @@ -21560,13 +35322,13 @@ return 0; } - public int compareTo(append_partition_by_name_result 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; - append_partition_by_name_result typedOther = (append_partition_by_name_result)other; + get_partitions_by_filter_result typedOther = (get_partitions_by_filter_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -21598,16 +35360,6 @@ 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; } @@ -21626,16 +35378,26 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); + if (field.type == TType.LIST) { + { + TList _list191 = iprot.readListBegin(); + this.success = new ArrayList(_list191.size); + for (int _i192 = 0; _i192 < _list191.size; ++_i192) + { + Partition _elem193; + _elem193 = new Partition(); + _elem193.read(iprot); + this.success.add(_elem193); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); + this.o1 = new MetaException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -21643,20 +35405,12 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); + this.o2 = new NoSuchObjectException(); 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); } @@ -21671,7 +35425,14 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter194 : this.success) + { + _iter194.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -21681,10 +35442,6 @@ 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(); @@ -21692,7 +35449,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_by_name_result("); + StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); boolean first = true; sb.append("success:"); @@ -21718,14 +35475,6 @@ 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(); } @@ -21736,25 +35485,22 @@ } - 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 alter_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_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 static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)3); private String db_name; private String tbl_name; - private List part_vals; - private boolean deleteData; + 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - DELETE_DATA((short)4, "deleteData"); + NEW_PART((short)3, "new_part"); private static final Map byName = new HashMap(); @@ -21773,10 +35519,8 @@ 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 3: // NEW_PART + return NEW_PART; default: return null; } @@ -21817,8 +35561,6 @@ } // 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 { @@ -21827,65 +35569,50 @@ 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))); + tmpMap.put(_Fields.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); } - public drop_partition_args() { + public alter_partition_args() { } - public drop_partition_args( + public alter_partition_args( String db_name, String tbl_name, - List part_vals, - boolean deleteData) + Partition new_part) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.new_part = new_part; } /** * 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); + 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.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.isSetNew_part()) { + this.new_part = new Partition(other.new_part); } - this.deleteData = other.deleteData; } - public drop_partition_args deepCopy() { - return new drop_partition_args(this); + public alter_partition_args deepCopy() { + return new alter_partition_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; - this.part_vals = null; - setDeleteDataIsSet(false); - this.deleteData = false; + this.new_part = null; } public String getDb_name() { @@ -21934,66 +35661,29 @@ } } - 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 Partition getNew_part() { + return this.new_part; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setNew_part(Partition new_part) { + this.new_part = new_part; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetNew_part() { + this.new_part = 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 new_part is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_part() { + return this.new_part != null; } - public void setPart_valsIsSet(boolean value) { + public void setNew_partIsSet(boolean value) { if (!value) { - this.part_vals = null; + this.new_part = 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: @@ -22012,19 +35702,11 @@ } break; - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case DELETE_DATA: + case NEW_PART: if (value == null) { - unsetDeleteData(); + unsetNew_part(); } else { - setDeleteData((Boolean)value); + setNew_part((Partition)value); } break; @@ -22039,11 +35721,8 @@ case TBL_NAME: return getTbl_name(); - case PART_VALS: - return getPart_vals(); - - case DELETE_DATA: - return new Boolean(isDeleteData()); + case NEW_PART: + return getNew_part(); } throw new IllegalStateException(); @@ -22060,10 +35739,8 @@ return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case DELETE_DATA: - return isSetDeleteData(); + case NEW_PART: + return isSetNew_part(); } throw new IllegalStateException(); } @@ -22072,12 +35749,12 @@ 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 alter_partition_args) + return this.equals((alter_partition_args)that); return false; } - public boolean equals(drop_partition_args that) { + public boolean equals(alter_partition_args that) { if (that == null) return false; @@ -22099,21 +35776,12 @@ 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)) + 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.deleteData != that.deleteData) + if (!this.new_part.equals(that.new_part)) return false; } @@ -22125,13 +35793,13 @@ return 0; } - public int compareTo(drop_partition_args other) { + public int compareTo(alter_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; + alter_partition_args typedOther = (alter_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -22153,22 +35821,12 @@ 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()); + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetNew_part()) { + lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); if (lastComparison != 0) { return lastComparison; } @@ -22204,27 +35862,10 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 3: // PART_VALS - if (field.type == TType.LIST) { - { - TList _list96 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list96.size); - for (int _i97 = 0; _i97 < _list96.size; ++_i97) - { - String _elem98; - _elem98 = iprot.readString(); - this.part_vals.add(_elem98); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // DELETE_DATA - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); + case 3: // NEW_PART + if (field.type == TType.STRUCT) { + this.new_part = new Partition(); + this.new_part.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -22252,28 +35893,18 @@ 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 _iter99 : this.part_vals) - { - oprot.writeString(_iter99); - } - oprot.writeListEnd(); - } + if (this.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.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("alter_partition_args("); boolean first = true; sb.append("db_name:"); @@ -22292,17 +35923,13 @@ } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("new_part:"); + if (this.new_part == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.new_part); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -22313,20 +35940,17 @@ } - 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 alter_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_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 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 { - SUCCESS((short)0, "success"), O1((short)1, "o1"), O2((short)2, "o2"); @@ -22343,8 +35967,6 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; case 1: // O1 return O1; case 2: // O2 @@ -22389,33 +36011,26 @@ } // 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); + FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); } - public drop_partition_result() { + public alter_partition_result() { } - public drop_partition_result( - boolean success, - NoSuchObjectException o1, + public alter_partition_result( + InvalidOperationException o1, MetaException o2) { this(); - this.success = success; - setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -22423,57 +36038,30 @@ /** * 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; + public alter_partition_result(alter_partition_result other) { if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } } - public drop_partition_result deepCopy() { - return new drop_partition_result(this); + public alter_partition_result deepCopy() { + return new alter_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() { + public InvalidOperationException getO1() { return this.o1; } - public void setO1(NoSuchObjectException o1) { + public void setO1(InvalidOperationException o1) { this.o1 = o1; } @@ -22517,19 +36105,11 @@ 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); + setO1((InvalidOperationException)value); } break; @@ -22546,9 +36126,6 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return new Boolean(isSuccess()); - case O1: return getO1(); @@ -22566,8 +36143,6 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); case O1: return isSetO1(); case O2: @@ -22580,24 +36155,15 @@ 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 alter_partition_result) + return this.equals((alter_partition_result)that); return false; } - public boolean equals(drop_partition_result that) { + public boolean equals(alter_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) { @@ -22624,24 +36190,14 @@ return 0; } - public int compareTo(drop_partition_result other) { + public int compareTo(alter_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; + alter_partition_result typedOther = (alter_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; @@ -22679,17 +36235,9 @@ 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 = new InvalidOperationException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -22715,11 +36263,7 @@ 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()) { + if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); @@ -22734,13 +36278,9 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_result("); + StringBuilder sb = new StringBuilder("alter_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"); @@ -22766,25 +36306,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_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 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 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 String db_name; - private String tbl_name; - private String part_name; - private boolean deleteData; + 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 { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - PART_NAME((short)3, "part_name"), - DELETE_DATA((short)4, "deleteData"); + NAME((short)1, "name"), + DEFAULT_VALUE((short)2, "defaultValue"); private static final Map byName = new HashMap(); @@ -22799,14 +36333,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 1: // NAME + return NAME; + case 2: // DEFAULT_VALUE + return DEFAULT_VALUE; default: return null; } @@ -22847,194 +36377,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, + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DEFAULT_VALUE, new FieldMetaData("defaultValue", 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); + FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); } - public drop_partition_by_name_args() { + public get_config_value_args() { } - public drop_partition_by_name_args( - String db_name, - String tbl_name, - String part_name, - boolean deleteData) + public get_config_value_args( + String name, + String defaultValue) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.name = name; + this.defaultValue = defaultValue; } /** * 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_config_value_args(get_config_value_args other) { + if (other.isSetName()) { + this.name = other.name; } - if (other.isSetPart_name()) { - this.part_name = other.part_name; + if (other.isSetDefaultValue()) { + this.defaultValue = other.defaultValue; } - this.deleteData = other.deleteData; } - public drop_partition_by_name_args deepCopy() { - return new drop_partition_by_name_args(this); + public get_config_value_args deepCopy() { + return new get_config_value_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; - } + this.name = null; + this.defaultValue = null; } - public String getTbl_name() { - return this.tbl_name; + public String getName() { + return this.name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setName(String name) { + this.name = name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetName() { + this.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; + /** Returns true if field name is set (has been asigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; } - public void setTbl_nameIsSet(boolean value) { + public void setNameIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.name = null; } } - public String getPart_name() { - return this.part_name; + public String getDefaultValue() { + return this.defaultValue; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; } - public void unsetPart_name() { - this.part_name = null; + public void unsetDefaultValue() { + this.defaultValue = 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 defaultValue is set (has been asigned a value) and false otherwise */ + public boolean isSetDefaultValue() { + return this.defaultValue != null; } - public void setPart_nameIsSet(boolean value) { + public void setDefaultValueIsSet(boolean value) { if (!value) { - this.part_name = null; + this.defaultValue = 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_NAME: + case NAME: if (value == null) { - unsetPart_name(); + unsetName(); } else { - setPart_name((String)value); + setName((String)value); } break; - case DELETE_DATA: + case DEFAULT_VALUE: if (value == null) { - unsetDeleteData(); + unsetDefaultValue(); } else { - setDeleteData((Boolean)value); + setDefaultValue((String)value); } break; @@ -23043,17 +36492,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 NAME: + return getName(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case DEFAULT_VALUE: + return getDefaultValue(); } throw new IllegalStateException(); @@ -23066,14 +36509,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 NAME: + return isSetName(); + case DEFAULT_VALUE: + return isSetDefaultValue(); } throw new IllegalStateException(); } @@ -23082,48 +36521,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_config_value_args) + return this.equals((get_config_value_args)that); return false; } - public boolean equals(drop_partition_by_name_args that) { + public boolean equals(get_config_value_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)) + 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.part_name.equals(that.part_name)) + 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)) + 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.deleteData != that.deleteData) + if (!this.defaultValue.equals(that.defaultValue)) return false; } @@ -23135,50 +36556,30 @@ return 0; } - public int compareTo(drop_partition_by_name_args other) { + public int compareTo(get_config_value_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; + get_config_value_args typedOther = (get_config_value_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()); + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(typedOther.isSetDefaultValue()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetDefaultValue()) { + lastComparison = TBaseHelper.compareTo(this.defaultValue, typedOther.defaultValue); if (lastComparison != 0) { return lastComparison; } @@ -23200,31 +36601,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 + case 1: // NAME if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // PART_NAME + case 2: // DEFAULT_VALUE 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); + this.defaultValue = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -23242,60 +36628,40 @@ 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.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); oprot.writeFieldEnd(); } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + if (this.defaultValue != null) { + oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); + oprot.writeString(this.defaultValue); 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_config_value_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("name:"); + if (this.name == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.name); } first = false; if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("defaultValue:"); + if (this.defaultValue == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.defaultValue); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -23306,22 +36672,19 @@ } - 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_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 SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + 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 O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private boolean success; - private NoSuchObjectException o1; - private MetaException o2; + 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 { SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -23340,8 +36703,6 @@ return SUCCESS; case 1: // O1 return O1; - case 2: // O2 - return O2; default: return null; } @@ -23382,91 +36743,80 @@ } // 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))); + new FieldValueMetaData(TType.STRING))); 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_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); } - public drop_partition_by_name_result() { + public get_config_value_result() { } - public drop_partition_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) + public get_config_value_result( + String success, + ConfigValSecurityException o1) { this(); this.success = success; - setSuccessIsSet(true); this.o1 = o1; - this.o2 = o2; } /** * 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_config_value_result(get_config_value_result other) { + if (other.isSetSuccess()) { + this.success = other.success; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetO1()) { + this.o1 = new ConfigValSecurityException(other.o1); } } - public drop_partition_by_name_result deepCopy() { - return new drop_partition_by_name_result(this); + public get_config_value_result deepCopy() { + return new get_config_value_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.o1 = null; - this.o2 = null; } - public boolean isSuccess() { + public String getSuccess() { return this.success; } - public void setSuccess(boolean success) { + public void setSuccess(String success) { this.success = success; - setSuccessIsSet(true); } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + this.success = 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); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } - public NoSuchObjectException getO1() { + public ConfigValSecurityException getO1() { return this.o1; } - public void setO1(NoSuchObjectException o1) { + public void setO1(ConfigValSecurityException o1) { this.o1 = o1; } @@ -23485,36 +36835,13 @@ } } - 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); + setSuccess((String)value); } break; @@ -23522,15 +36849,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + setO1((ConfigValSecurityException)value); } break; @@ -23540,13 +36859,10 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return new Boolean(isSuccess()); - - case O1: - return getO1(); + return getSuccess(); - case O2: - return getO2(); + case O1: + return getO1(); } throw new IllegalStateException(); @@ -23563,8 +36879,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -23573,21 +36887,21 @@ 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_config_value_result) + return this.equals((get_config_value_result)that); return false; } - public boolean equals(drop_partition_by_name_result that) { + public boolean equals(get_config_value_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) return false; } @@ -23600,15 +36914,6 @@ 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; } @@ -23617,13 +36922,13 @@ return 0; } - public int compareTo(drop_partition_by_name_result 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_partition_by_name_result typedOther = (drop_partition_by_name_result)other; + get_config_value_result typedOther = (get_config_value_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -23645,16 +36950,6 @@ 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; } @@ -23673,29 +36968,20 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + if (field.type == TType.STRING) { + this.success = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); + this.o1 = new ConfigValSecurityException(); 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); } @@ -23710,16 +36996,12 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + oprot.writeString(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(); @@ -23727,26 +37009,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); + StringBuilder sb = new StringBuilder("get_config_value_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + if (this.success == null) { sb.append("null"); } else { - sb.append(this.o1); + 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(")"); @@ -23759,22 +37037,16 @@ } - public static class get_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_args"); + 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 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 PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); - private String db_name; - private String tbl_name; - private List part_vals; + 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_VALS((short)3, "part_vals"); + PART_NAME((short)1, "part_name"); private static final Map byName = new HashMap(); @@ -23789,12 +37061,8 @@ */ 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 1: // PART_NAME + return PART_NAME; default: return null; } @@ -23839,168 +37107,70 @@ 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, + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_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(get_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); } - public get_partition_args() { + public partition_name_to_vals_args() { } - public get_partition_args( - String db_name, - String tbl_name, - List part_vals) + public partition_name_to_vals_args( + String part_name) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; + this.part_name = part_name; } /** * 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; - } - 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 partition_name_to_vals_args(partition_name_to_vals_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } - public get_partition_args deepCopy() { - return new get_partition_args(this); + public partition_name_to_vals_args deepCopy() { + return new partition_name_to_vals_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); + this.part_name = null; } - public List getPart_vals() { - return this.part_vals; + public String getPart_name() { + return this.part_name; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetPart_name() { + this.part_name = 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 part_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setPart_valsIsSet(boolean value) { + public void setPart_nameIsSet(boolean value) { if (!value) { - this.part_vals = null; + 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_VALS: + case PART_NAME: if (value == null) { - unsetPart_vals(); + unsetPart_name(); } else { - setPart_vals((List)value); + setPart_name((String)value); } break; @@ -24009,14 +37179,8 @@ 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 PART_NAME: + return getPart_name(); } throw new IllegalStateException(); @@ -24029,12 +37193,8 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); + case PART_NAME: + return isSetPart_name(); } throw new IllegalStateException(); } @@ -24043,39 +37203,21 @@ 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 partition_name_to_vals_args) + return this.equals((partition_name_to_vals_args)that); return false; } - public boolean equals(get_partition_args that) { + public boolean equals(partition_name_to_vals_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)) + 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_vals.equals(that.part_vals)) + if (!this.part_name.equals(that.part_name)) return false; } @@ -24087,40 +37229,20 @@ return 0; } - public int compareTo(get_partition_args 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; - get_partition_args typedOther = (get_partition_args)other; + partition_name_to_vals_args typedOther = (partition_name_to_vals_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()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_vals()) { - lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); if (lastComparison != 0) { return lastComparison; } @@ -24142,33 +37264,9 @@ 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 + case 1: // PART_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 _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(); - } + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -24186,26 +37284,9 @@ 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(); - } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -24214,30 +37295,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_args("); + StringBuilder sb = new StringBuilder("partition_name_to_vals_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("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -24250,22 +37315,19 @@ } - 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 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 SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 Partition success; + 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 { SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -24284,8 +37346,6 @@ return SUCCESS; case 1: // O1 return O1; - case 2: // O2 - return O2; default: return null; } @@ -24331,60 +37391,72 @@ 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))); + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); 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_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); } - public get_partition_result() { + public partition_name_to_vals_result() { } - public get_partition_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) + public partition_name_to_vals_result( + List success, + MetaException o1) { this(); this.success = success; this.o1 = o1; - this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_partition_result(get_partition_result other) { + public partition_name_to_vals_result(partition_name_to_vals_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + 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); } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } } - public get_partition_result deepCopy() { - return new get_partition_result(this); + public partition_name_to_vals_result deepCopy() { + return new partition_name_to_vals_result(this); } @Override public void clear() { this.success = null; this.o1 = null; - this.o2 = null; } - public Partition getSuccess() { + 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(Partition success) { + public void setSuccess(List success) { this.success = success; } @@ -24426,36 +37498,13 @@ } } - 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); + setSuccess((List)value); } break; @@ -24467,14 +37516,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - } } @@ -24486,9 +37527,6 @@ case O1: return getO1(); - case O2: - return getO2(); - } throw new IllegalStateException(); } @@ -24504,8 +37542,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -24514,12 +37550,12 @@ 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 partition_name_to_vals_result) + return this.equals((partition_name_to_vals_result)that); return false; } - public boolean equals(get_partition_result that) { + public boolean equals(partition_name_to_vals_result that) { if (that == null) return false; @@ -24541,15 +37577,6 @@ 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; } @@ -24558,13 +37585,13 @@ return 0; } - public int compareTo(get_partition_result 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_partition_result typedOther = (get_partition_result)other; + partition_name_to_vals_result typedOther = (partition_name_to_vals_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -24586,16 +37613,6 @@ 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; } @@ -24614,9 +37631,18 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); + if (field.type == TType.LIST) { + { + TList _list195 = iprot.readListBegin(); + this.success = new ArrayList(_list195.size); + for (int _i196 = 0; _i196 < _list195.size; ++_i196) + { + String _elem197; + _elem197 = iprot.readString(); + this.success.add(_elem197); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -24629,14 +37655,6 @@ 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); } @@ -24651,16 +37669,19 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter198 : this.success) + { + oprot.writeString(_iter198); + } + 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(); @@ -24668,7 +37689,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_result("); + StringBuilder sb = new StringBuilder("partition_name_to_vals_result("); boolean first = true; sb.append("success:"); @@ -24686,14 +37707,6 @@ 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(); } @@ -24704,22 +37717,16 @@ } - 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 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); + 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 String db_name; - private String tbl_name; + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); + 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"); + PART_NAME((short)1, "part_name"); private static final Map byName = new HashMap(); @@ -24734,11 +37741,7 @@ */ 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 + case 1: // PART_NAME return PART_NAME; default: return null; @@ -24784,102 +37787,40 @@ 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(get_partition_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); } - public get_partition_by_name_args() { + public partition_name_to_spec_args() { } - public get_partition_by_name_args( - String db_name, - String tbl_name, + public partition_name_to_spec_args( 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 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 partition_name_to_spec_args(partition_name_to_spec_args other) { if (other.isSetPart_name()) { this.part_name = other.part_name; } } - public get_partition_by_name_args deepCopy() { - return new get_partition_by_name_args(this); + public partition_name_to_spec_args deepCopy() { + return new partition_name_to_spec_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; } @@ -24905,22 +37846,6 @@ 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(); @@ -24934,12 +37859,6 @@ 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(); @@ -24954,10 +37873,6 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); case PART_NAME: return isSetPart_name(); } @@ -24968,33 +37883,15 @@ 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 partition_name_to_spec_args) + return this.equals((partition_name_to_spec_args)that); return false; } - public boolean equals(get_partition_by_name_args that) { + public boolean equals(partition_name_to_spec_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) { @@ -25012,34 +37909,14 @@ return 0; } - public int compareTo(get_partition_by_name_args 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_partition_by_name_args typedOther = (get_partition_by_name_args)other; + partition_name_to_spec_args typedOther = (partition_name_to_spec_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; @@ -25067,21 +37944,7 @@ 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 + case 1: // PART_NAME if (field.type == TType.STRING) { this.part_name = iprot.readString(); } else { @@ -25101,16 +37964,6 @@ 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); @@ -25122,25 +37975,9 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_by_name_args("); + StringBuilder sb = new StringBuilder("partition_name_to_spec_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"); @@ -25158,22 +37995,19 @@ } - 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 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 SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private Partition success; + private Map 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"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -25192,8 +38026,6 @@ return SUCCESS; case 1: // O1 return O1; - case 2: // O2 - return O2; default: return null; } @@ -25239,60 +38071,77 @@ 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))); + 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))); - tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); } - public get_partition_by_name_result() { + public partition_name_to_spec_result() { } - public get_partition_by_name_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) + public partition_name_to_spec_result( + Map success, + MetaException o1) { this(); this.success = success; this.o1 = o1; - this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_partition_by_name_result(get_partition_by_name_result other) { + public partition_name_to_spec_result(partition_name_to_spec_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + 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); } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } } - public get_partition_by_name_result deepCopy() { - return new get_partition_by_name_result(this); + public partition_name_to_spec_result deepCopy() { + return new partition_name_to_spec_result(this); } @Override public void clear() { this.success = null; this.o1 = null; - this.o2 = null; } - public Partition getSuccess() { + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(String key, String val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { return this.success; } - public void setSuccess(Partition success) { + public void setSuccess(Map success) { this.success = success; } @@ -25316,44 +38165,21 @@ } 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; + 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; } } @@ -25363,7 +38189,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Partition)value); + setSuccess((Map)value); } break; @@ -25375,14 +38201,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - } } @@ -25394,9 +38212,6 @@ case O1: return getO1(); - case O2: - return getO2(); - } throw new IllegalStateException(); } @@ -25412,8 +38227,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -25422,12 +38235,12 @@ 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 partition_name_to_spec_result) + return this.equals((partition_name_to_spec_result)that); return false; } - public boolean equals(get_partition_by_name_result that) { + public boolean equals(partition_name_to_spec_result that) { if (that == null) return false; @@ -25449,15 +38262,6 @@ 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; } @@ -25466,13 +38270,13 @@ return 0; } - public int compareTo(get_partition_by_name_result 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_partition_by_name_result typedOther = (get_partition_by_name_result)other; + partition_name_to_spec_result typedOther = (partition_name_to_spec_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -25494,16 +38298,6 @@ 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; } @@ -25522,9 +38316,20 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); + if (field.type == TType.MAP) { + { + TMap _map199 = iprot.readMapBegin(); + this.success = new HashMap(2*_map199.size); + for (int _i200 = 0; _i200 < _map199.size; ++_i200) + { + String _key201; + String _val202; + _key201 = iprot.readString(); + _val202 = iprot.readString(); + this.success.put(_key201, _val202); + } + iprot.readMapEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -25537,14 +38342,6 @@ 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); } @@ -25559,16 +38356,20 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); + for (Map.Entry _iter203 : this.success.entrySet()) + { + oprot.writeString(_iter203.getKey()); + oprot.writeString(_iter203.getValue()); + } + oprot.writeMapEnd(); + } 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(); @@ -25576,7 +38377,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_by_name_result("); + StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); boolean first = true; sb.append("success:"); @@ -25594,14 +38395,6 @@ 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(); } @@ -25612,22 +38405,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 add_index_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_index_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 MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); + 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 String db_name; - private String tbl_name; - private short max_parts; + 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 { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_PARTS((short)3, "max_parts"); + NEW_INDEX((short)1, "new_index"), + INDEX_TABLE((short)2, "index_table"); private static final Map byName = new HashMap(); @@ -25642,12 +38432,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 1: // NEW_INDEX + return NEW_INDEX; + case 2: // INDEX_TABLE + return INDEX_TABLE; default: return null; } @@ -25688,157 +38476,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.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_partitions_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); } - public get_partitions_args() { - this.max_parts = (short)-1; - + public add_index_args() { } - public get_partitions_args( - String db_name, - String tbl_name, - short max_parts) + public add_index_args( + Index new_index, + Table index_table) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - setMax_partsIsSet(true); + this.new_index = new_index; + this.index_table = index_table; } /** * 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 add_index_args(add_index_args other) { + if (other.isSetNew_index()) { + this.new_index = new Index(other.new_index); } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetIndex_table()) { + this.index_table = new Table(other.index_table); } - this.max_parts = other.max_parts; } - public get_partitions_args deepCopy() { - return new get_partitions_args(this); + public add_index_args deepCopy() { + return new add_index_args(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_parts = (short)-1; - + this.new_index = null; + this.index_table = null; } - public String getDb_name() { - return this.db_name; + public Index getNew_index() { + return this.new_index; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setNew_index(Index new_index) { + this.new_index = new_index; } - public void unsetDb_name() { - this.db_name = null; + public void unsetNew_index() { + this.new_index = 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 new_index is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_index() { + return this.new_index != null; } - public void setDb_nameIsSet(boolean value) { + public void setNew_indexIsSet(boolean value) { if (!value) { - this.db_name = null; + this.new_index = null; } } - public String getTbl_name() { - return this.tbl_name; + public Table getIndex_table() { + return this.index_table; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setIndex_table(Table index_table) { + this.index_table = index_table; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetIndex_table() { + this.index_table = 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 index_table is set (has been asigned a value) and false otherwise */ + public boolean isSetIndex_table() { + return this.index_table != null; } - public void setTbl_nameIsSet(boolean value) { + public void setIndex_tableIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.index_table = 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 NEW_INDEX: if (value == null) { - unsetTbl_name(); + unsetNew_index(); } else { - setTbl_name((String)value); + setNew_index((Index)value); } break; - case MAX_PARTS: + case INDEX_TABLE: if (value == null) { - unsetMax_parts(); + unsetIndex_table(); } else { - setMax_parts((Short)value); + setIndex_table((Table)value); } break; @@ -25847,14 +38591,11 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case NEW_INDEX: + return getNew_index(); - case MAX_PARTS: - return new Short(getMax_parts()); + case INDEX_TABLE: + return getIndex_table(); } throw new IllegalStateException(); @@ -25862,17 +38603,15 @@ /** 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 MAX_PARTS: - return isSetMax_parts(); + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NEW_INDEX: + return isSetNew_index(); + case INDEX_TABLE: + return isSetIndex_table(); } throw new IllegalStateException(); } @@ -25881,39 +38620,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 add_index_args) + return this.equals((add_index_args)that); return false; } - public boolean equals(get_partitions_args that) { + public boolean equals(add_index_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)) + 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.tbl_name.equals(that.tbl_name)) + if (!this.new_index.equals(that.new_index)) 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_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.max_parts != that.max_parts) + if (!this.index_table.equals(that.index_table)) return false; } @@ -25925,40 +38655,30 @@ return 0; } - public int compareTo(get_partitions_args other) { + public int compareTo(add_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partitions_args typedOther = (get_partitions_args)other; + add_index_args typedOther = (add_index_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()); + lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(typedOther.isSetNew_index()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetNew_index()) { + lastComparison = TBaseHelper.compareTo(this.new_index, typedOther.new_index); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(typedOther.isSetIndex_table()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetIndex_table()) { + lastComparison = TBaseHelper.compareTo(this.index_table, typedOther.index_table); if (lastComparison != 0) { return lastComparison; } @@ -25980,24 +38700,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 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 3: // MAX_PARTS - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); + case 2: // INDEX_TABLE + if (field.type == TType.STRUCT) { + this.index_table = new Table(); + this.index_table.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -26015,47 +38729,40 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + if (this.new_index != null) { + oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); + this.new_index.write(oprot); oprot.writeFieldEnd(); } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + if (this.index_table != null) { + oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); + this.index_table.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("add_index_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("new_index:"); + if (this.new_index == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.new_index); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("index_table:"); + if (this.index_table == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.index_table); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -26066,22 +38773,25 @@ } - 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 add_index_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_index_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + 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 List success; - private NoSuchObjectException o1; - private MetaException o2; + 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 { SUCCESS((short)0, "success"), O1((short)1, "o1"), - O2((short)2, "o2"); + O2((short)2, "o2"), + O3((short)3, "o3"); private static final Map byName = new HashMap(); @@ -26102,6 +38812,8 @@ return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; default: return null; } @@ -26147,51 +38859,53 @@ 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)))); + 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_partitions_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); } - public get_partitions_result() { + public add_index_result() { } - public get_partitions_result( - List success, - NoSuchObjectException o1, - MetaException o2) + public add_index_result( + Index 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 get_partitions_result(get_partitions_result other) { + public add_index_result(add_index_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; + this.success = new Index(other.success); } if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); } } - public get_partitions_result deepCopy() { - return new get_partitions_result(this); + public add_index_result deepCopy() { + return new add_index_result(this); } @Override @@ -26199,28 +38913,14 @@ 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); + this.o3 = null; } - public List getSuccess() { + public Index getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(Index success) { this.success = success; } @@ -26239,11 +38939,11 @@ } } - public NoSuchObjectException getO1() { + public InvalidObjectException getO1() { return this.o1; } - public void setO1(NoSuchObjectException o1) { + public void setO1(InvalidObjectException o1) { this.o1 = o1; } @@ -26262,11 +38962,11 @@ } } - public MetaException getO2() { + public AlreadyExistsException getO2() { return this.o2; } - public void setO2(MetaException o2) { + public void setO2(AlreadyExistsException o2) { this.o2 = o2; } @@ -26285,13 +38985,36 @@ } } + 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((List)value); + setSuccess((Index)value); } break; @@ -26299,7 +39022,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); + setO1((InvalidObjectException)value); } break; @@ -26307,7 +39030,15 @@ if (value == null) { unsetO2(); } else { - setO2((MetaException)value); + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); } break; @@ -26325,6 +39056,9 @@ case O2: return getO2(); + case O3: + return getO3(); + } throw new IllegalStateException(); } @@ -26342,6 +39076,8 @@ return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); } throw new IllegalStateException(); } @@ -26350,12 +39086,12 @@ 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 add_index_result) + return this.equals((add_index_result)that); return false; } - public boolean equals(get_partitions_result that) { + public boolean equals(add_index_result that) { if (that == null) return false; @@ -26386,6 +39122,15 @@ 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; } @@ -26394,13 +39139,13 @@ return 0; } - public int compareTo(get_partitions_result other) { + public int compareTo(add_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_partitions_result typedOther = (get_partitions_result)other; + add_index_result typedOther = (add_index_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -26432,6 +39177,16 @@ 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; } @@ -26450,26 +39205,16 @@ } 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(); - } + if (field.type == TType.STRUCT) { + this.success = new Index(); + 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 = new InvalidObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -26477,12 +39222,20 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); + 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); } @@ -26497,14 +39250,7 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter107 : this.success) - { - _iter107.write(oprot); - } - oprot.writeListEnd(); - } + this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -26514,6 +39260,10 @@ 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(); @@ -26521,7 +39271,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_result("); + StringBuilder sb = new StringBuilder("add_index_result("); boolean first = true; sb.append("success:"); @@ -26547,6 +39297,14 @@ 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(); } @@ -26557,22 +39315,25 @@ } - 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 alter_index_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_index_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 MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); + 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 String db_name; - private String tbl_name; - private short max_parts; + 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 { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - MAX_PARTS((short)3, "max_parts"); + 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(); @@ -26587,12 +39348,14 @@ */ 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 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; } @@ -26633,157 +39396,191 @@ } // 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, + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BASE_TBL_NAME, new FieldMetaData("base_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.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_partition_names_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); } - public get_partition_names_args() { - this.max_parts = (short)-1; - + public alter_index_args() { } - public get_partition_names_args( - String db_name, - String tbl_name, - short max_parts) + public alter_index_args( + String dbname, + String base_tbl_name, + String idx_name, + Index new_idx) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - setMax_partsIsSet(true); + 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_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 alter_index_args(alter_index_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetBase_tbl_name()) { + this.base_tbl_name = other.base_tbl_name; } - this.max_parts = other.max_parts; + if (other.isSetIdx_name()) { + this.idx_name = other.idx_name; + } + if (other.isSetNew_idx()) { + this.new_idx = new Index(other.new_idx); + } } - public get_partition_names_args deepCopy() { - return new get_partition_names_args(this); + public alter_index_args deepCopy() { + return new alter_index_args(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_parts = (short)-1; + this.dbname = null; + this.base_tbl_name = null; + this.idx_name = null; + this.new_idx = null; + } + public String getDbname() { + return this.dbname; } - public String getDb_name() { - return this.db_name; + public void setDbname(String dbname) { + this.dbname = dbname; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void unsetDbname() { + this.dbname = null; } - public void unsetDb_name() { - this.db_name = 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 db_name is set (has been asigned a value) and false otherwise */ - public boolean isSetDb_name() { - return this.db_name != null; + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } } - public void setDb_nameIsSet(boolean value) { + 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; + } + + public void unsetBase_tbl_name() { + this.base_tbl_name = 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 setBase_tbl_nameIsSet(boolean value) { if (!value) { - this.db_name = null; + this.base_tbl_name = null; } } - public String getTbl_name() { - return this.tbl_name; + public String getIdx_name() { + return this.idx_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setIdx_name(String idx_name) { + this.idx_name = idx_name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetIdx_name() { + this.idx_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; + /** 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 setTbl_nameIsSet(boolean value) { + public void setIdx_nameIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.idx_name = null; } } - public short getMax_parts() { - return this.max_parts; + public Index getNew_idx() { + return this.new_idx; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); + public void setNew_idx(Index new_idx) { + this.new_idx = new_idx; } - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + public void unsetNew_idx() { + this.new_idx = 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 new_idx is set (has been asigned a value) and false otherwise */ + public boolean isSetNew_idx() { + return this.new_idx != null; } - public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + public void setNew_idxIsSet(boolean value) { + if (!value) { + this.new_idx = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: + case DBNAME: if (value == null) { - unsetDb_name(); + unsetDbname(); } else { - setDb_name((String)value); + setDbname((String)value); } break; - case TBL_NAME: + case BASE_TBL_NAME: if (value == null) { - unsetTbl_name(); + unsetBase_tbl_name(); } else { - setTbl_name((String)value); + setBase_tbl_name((String)value); } break; - case MAX_PARTS: + case IDX_NAME: if (value == null) { - unsetMax_parts(); + unsetIdx_name(); } else { - setMax_parts((Short)value); + setIdx_name((String)value); + } + break; + + case NEW_IDX: + if (value == null) { + unsetNew_idx(); + } else { + setNew_idx((Index)value); } break; @@ -26792,14 +39589,17 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case DBNAME: + return getDbname(); - case TBL_NAME: - return getTbl_name(); + case BASE_TBL_NAME: + return getBase_tbl_name(); - case MAX_PARTS: - return new Short(getMax_parts()); + case IDX_NAME: + return getIdx_name(); + + case NEW_IDX: + return getNew_idx(); } throw new IllegalStateException(); @@ -26812,12 +39612,14 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); + 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(); } @@ -26826,39 +39628,48 @@ 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 alter_index_args) + return this.equals((alter_index_args)that); return false; } - public boolean equals(get_partition_names_args that) { + public boolean equals(alter_index_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_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; - if (!this.db_name.equals(that.db_name)) + } + + 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_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_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.tbl_name.equals(that.tbl_name)) + if (!this.idx_name.equals(that.idx_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)) + 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.max_parts != that.max_parts) + if (!this.new_idx.equals(that.new_idx)) return false; } @@ -26870,40 +39681,50 @@ return 0; } - public int compareTo(get_partition_names_args other) { + public int compareTo(alter_index_args 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; + alter_index_args typedOther = (alter_index_args)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + 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(isSetBase_tbl_name()).compareTo(typedOther.isSetBase_tbl_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetBase_tbl_name()) { + lastComparison = TBaseHelper.compareTo(this.base_tbl_name, typedOther.base_tbl_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(typedOther.isSetIdx_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + 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; } @@ -26925,24 +39746,31 @@ break; } switch (field.id) { - case 1: // DB_NAME + case 1: // DBNAME if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.dbname = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // TBL_NAME + case 2: // BASE_TBL_NAME if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.base_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); + 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.new_idx = new Index(); + this.new_idx.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -26960,46 +39788,65 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + 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.base_tbl_name != null) { + oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); + oprot.writeString(this.base_tbl_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); + 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(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_args("); + StringBuilder sb = new StringBuilder("alter_index_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("dbname:"); + if (this.dbname == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.dbname); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("base_tbl_name:"); + if (this.base_tbl_name == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.base_tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); + sb.append("idx_name:"); + if (this.idx_name == null) { + sb.append("null"); + } else { + 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(")"); return sb.toString(); @@ -27011,19 +39858,19 @@ } - 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 alter_index_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_index_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 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 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 { - SUCCESS((short)0, "success"), - O2((short)1, "o2"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -27038,9 +39885,9 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // O2 + case 1: // O1 + return O1; + case 2: // O2 return O2; default: return null; @@ -27086,88 +39933,68 @@ 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.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_index_result.class, metaDataMap); } - public get_partition_names_result() { + public alter_index_result() { } - public get_partition_names_result( - List success, + public alter_index_result( + InvalidOperationException o1, MetaException o2) { this(); - this.success = success; + this.o1 = o1; this.o2 = o2; } /** * 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 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 get_partition_names_result deepCopy() { - return new get_partition_names_result(this); + public alter_index_result deepCopy() { + return new alter_index_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(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; + public InvalidOperationException getO1() { + return this.o1; } - public void setSuccess(List success) { - this.success = success; + public void setO1(InvalidOperationException o1) { + this.o1 = o1; } - public void unsetSuccess() { - this.success = null; + public void unsetO1() { + this.o1 = 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 o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setSuccessIsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.success = null; + this.o1 = null; } } @@ -27196,11 +40023,11 @@ public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: + case O1: if (value == null) { - unsetSuccess(); + unsetO1(); } else { - setSuccess((List)value); + setO1((InvalidOperationException)value); } break; @@ -27217,8 +40044,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); + case O1: + return getO1(); case O2: return getO2(); @@ -27234,8 +40061,8 @@ } switch (field) { - case SUCCESS: - return isSetSuccess(); + case O1: + return isSetO1(); case O2: return isSetO2(); } @@ -27246,21 +40073,21 @@ 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 alter_index_result) + return this.equals((alter_index_result)that); return false; } - public boolean equals(get_partition_names_result that) { + public boolean equals(alter_index_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)) + 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.success.equals(that.success)) + if (!this.o1.equals(that.o1)) return false; } @@ -27281,20 +40108,20 @@ return 0; } - public int compareTo(get_partition_names_result other) { + public int compareTo(alter_index_result 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; + alter_index_result typedOther = (alter_index_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); if (lastComparison != 0) { return lastComparison; } - if (isSetSuccess()) { - lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); if (lastComparison != 0) { return lastComparison; } @@ -27326,24 +40153,15 @@ 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: // O1 + if (field.type == TType.STRUCT) { + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O2 + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -27363,16 +40181,9 @@ 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 _iter111 : this.success) - { - oprot.writeString(_iter111); - } - oprot.writeListEnd(); - } + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); @@ -27385,14 +40196,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_result("); + StringBuilder sb = new StringBuilder("alter_index_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.o1); } first = false; if (!first) sb.append(", "); @@ -27413,25 +40224,25 @@ } - 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 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 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 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 String db_name; private String tbl_name; - private List part_vals; - private short max_parts; + 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - MAX_PARTS((short)4, "max_parts"); + INDEX_NAME((short)3, "index_name"), + DELETE_DATA((short)4, "deleteData"); private static final Map byName = new HashMap(); @@ -27450,10 +40261,10 @@ 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 3: // INDEX_NAME + return INDEX_NAME; + case 4: // DELETE_DATA + return DELETE_DATA; default: return null; } @@ -27494,7 +40305,7 @@ } // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; + private static final int __DELETEDATA_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; @@ -27504,38 +40315,35 @@ 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.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(get_partitions_ps_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); } - public get_partitions_ps_args() { - this.max_parts = (short)-1; - + public drop_index_by_name_args() { } - public get_partitions_ps_args( + public drop_index_by_name_args( String db_name, String tbl_name, - List part_vals, - short max_parts) + String index_name, + boolean deleteData) { 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.index_name = index_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ - public get_partitions_ps_args(get_partitions_ps_args 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()) { @@ -27544,27 +40352,23 @@ 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.isSetIndex_name()) { + this.index_name = other.index_name; } - this.max_parts = other.max_parts; + this.deleteData = other.deleteData; } - public get_partitions_ps_args deepCopy() { - return new get_partitions_ps_args(this); + 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.part_vals = null; - this.max_parts = (short)-1; - + this.index_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; } public String getDb_name() { @@ -27613,64 +40417,49 @@ } } - 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 String getIndex_name() { + return this.index_name; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setIndex_name(String index_name) { + this.index_name = index_name; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetIndex_name() { + this.index_name = 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 index_name is set (has been asigned a value) and false otherwise */ + public boolean isSetIndex_name() { + return this.index_name != null; } - public void setPart_valsIsSet(boolean value) { + public void setIndex_nameIsSet(boolean value) { if (!value) { - this.part_vals = null; + this.index_name = null; } } - public short getMax_parts() { - return this.max_parts; + public boolean isDeleteData() { + return this.deleteData; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); } - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_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); + /** 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 setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -27691,19 +40480,19 @@ } break; - case PART_VALS: + case INDEX_NAME: if (value == null) { - unsetPart_vals(); + unsetIndex_name(); } else { - setPart_vals((List)value); + setIndex_name((String)value); } break; - case MAX_PARTS: + case DELETE_DATA: if (value == null) { - unsetMax_parts(); + unsetDeleteData(); } else { - setMax_parts((Short)value); + setDeleteData((Boolean)value); } break; @@ -27718,11 +40507,11 @@ case TBL_NAME: return getTbl_name(); - case PART_VALS: - return getPart_vals(); + case INDEX_NAME: + return getIndex_name(); - case MAX_PARTS: - return new Short(getMax_parts()); + case DELETE_DATA: + return new Boolean(isDeleteData()); } throw new IllegalStateException(); @@ -27739,10 +40528,10 @@ return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); + case INDEX_NAME: + return isSetIndex_name(); + case DELETE_DATA: + return isSetDeleteData(); } throw new IllegalStateException(); } @@ -27751,12 +40540,12 @@ 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 drop_index_by_name_args) + return this.equals((drop_index_by_name_args)that); return false; } - public boolean equals(get_partitions_ps_args that) { + public boolean equals(drop_index_by_name_args that) { if (that == null) return false; @@ -27778,21 +40567,21 @@ 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_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.part_vals.equals(that.part_vals)) + if (!this.index_name.equals(that.index_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)) + 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.max_parts != that.max_parts) + if (this.deleteData != that.deleteData) return false; } @@ -27804,13 +40593,13 @@ return 0; } - public int compareTo(get_partitions_ps_args 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; - get_partitions_ps_args typedOther = (get_partitions_ps_args)other; + drop_index_by_name_args typedOther = (drop_index_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -27832,22 +40621,22 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_vals()) { - lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (isSetIndex_name()) { + lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetDeleteData()) { + lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); if (lastComparison != 0) { return lastComparison; } @@ -27883,27 +40672,17 @@ 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 3: // INDEX_NAME + if (field.type == TType.STRING) { + this.index_name = iprot.readString(); } 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 4: // DELETE_DATA + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -27931,20 +40710,13 @@ 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 _iter115 : this.part_vals) - { - oprot.writeString(_iter115); - } - oprot.writeListEnd(); - } + if (this.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -27952,7 +40724,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_ps_args("); + StringBuilder sb = new StringBuilder("drop_index_by_name_args("); boolean first = true; sb.append("db_name:"); @@ -27971,16 +40743,16 @@ } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("index_name:"); + if (this.index_name == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.index_name); } first = false; if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); + sb.append("deleteData:"); + sb.append(this.deleteData); first = false; sb.append(")"); return sb.toString(); @@ -27992,19 +40764,22 @@ } - 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_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 SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + 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 List success; - private MetaException o1; + 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"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -28023,6 +40798,8 @@ return SUCCESS; case 1: // O1 return O1; + case 2: // O2 + return O2; default: return null; } @@ -28063,100 +40840,91 @@ } // 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 StructMetaData(TType.STRUCT, Partition.class)))); + 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(get_partitions_ps_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); } - public get_partitions_ps_result() { + public drop_index_by_name_result() { } - - public get_partitions_ps_result( - List success, - MetaException o1) + + public drop_index_by_name_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 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_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 MetaException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } - public get_partitions_ps_result deepCopy() { - return new get_partitions_ps_result(this); + public drop_index_by_name_result deepCopy() { + return new drop_index_by_name_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.o1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Partition elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + this.o2 = 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 getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -28175,13 +40943,36 @@ } } + 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((List)value); + setSuccess((Boolean)value); } break; @@ -28189,7 +40980,15 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -28199,11 +40998,14 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); + case O2: + return getO2(); + } throw new IllegalStateException(); } @@ -28219,6 +41021,8 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -28227,21 +41031,21 @@ 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_index_by_name_result) + return this.equals((drop_index_by_name_result)that); return false; } - public boolean equals(get_partitions_ps_result that) { + public boolean equals(drop_index_by_name_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; } @@ -28254,6 +41058,15 @@ 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; } @@ -28262,13 +41075,13 @@ return 0; } - public int compareTo(get_partitions_ps_result 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; - get_partitions_ps_result typedOther = (get_partitions_ps_result)other; + drop_index_by_name_result typedOther = (drop_index_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -28290,6 +41103,16 @@ 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; } @@ -28308,31 +41131,29 @@ } 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(); - } + 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 = 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); } @@ -28347,19 +41168,16 @@ 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.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(); @@ -28367,15 +41185,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_ps_result("); + StringBuilder sb = new StringBuilder("drop_index_by_name_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -28385,6 +41199,14 @@ 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(); } @@ -28395,25 +41217,22 @@ } - 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 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 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 INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); private String db_name; private String tbl_name; - private List part_vals; - private short max_parts; + 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - PART_VALS((short)3, "part_vals"), - MAX_PARTS((short)4, "max_parts"); + INDEX_NAME((short)3, "index_name"); private static final Map byName = new HashMap(); @@ -28432,10 +41251,8 @@ 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 3: // INDEX_NAME + return INDEX_NAME; default: return null; } @@ -28476,8 +41293,6 @@ } // 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 { @@ -28486,67 +41301,50 @@ 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.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); } - public get_partition_names_ps_args() { - this.max_parts = (short)-1; - + public get_index_by_name_args() { } - public get_partition_names_ps_args( + public get_index_by_name_args( String db_name, String tbl_name, - List part_vals, - short max_parts) + String index_name) { 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.index_name = index_name; } /** * 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); + 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.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.isSetIndex_name()) { + this.index_name = other.index_name; } - this.max_parts = other.max_parts; } - public get_partition_names_ps_args deepCopy() { - return new get_partition_names_ps_args(this); + 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.part_vals = null; - this.max_parts = (short)-1; - + this.index_name = null; } public String getDb_name() { @@ -28591,68 +41389,31 @@ 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; + this.tbl_name = null; } } - public short getMax_parts() { - return this.max_parts; + public String getIndex_name() { + return this.index_name; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); + public void setIndex_name(String index_name) { + this.index_name = index_name; } - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + public void unsetIndex_name() { + this.index_name = 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 index_name is set (has been asigned a value) and false otherwise */ + public boolean isSetIndex_name() { + return this.index_name != null; } - public void setMax_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + public void setIndex_nameIsSet(boolean value) { + if (!value) { + this.index_name = null; + } } public void setFieldValue(_Fields field, Object value) { @@ -28673,19 +41434,11 @@ } break; - case PART_VALS: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case MAX_PARTS: + case INDEX_NAME: if (value == null) { - unsetMax_parts(); + unsetIndex_name(); } else { - setMax_parts((Short)value); + setIndex_name((String)value); } break; @@ -28700,11 +41453,8 @@ case TBL_NAME: return getTbl_name(); - case PART_VALS: - return getPart_vals(); - - case MAX_PARTS: - return new Short(getMax_parts()); + case INDEX_NAME: + return getIndex_name(); } throw new IllegalStateException(); @@ -28721,10 +41471,8 @@ return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); + case INDEX_NAME: + return isSetIndex_name(); } throw new IllegalStateException(); } @@ -28733,12 +41481,12 @@ 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 get_index_by_name_args) + return this.equals((get_index_by_name_args)that); return false; } - public boolean equals(get_partition_names_ps_args that) { + public boolean equals(get_index_by_name_args that) { if (that == null) return false; @@ -28760,21 +41508,12 @@ 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)) + 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.max_parts != that.max_parts) + if (!this.index_name.equals(that.index_name)) return false; } @@ -28786,13 +41525,13 @@ return 0; } - public int compareTo(get_partition_names_ps_args 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; - get_partition_names_ps_args typedOther = (get_partition_names_ps_args)other; + get_index_by_name_args typedOther = (get_index_by_name_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -28814,22 +41553,12 @@ 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(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetIndex_name()) { + lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); if (lastComparison != 0) { return lastComparison; } @@ -28865,27 +41594,9 @@ 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(); - } - } 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 3: // INDEX_NAME + if (field.type == TType.STRING) { + this.index_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -28913,28 +41624,18 @@ 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 _iter123 : this.part_vals) - { - oprot.writeString(_iter123); - } - oprot.writeListEnd(); - } + if (this.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_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_partition_names_ps_args("); + StringBuilder sb = new StringBuilder("get_index_by_name_args("); boolean first = true; sb.append("db_name:"); @@ -28953,17 +41654,13 @@ } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("index_name:"); + if (this.index_name == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.index_name); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -28974,19 +41671,22 @@ } - 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 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 SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + 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 List success; + 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 { SUCCESS((short)0, "success"), - O1((short)1, "o1"); + O1((short)1, "o1"), + O2((short)2, "o2"); private static final Map byName = new HashMap(); @@ -29005,6 +41705,8 @@ return SUCCESS; case 1: // O1 return O1; + case 2: // O2 + return O2; default: return null; } @@ -29050,72 +41752,60 @@ 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)))); + 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(get_partition_names_ps_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); } - public get_partition_names_ps_result() { + public get_index_by_name_result() { } - public get_partition_names_ps_result( - List success, - MetaException o1) + public get_index_by_name_result( + Index success, + MetaException o1, + NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_partition_names_ps_result(get_partition_names_ps_result other) { + public get_index_by_name_result(get_index_by_name_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; + this.success = new Index(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } } - public get_partition_names_ps_result deepCopy() { - return new get_partition_names_ps_result(this); + public get_index_by_name_result deepCopy() { + return new get_index_by_name_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); + this.o2 = null; } - public List getSuccess() { + public Index getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(Index success) { this.success = success; } @@ -29157,13 +41847,36 @@ } } + 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((List)value); + setSuccess((Index)value); } break; @@ -29175,6 +41888,14 @@ } break; + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + } } @@ -29186,6 +41907,9 @@ case O1: return getO1(); + case O2: + return getO2(); + } throw new IllegalStateException(); } @@ -29201,6 +41925,8 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); } throw new IllegalStateException(); } @@ -29209,12 +41935,12 @@ 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 get_index_by_name_result) + return this.equals((get_index_by_name_result)that); return false; } - public boolean equals(get_partition_names_ps_result that) { + public boolean equals(get_index_by_name_result that) { if (that == null) return false; @@ -29236,6 +41962,15 @@ 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; } @@ -29244,13 +41979,13 @@ return 0; } - public int compareTo(get_partition_names_ps_result 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; - get_partition_names_ps_result typedOther = (get_partition_names_ps_result)other; + get_index_by_name_result typedOther = (get_index_by_name_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -29272,6 +42007,16 @@ 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; } @@ -29287,21 +42032,12 @@ 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) - { - String _elem126; - _elem126 = iprot.readString(); - this.success.add(_elem126); - } - iprot.readListEnd(); - } + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == TType.STRUCT) { + this.success = new Index(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -29314,6 +42050,14 @@ 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); } @@ -29328,19 +42072,16 @@ 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(); - } + 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(); @@ -29348,7 +42089,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); + StringBuilder sb = new StringBuilder("get_index_by_name_result("); boolean first = true; sb.append("success:"); @@ -29366,6 +42107,14 @@ 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(); } @@ -29376,25 +42125,22 @@ } - 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 get_indexes_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_indexes_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 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 MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); private String db_name; private String tbl_name; - private String filter; - private short max_parts; + 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - FILTER((short)3, "filter"), - MAX_PARTS((short)4, "max_parts"); + MAX_INDEXES((short)3, "max_indexes"); private static final Map byName = new HashMap(); @@ -29413,10 +42159,8 @@ return DB_NAME; case 2: // TBL_NAME return TBL_NAME; - case 3: // FILTER - return FILTER; - case 4: // MAX_PARTS - return MAX_PARTS; + case 3: // MAX_INDEXES + return MAX_INDEXES; default: return null; } @@ -29457,7 +42201,7 @@ } // isset id assignments - private static final int __MAX_PARTS_ISSET_ID = 0; + private static final int __MAX_INDEXES_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, FieldMetaData> metaDataMap; @@ -29467,37 +42211,33 @@ 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, + tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); } - public get_partitions_by_filter_args() { - this.max_parts = (short)-1; + public get_indexes_args() { + this.max_indexes = (short)-1; } - public get_partitions_by_filter_args( + public get_indexes_args( String db_name, String tbl_name, - String filter, - short max_parts) + short max_indexes) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - setMax_partsIsSet(true); + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); } /** * Performs a deep copy on other. */ - public get_partitions_by_filter_args(get_partitions_by_filter_args other) { + public get_indexes_args(get_indexes_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetDb_name()) { @@ -29506,22 +42246,18 @@ if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } - if (other.isSetFilter()) { - this.filter = other.filter; - } - this.max_parts = other.max_parts; + this.max_indexes = other.max_indexes; } - public get_partitions_by_filter_args deepCopy() { - return new get_partitions_by_filter_args(this); + public get_indexes_args deepCopy() { + return new get_indexes_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; - this.filter = null; - this.max_parts = (short)-1; + this.max_indexes = (short)-1; } @@ -29571,49 +42307,26 @@ } } - public String getFilter() { - return this.filter; - } - - public void setFilter(String filter) { - this.filter = filter; - } - - public void unsetFilter() { - this.filter = 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 setFilterIsSet(boolean value) { - if (!value) { - this.filter = null; - } - } - - public short getMax_parts() { - return this.max_parts; + public short getMax_indexes() { + return this.max_indexes; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - setMax_partsIsSet(true); + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); } - public void unsetMax_parts() { - __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); + public void unsetMax_indexes() { + __isset_bit_vector.clear(__MAX_INDEXES_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); + /** 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_partsIsSet(boolean value) { - __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -29634,19 +42347,11 @@ } break; - case FILTER: - if (value == null) { - unsetFilter(); - } else { - setFilter((String)value); - } - break; - - case MAX_PARTS: + case MAX_INDEXES: if (value == null) { - unsetMax_parts(); + unsetMax_indexes(); } else { - setMax_parts((Short)value); + setMax_indexes((Short)value); } break; @@ -29661,11 +42366,8 @@ case TBL_NAME: return getTbl_name(); - case FILTER: - return getFilter(); - - case MAX_PARTS: - return new Short(getMax_parts()); + case MAX_INDEXES: + return new Short(getMax_indexes()); } throw new IllegalStateException(); @@ -29682,10 +42384,8 @@ return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case FILTER: - return isSetFilter(); - case MAX_PARTS: - return isSetMax_parts(); + case MAX_INDEXES: + return isSetMax_indexes(); } throw new IllegalStateException(); } @@ -29694,12 +42394,12 @@ 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 get_indexes_args) + return this.equals((get_indexes_args)that); return false; } - public boolean equals(get_partitions_by_filter_args that) { + public boolean equals(get_indexes_args that) { if (that == null) return false; @@ -29721,21 +42421,12 @@ 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)) - return false; - if (!this.filter.equals(that.filter)) - 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_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.max_parts != that.max_parts) + if (this.max_indexes != that.max_indexes) return false; } @@ -29747,13 +42438,13 @@ return 0; } - public int compareTo(get_partitions_by_filter_args other) { + public int compareTo(get_indexes_args 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; + get_indexes_args typedOther = (get_indexes_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -29775,22 +42466,12 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetFilter()) { - lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_parts()) { - lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (isSetMax_indexes()) { + lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); if (lastComparison != 0) { return lastComparison; } @@ -29826,17 +42507,10 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 3: // FILTER - if (field.type == TType.STRING) { - this.filter = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // MAX_PARTS + case 3: // MAX_INDEXES if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - setMax_partsIsSet(true); + this.max_indexes = iprot.readI16(); + setMax_indexesIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -29864,13 +42538,8 @@ oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - 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.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -29878,7 +42547,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); + StringBuilder sb = new StringBuilder("get_indexes_args("); boolean first = true; sb.append("db_name:"); @@ -29897,16 +42566,8 @@ } first = false; if (!first) sb.append(", "); - sb.append("filter:"); - if (this.filter == null) { - sb.append("null"); - } else { - sb.append(this.filter); - } - first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); + sb.append("max_indexes:"); + sb.append(this.max_indexes); first = false; sb.append(")"); return sb.toString(); @@ -29918,16 +42579,16 @@ } - 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 get_indexes_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_indexes_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 MetaException o1; - private NoSuchObjectException o2; + 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 { @@ -30000,22 +42661,22 @@ 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)))); + 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(get_partitions_by_filter_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); } - public get_partitions_by_filter_result() { + public get_indexes_result() { } - public get_partitions_by_filter_result( - List success, - MetaException o1, - NoSuchObjectException o2) + public get_indexes_result( + List success, + NoSuchObjectException o1, + MetaException o2) { this(); this.success = success; @@ -30026,24 +42687,24 @@ /** * Performs a deep copy on other. */ - public get_partitions_by_filter_result(get_partitions_by_filter_result other) { + public get_indexes_result(get_indexes_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); + 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 MetaException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + this.o2 = new MetaException(other.o2); } } - public get_partitions_by_filter_result deepCopy() { - return new get_partitions_by_filter_result(this); + public get_indexes_result deepCopy() { + return new get_indexes_result(this); } @Override @@ -30057,22 +42718,22 @@ return (this.success == null) ? 0 : this.success.size(); } - public java.util.Iterator getSuccessIterator() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(Partition elem) { + public void addToSuccess(Index elem) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new ArrayList(); } this.success.add(elem); } - public List getSuccess() { + public List getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(List success) { this.success = success; } @@ -30091,11 +42752,11 @@ } } - public MetaException getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -30114,11 +42775,11 @@ } } - public NoSuchObjectException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -30143,7 +42804,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -30151,7 +42812,7 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); } break; @@ -30159,7 +42820,7 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((MetaException)value); } break; @@ -30202,12 +42863,12 @@ 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 get_indexes_result) + return this.equals((get_indexes_result)that); return false; } - public boolean equals(get_partitions_by_filter_result that) { + public boolean equals(get_indexes_result that) { if (that == null) return false; @@ -30246,13 +42907,13 @@ return 0; } - public int compareTo(get_partitions_by_filter_result other) { + public int compareTo(get_indexes_result 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; + get_indexes_result typedOther = (get_indexes_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -30304,14 +42965,14 @@ 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) + TList _list204 = iprot.readListBegin(); + this.success = new ArrayList(_list204.size); + for (int _i205 = 0; _i205 < _list204.size; ++_i205) { - Partition _elem130; - _elem130 = new Partition(); - _elem130.read(iprot); - this.success.add(_elem130); + Index _elem206; + _elem206 = new Index(); + _elem206.read(iprot); + this.success.add(_elem206); } iprot.readListEnd(); } @@ -30321,7 +42982,7 @@ break; case 1: // O1 if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -30329,7 +42990,7 @@ break; case 2: // O2 if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + this.o2 = new MetaException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -30351,9 +43012,9 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter131 : this.success) + for (Index _iter207 : this.success) { - _iter131.write(oprot); + _iter207.write(oprot); } oprot.writeListEnd(); } @@ -30373,7 +43034,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); + StringBuilder sb = new StringBuilder("get_indexes_result("); boolean first = true; sb.append("success:"); @@ -30409,22 +43070,22 @@ } - 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 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 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 MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); private String db_name; private String tbl_name; - private Partition new_part; + 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 { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - NEW_PART((short)3, "new_part"); + MAX_INDEXES((short)3, "max_indexes"); private static final Map byName = new HashMap(); @@ -30443,8 +43104,8 @@ return DB_NAME; case 2: // TBL_NAME return TBL_NAME; - case 3: // NEW_PART - return NEW_PART; + case 3: // MAX_INDEXES + return MAX_INDEXES; default: return null; } @@ -30485,6 +43146,8 @@ } // 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 { @@ -30493,50 +43156,54 @@ 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.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); } - public alter_partition_args() { + public get_index_names_args() { + this.max_indexes = (short)-1; + } - public alter_partition_args( + public get_index_names_args( String db_name, String tbl_name, - Partition new_part) + short max_indexes) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.new_part = new_part; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); } /** * Performs a deep copy on other. */ - public alter_partition_args(alter_partition_args 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; } - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); - } + this.max_indexes = other.max_indexes; } - public alter_partition_args deepCopy() { - return new alter_partition_args(this); + public get_index_names_args deepCopy() { + return new get_index_names_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; - this.new_part = null; + this.max_indexes = (short)-1; + } public String getDb_name() { @@ -30585,27 +43252,26 @@ } } - public Partition getNew_part() { - return this.new_part; + public short getMax_indexes() { + return this.max_indexes; } - public void setNew_part(Partition new_part) { - this.new_part = new_part; + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); } - public void unsetNew_part() { - this.new_part = null; + public void unsetMax_indexes() { + __isset_bit_vector.clear(__MAX_INDEXES_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 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 setNew_partIsSet(boolean value) { - if (!value) { - this.new_part = null; - } + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { @@ -30626,11 +43292,11 @@ } break; - case NEW_PART: + case MAX_INDEXES: if (value == null) { - unsetNew_part(); + unsetMax_indexes(); } else { - setNew_part((Partition)value); + setMax_indexes((Short)value); } break; @@ -30645,8 +43311,8 @@ case TBL_NAME: return getTbl_name(); - case NEW_PART: - return getNew_part(); + case MAX_INDEXES: + return new Short(getMax_indexes()); } throw new IllegalStateException(); @@ -30663,8 +43329,8 @@ return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case NEW_PART: - return isSetNew_part(); + case MAX_INDEXES: + return isSetMax_indexes(); } throw new IllegalStateException(); } @@ -30673,12 +43339,12 @@ 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 get_index_names_args) + return this.equals((get_index_names_args)that); return false; } - public boolean equals(alter_partition_args that) { + public boolean equals(get_index_names_args that) { if (that == null) return false; @@ -30700,12 +43366,12 @@ 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_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.new_part.equals(that.new_part)) + if (this.max_indexes != that.max_indexes) return false; } @@ -30717,13 +43383,13 @@ return 0; } - public int compareTo(alter_partition_args other) { + public int compareTo(get_index_names_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_partition_args typedOther = (alter_partition_args)other; + get_index_names_args typedOther = (get_index_names_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -30745,12 +43411,12 @@ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_part()) { - lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (isSetMax_indexes()) { + lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); if (lastComparison != 0) { return lastComparison; } @@ -30786,10 +43452,10 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 3: // NEW_PART - if (field.type == TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.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); } @@ -30817,18 +43483,16 @@ oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.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("alter_partition_args("); + StringBuilder sb = new StringBuilder("get_index_names_args("); boolean first = true; sb.append("db_name:"); @@ -30847,12 +43511,8 @@ } first = false; if (!first) sb.append(", "); - sb.append("new_part:"); - if (this.new_part == null) { - sb.append("null"); - } else { - sb.append(this.new_part); - } + sb.append("max_indexes:"); + sb.append(this.max_indexes); first = false; sb.append(")"); return sb.toString(); @@ -30864,19 +43524,19 @@ } - 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 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 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 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 InvalidOperationException o1; + 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 { - O1((short)1, "o1"), - O2((short)2, "o2"); + SUCCESS((short)0, "success"), + O2((short)1, "o2"); private static final Map byName = new HashMap(); @@ -30891,9 +43551,9 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // O1 - return O1; - case 2: // O2 + case 0: // SUCCESS + return SUCCESS; + case 1: // O2 return O2; default: return null; @@ -30939,68 +43599,88 @@ 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.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(alter_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); } - public alter_partition_result() { + public get_index_names_result() { } - public alter_partition_result( - InvalidOperationException o1, + public get_index_names_result( + List success, MetaException o2) { this(); - this.o1 = o1; + this.success = success; this.o2 = o2; } /** * Performs a deep copy on other. */ - public alter_partition_result(alter_partition_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); + 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 alter_partition_result deepCopy() { - return new alter_partition_result(this); + public get_index_names_result deepCopy() { + return new get_index_names_result(this); } @Override public void clear() { - this.o1 = null; + this.success = null; this.o2 = null; } - public InvalidOperationException getO1() { - return this.o1; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setO1(InvalidOperationException o1) { - this.o1 = o1; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetO1() { - this.o1 = null; + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.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 getSuccess() { + return this.success; } - public void setO1IsSet(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.o1 = null; + this.success = null; } } @@ -31029,11 +43709,11 @@ public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: + case SUCCESS: if (value == null) { - unsetO1(); + unsetSuccess(); } else { - setO1((InvalidOperationException)value); + setSuccess((List)value); } break; @@ -31050,8 +43730,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case O1: - return getO1(); + case SUCCESS: + return getSuccess(); case O2: return getO2(); @@ -31067,8 +43747,8 @@ } switch (field) { - case O1: - return isSetO1(); + case SUCCESS: + return isSetSuccess(); case O2: return isSetO2(); } @@ -31079,21 +43759,21 @@ 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 get_index_names_result) + return this.equals((get_index_names_result)that); return false; } - public boolean equals(alter_partition_result that) { + public boolean equals(get_index_names_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)) + 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.o1.equals(that.o1)) + if (!this.success.equals(that.success)) return false; } @@ -31114,20 +43794,20 @@ return 0; } - public int compareTo(alter_partition_result other) { + public int compareTo(get_index_names_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - alter_partition_result typedOther = (alter_partition_result)other; + get_index_names_result typedOther = (get_index_names_result)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -31159,15 +43839,24 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list208 = iprot.readListBegin(); + this.success = new ArrayList(_list208.size); + for (int _i209 = 0; _i209 < _list208.size; ++_i209) + { + String _elem210; + _elem210 = iprot.readString(); + this.success.add(_elem210); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // O2 + case 1: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -31187,9 +43876,16 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter211 : this.success) + { + oprot.writeString(_iter211); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); @@ -31202,14 +43898,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_partition_result("); + StringBuilder sb = new StringBuilder("get_index_names_result("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.success); } first = false; if (!first) sb.append(", "); @@ -31230,19 +43926,16 @@ } - 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 create_role_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_role_args"); - 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 ROLE_FIELD_DESC = new TField("role", TType.STRUCT, (short)1); - private String name; - private String defaultValue; + private Role role; /** 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"); + ROLE((short)1, "role"); private static final Map byName = new HashMap(); @@ -31257,10 +43950,8 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // DEFAULT_VALUE - return DEFAULT_VALUE; + case 1: // ROLE + return ROLE; default: return null; } @@ -31305,109 +43996,70 @@ 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.ROLE, new FieldMetaData("role", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Role.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(create_role_args.class, metaDataMap); } - public get_config_value_args() { + public create_role_args() { } - public get_config_value_args( - String name, - String defaultValue) + public create_role_args( + Role role) { this(); - this.name = name; - this.defaultValue = defaultValue; + this.role = role; } /** * Performs a deep copy on other. */ - public get_config_value_args(get_config_value_args other) { - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetDefaultValue()) { - this.defaultValue = other.defaultValue; + public create_role_args(create_role_args other) { + if (other.isSetRole()) { + this.role = new Role(other.role); } } - public get_config_value_args deepCopy() { - return new get_config_value_args(this); + public create_role_args deepCopy() { + return new create_role_args(this); } @Override public void clear() { - this.name = null; - this.defaultValue = 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; - } + this.role = null; } - public String getDefaultValue() { - return this.defaultValue; + public Role getRole() { + return this.role; } - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; + public void setRole(Role role) { + this.role = role; } - public void unsetDefaultValue() { - this.defaultValue = null; + public void unsetRole() { + this.role = 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 role is set (has been asigned a value) and false otherwise */ + public boolean isSetRole() { + return this.role != null; } - public void setDefaultValueIsSet(boolean value) { + public void setRoleIsSet(boolean value) { if (!value) { - this.defaultValue = null; + this.role = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DEFAULT_VALUE: + case ROLE: if (value == null) { - unsetDefaultValue(); + unsetRole(); } else { - setDefaultValue((String)value); + setRole((Role)value); } break; @@ -31416,11 +44068,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NAME: - return getName(); - - case DEFAULT_VALUE: - return getDefaultValue(); + case ROLE: + return getRole(); } throw new IllegalStateException(); @@ -31433,10 +44082,8 @@ } switch (field) { - case NAME: - return isSetName(); - case DEFAULT_VALUE: - return isSetDefaultValue(); + case ROLE: + return isSetRole(); } throw new IllegalStateException(); } @@ -31445,30 +44092,21 @@ 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 create_role_args) + return this.equals((create_role_args)that); return false; } - public boolean equals(get_config_value_args that) { + public boolean equals(create_role_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_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_role = true && this.isSetRole(); + boolean that_present_role = true && that.isSetRole(); + if (this_present_role || that_present_role) { + if (!(this_present_role && that_present_role)) return false; - if (!this.defaultValue.equals(that.defaultValue)) + if (!this.role.equals(that.role)) return false; } @@ -31480,30 +44118,20 @@ return 0; } - public int compareTo(get_config_value_args other) { + public int compareTo(create_role_args 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; + create_role_args typedOther = (create_role_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(isSetDefaultValue()).compareTo(typedOther.isSetDefaultValue()); + lastComparison = Boolean.valueOf(isSetRole()).compareTo(typedOther.isSetRole()); if (lastComparison != 0) { return lastComparison; } - if (isSetDefaultValue()) { - lastComparison = TBaseHelper.compareTo(this.defaultValue, typedOther.defaultValue); + if (isSetRole()) { + lastComparison = TBaseHelper.compareTo(this.role, typedOther.role); if (lastComparison != 0) { return lastComparison; } @@ -31525,16 +44153,10 @@ 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: // DEFAULT_VALUE - if (field.type == TType.STRING) { - this.defaultValue = iprot.readString(); + case 1: // ROLE + if (field.type == TType.STRUCT) { + this.role = new Role(); + this.role.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -31552,14 +44174,9 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); - oprot.writeFieldEnd(); - } - if (this.defaultValue != null) { - oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); - oprot.writeString(this.defaultValue); + if (this.role != null) { + oprot.writeFieldBegin(ROLE_FIELD_DESC); + this.role.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -31568,22 +44185,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_args("); + StringBuilder sb = new StringBuilder("create_role_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("defaultValue:"); - if (this.defaultValue == null) { + sb.append("role:"); + if (this.role == null) { sb.append("null"); } else { - sb.append(this.defaultValue); + sb.append(this.role); } first = false; sb.append(")"); @@ -31596,14 +44205,14 @@ } - 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 create_role_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_role_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); + 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 success; - private ConfigValSecurityException o1; + 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 { @@ -31667,80 +44276,83 @@ } // 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.STRING))); + new FieldValueMetaData(TType.BOOL))); tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(create_role_result.class, metaDataMap); } - public get_config_value_result() { + public create_role_result() { } - public get_config_value_result( - String success, - ConfigValSecurityException o1) + public create_role_result( + boolean success, + MetaException o1) { this(); this.success = success; + setSuccessIsSet(true); this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_config_value_result(get_config_value_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } + public create_role_result(create_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 ConfigValSecurityException(other.o1); + this.o1 = new MetaException(other.o1); } } - public get_config_value_result deepCopy() { - return new get_config_value_result(this); + public create_role_result deepCopy() { + return new create_role_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.o1 = null; } - public String getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(String 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 ConfigValSecurityException getO1() { + public MetaException getO1() { return this.o1; } - public void setO1(ConfigValSecurityException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -31765,7 +44377,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((String)value); + setSuccess((Boolean)value); } break; @@ -31773,7 +44385,7 @@ if (value == null) { unsetO1(); } else { - setO1((ConfigValSecurityException)value); + setO1((MetaException)value); } break; @@ -31783,7 +44395,7 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); @@ -31811,21 +44423,21 @@ 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 create_role_result) + return this.equals((create_role_result)that); return false; } - public boolean equals(get_config_value_result that) { + public boolean equals(create_role_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; } @@ -31846,13 +44458,13 @@ return 0; } - public int compareTo(get_config_value_result other) { + public int compareTo(create_role_result 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; + create_role_result typedOther = (create_role_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -31892,15 +44504,16 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRING) { - this.success = iprot.readString(); + 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 ConfigValSecurityException(); + this.o1 = new MetaException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -31920,7 +44533,7 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); + oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -31933,15 +44546,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_result("); + StringBuilder sb = new StringBuilder("create_role_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -31961,16 +44570,16 @@ } - 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 drop_role_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_role_args"); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); + private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); - private String part_name; + private String role_name; /** 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"); + ROLE_NAME((short)1, "role_name"); private static final Map byName = new HashMap(); @@ -31985,8 +44594,8 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PART_NAME - return PART_NAME; + case 1: // ROLE_NAME + return ROLE_NAME; default: return null; } @@ -32031,70 +44640,70 @@ 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, + tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_role_args.class, metaDataMap); } - public partition_name_to_vals_args() { + public drop_role_args() { } - public partition_name_to_vals_args( - String part_name) + public drop_role_args( + String role_name) { this(); - this.part_name = part_name; + this.role_name = role_name; } /** * 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 drop_role_args(drop_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } } - public partition_name_to_vals_args deepCopy() { - return new partition_name_to_vals_args(this); + public drop_role_args deepCopy() { + return new drop_role_args(this); } @Override public void clear() { - this.part_name = null; + this.role_name = null; } - public String getPart_name() { - return this.part_name; + public String getRole_name() { + return this.role_name; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void unsetPart_name() { - this.part_name = null; + public void unsetRole_name() { + this.role_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; + /** 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 setPart_nameIsSet(boolean value) { + public void setRole_nameIsSet(boolean value) { if (!value) { - this.part_name = null; + this.role_name = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case PART_NAME: + case ROLE_NAME: if (value == null) { - unsetPart_name(); + unsetRole_name(); } else { - setPart_name((String)value); + setRole_name((String)value); } break; @@ -32103,8 +44712,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case PART_NAME: - return getPart_name(); + case ROLE_NAME: + return getRole_name(); } throw new IllegalStateException(); @@ -32117,8 +44726,8 @@ } switch (field) { - case PART_NAME: - return isSetPart_name(); + case ROLE_NAME: + return isSetRole_name(); } throw new IllegalStateException(); } @@ -32127,21 +44736,21 @@ 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 drop_role_args) + return this.equals((drop_role_args)that); return false; } - public boolean equals(partition_name_to_vals_args that) { + public boolean equals(drop_role_args 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_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.part_name.equals(that.part_name)) + if (!this.role_name.equals(that.role_name)) return false; } @@ -32153,20 +44762,20 @@ return 0; } - public int compareTo(partition_name_to_vals_args other) { + public int compareTo(drop_role_args 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; + drop_role_args typedOther = (drop_role_args)other; - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetRole_name()) { + lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } @@ -32188,9 +44797,9 @@ break; } switch (field.id) { - case 1: // PART_NAME + case 1: // ROLE_NAME if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -32208,9 +44817,9 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -32219,14 +44828,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); + StringBuilder sb = new StringBuilder("drop_role_args("); boolean first = true; - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.role_name); } first = false; sb.append(")"); @@ -32239,13 +44848,13 @@ } - 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 drop_role_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_role_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + 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 boolean success; private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -32310,93 +44919,76 @@ } // 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)))); + new FieldValueMetaData(TType.BOOL))); tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_role_result.class, metaDataMap); } - public partition_name_to_vals_result() { + public drop_role_result() { } - public partition_name_to_vals_result( - List success, + public drop_role_result( + boolean success, MetaException o1) { this(); this.success = success; + setSuccessIsSet(true); this.o1 = o1; } /** * 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 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 partition_name_to_vals_result deepCopy() { - return new partition_name_to_vals_result(this); + public drop_role_result deepCopy() { + return new drop_role_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.o1 = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + setSuccessIsSet(true); } public void unsetSuccess() { - this.success = null; + __isset_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 getO1() { @@ -32428,7 +45020,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -32446,7 +45038,7 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); @@ -32474,21 +45066,21 @@ 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 drop_role_result) + return this.equals((drop_role_result)that); return false; } - public boolean equals(partition_name_to_vals_result that) { + public boolean equals(drop_role_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; } @@ -32509,13 +45101,13 @@ return 0; } - public int compareTo(partition_name_to_vals_result other) { + public int compareTo(drop_role_result 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; + drop_role_result typedOther = (drop_role_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -32555,18 +45147,9 @@ } 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(); - } + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -32588,19 +45171,12 @@ 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(); - } + 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); @@ -32613,15 +45189,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_result("); + StringBuilder sb = new StringBuilder("drop_role_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -32641,16 +45213,39 @@ } - 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 grant_role_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("grant_role_args"); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); + private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)2); + private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)3); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)4); + private static final TField GRANTOR_TYPE_FIELD_DESC = new TField("grantorType", TType.I32, (short)5); + private static final TField GRANT_OPTION_FIELD_DESC = new TField("grant_option", TType.BOOL, (short)6); - private String part_name; + private String role_name; + private String principal_name; + private PrincipalType principal_type; + private String grantor; + private PrincipalType grantorType; + private boolean grant_option; /** 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"); + ROLE_NAME((short)1, "role_name"), + PRINCIPAL_NAME((short)2, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)3, "principal_type"), + GRANTOR((short)4, "grantor"), + /** + * + * @see PrincipalType + */ + GRANTOR_TYPE((short)5, "grantorType"), + GRANT_OPTION((short)6, "grant_option"); private static final Map byName = new HashMap(); @@ -32665,8 +45260,18 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // PART_NAME - return PART_NAME; + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 3: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + case 4: // GRANTOR + return GRANTOR; + case 5: // GRANTOR_TYPE + return GRANTOR_TYPE; + case 6: // GRANT_OPTION + return GRANT_OPTION; default: return null; } @@ -32707,74 +45312,288 @@ } // isset id assignments + private static final int __GRANT_OPTION_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.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.GRANTOR_TYPE, new FieldMetaData("grantorType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.GRANT_OPTION, new FieldMetaData("grant_option", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(grant_role_args.class, metaDataMap); } - public partition_name_to_spec_args() { + public grant_role_args() { } - public partition_name_to_spec_args( - String part_name) + public grant_role_args( + String role_name, + String principal_name, + PrincipalType principal_type, + String grantor, + PrincipalType grantorType, + boolean grant_option) { this(); - this.part_name = part_name; + this.role_name = role_name; + this.principal_name = principal_name; + this.principal_type = principal_type; + this.grantor = grantor; + this.grantorType = grantorType; + this.grant_option = grant_option; + setGrant_optionIsSet(true); } /** * 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 grant_role_args(grant_role_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.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; + } + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetGrantorType()) { + this.grantorType = other.grantorType; + } + this.grant_option = other.grant_option; } - public partition_name_to_spec_args deepCopy() { - return new partition_name_to_spec_args(this); + public grant_role_args deepCopy() { + return new grant_role_args(this); } @Override public void clear() { - this.part_name = null; + this.role_name = null; + this.principal_name = null; + this.principal_type = null; + this.grantor = null; + this.grantorType = null; + setGrant_optionIsSet(false); + this.grant_option = false; } - public String getPart_name() { - return this.part_name; + public String getRole_name() { + return this.role_name; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setRole_name(String role_name) { + this.role_name = role_name; + } + + public void unsetRole_name() { + this.role_name = null; } - public void unsetPart_name() { - this.part_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; + } + } + + 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; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; + } + + public void unsetPrincipal_type() { + this.principal_type = null; + } + + /** Returns true if field principal_type is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; + } + + public void setPrincipal_typeIsSet(boolean value) { + if (!value) { + this.principal_type = null; + } + } + + 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; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getGrantorType() { + return this.grantorType; + } + + /** + * + * @see PrincipalType + */ + public void setGrantorType(PrincipalType grantorType) { + this.grantorType = grantorType; + } + + public void unsetGrantorType() { + this.grantorType = null; + } + + /** Returns true if field grantorType is set (has been asigned a value) and false otherwise */ + public boolean isSetGrantorType() { + return this.grantorType != null; + } + + public void setGrantorTypeIsSet(boolean value) { + if (!value) { + this.grantorType = null; + } + } + + public boolean isGrant_option() { + return this.grant_option; + } + + public void setGrant_option(boolean grant_option) { + this.grant_option = grant_option; + setGrant_optionIsSet(true); + } + + public void unsetGrant_option() { + __isset_bit_vector.clear(__GRANT_OPTION_ISSET_ID); + } + + /** Returns true if field grant_option is set (has been asigned a value) and false otherwise */ + public boolean isSetGrant_option() { + return __isset_bit_vector.get(__GRANT_OPTION_ISSET_ID); + } + + public void setGrant_optionIsSet(boolean value) { + __isset_bit_vector.set(__GRANT_OPTION_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROLE_NAME: + if (value == null) { + unsetRole_name(); + } else { + setRole_name((String)value); + } + break; + + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipal_name(); + } else { + setPrincipal_name((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipal_type(); + } else { + setPrincipal_type((PrincipalType)value); + } + break; - /** 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; - } + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; - public void setPart_nameIsSet(boolean value) { - if (!value) { - this.part_name = null; - } - } + case GRANTOR_TYPE: + if (value == null) { + unsetGrantorType(); + } else { + setGrantorType((PrincipalType)value); + } + break; - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PART_NAME: + case GRANT_OPTION: if (value == null) { - unsetPart_name(); + unsetGrant_option(); } else { - setPart_name((String)value); + setGrant_option((Boolean)value); } break; @@ -32783,8 +45602,23 @@ public Object getFieldValue(_Fields field) { switch (field) { - case PART_NAME: - return getPart_name(); + case ROLE_NAME: + return getRole_name(); + + case PRINCIPAL_NAME: + return getPrincipal_name(); + + case PRINCIPAL_TYPE: + return getPrincipal_type(); + + case GRANTOR: + return getGrantor(); + + case GRANTOR_TYPE: + return getGrantorType(); + + case GRANT_OPTION: + return new Boolean(isGrant_option()); } throw new IllegalStateException(); @@ -32797,8 +45631,18 @@ } switch (field) { - case PART_NAME: - return isSetPart_name(); + case ROLE_NAME: + return isSetRole_name(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); + case GRANTOR: + return isSetGrantor(); + case GRANTOR_TYPE: + return isSetGrantorType(); + case GRANT_OPTION: + return isSetGrant_option(); } throw new IllegalStateException(); } @@ -32807,21 +45651,66 @@ 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 grant_role_args) + return this.equals((grant_role_args)that); return false; } - public boolean equals(partition_name_to_spec_args that) { + public boolean equals(grant_role_args 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_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.part_name.equals(that.part_name)) + if (!this.role_name.equals(that.role_name)) + return false; + } + + 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.principal_name.equals(that.principal_name)) + return false; + } + + boolean this_present_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) + return false; + if (!this.principal_type.equals(that.principal_type)) + 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_grantorType = true && this.isSetGrantorType(); + boolean that_present_grantorType = true && that.isSetGrantorType(); + if (this_present_grantorType || that_present_grantorType) { + if (!(this_present_grantorType && that_present_grantorType)) + return false; + if (!this.grantorType.equals(that.grantorType)) + return false; + } + + boolean this_present_grant_option = true; + boolean that_present_grant_option = true; + if (this_present_grant_option || that_present_grant_option) { + if (!(this_present_grant_option && that_present_grant_option)) + return false; + if (this.grant_option != that.grant_option) return false; } @@ -32833,20 +45722,70 @@ return 0; } - public int compareTo(partition_name_to_spec_args other) { + public int compareTo(grant_role_args 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; + grant_role_args typedOther = (grant_role_args)other; - lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetPart_name()) { - lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (isSetRole_name()) { + lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_type()) { + lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); + 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(isSetGrantorType()).compareTo(typedOther.isSetGrantorType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantorType()) { + lastComparison = TBaseHelper.compareTo(this.grantorType, typedOther.grantorType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGrant_option()).compareTo(typedOther.isSetGrant_option()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrant_option()) { + lastComparison = TBaseHelper.compareTo(this.grant_option, typedOther.grant_option); if (lastComparison != 0) { return lastComparison; } @@ -32868,9 +45807,45 @@ break; } switch (field.id) { - case 1: // PART_NAME + case 1: // ROLE_NAME if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + this.role_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (field.type == TType.I32) { + this.principal_type = PrincipalType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // GRANTOR + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // GRANTOR_TYPE + if (field.type == TType.I32) { + this.grantorType = PrincipalType.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // GRANT_OPTION + if (field.type == TType.BOOL) { + this.grant_option = iprot.readBool(); + setGrant_optionIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -32888,27 +45863,86 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); + oprot.writeFieldEnd(); + } + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); + oprot.writeFieldEnd(); + } + if (this.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(this.principal_type.getValue()); + oprot.writeFieldEnd(); + } + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + if (this.grantorType != null) { + oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC); + oprot.writeI32(this.grantorType.getValue()); oprot.writeFieldEnd(); } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_args("); - boolean first = true; - - sb.append("part_name:"); - if (this.part_name == null) { + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeBool(this.grant_option); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("grant_role_args("); + boolean first = true; + + sb.append("role_name:"); + if (this.role_name == null) { + sb.append("null"); + } else { + sb.append(this.role_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_name:"); + if (this.principal_name == null) { + sb.append("null"); + } else { + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_type:"); + if (this.principal_type == null) { + sb.append("null"); + } else { + sb.append(this.principal_type); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("grantorType:"); + if (this.grantorType == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.grantorType); } first = false; + if (!first) sb.append(", "); + sb.append("grant_option:"); + sb.append(this.grant_option); + first = false; sb.append(")"); return sb.toString(); } @@ -32919,13 +45953,13 @@ } - 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 grant_role_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("grant_role_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); + 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 Map success; + private boolean success; private MetaException o1; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -32990,98 +46024,76 @@ } // 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 MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); + new FieldValueMetaData(TType.BOOL))); 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); + FieldMetaData.addStructMetaDataMap(grant_role_result.class, metaDataMap); } - public partition_name_to_spec_result() { + public grant_role_result() { } - public partition_name_to_spec_result( - Map success, + public grant_role_result( + boolean success, MetaException o1) { this(); this.success = success; + setSuccessIsSet(true); this.o1 = o1; } /** * 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()) { - - 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; - } + public grant_role_result(grant_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 partition_name_to_spec_result deepCopy() { - return new partition_name_to_spec_result(this); + public grant_role_result deepCopy() { + return new grant_role_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.o1 = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public void putToSuccess(String key, String val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); - } - - public Map getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(Map 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 getO1() { @@ -33113,7 +46125,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Map)value); + setSuccess((Boolean)value); } break; @@ -33131,7 +46143,7 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); @@ -33159,21 +46171,21 @@ 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 grant_role_result) + return this.equals((grant_role_result)that); return false; } - public boolean equals(partition_name_to_spec_result that) { + public boolean equals(grant_role_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; } @@ -33194,13 +46206,13 @@ return 0; } - public int compareTo(partition_name_to_spec_result other) { + public int compareTo(grant_role_result 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; + grant_role_result typedOther = (grant_role_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -33240,20 +46252,9 @@ } 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.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } @@ -33280,15 +46281,7 @@ 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.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -33301,15 +46294,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); + StringBuilder sb = new StringBuilder("grant_role_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -33329,19 +46318,26 @@ } - 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 revoke_role_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_role_args"); - 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 ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)2); + private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)3); - private Index new_index; - private Table index_table; + private String role_name; + private String principal_name; + private PrincipalType principal_type; /** 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"); + ROLE_NAME((short)1, "role_name"), + PRINCIPAL_NAME((short)2, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)3, "principal_type"); private static final Map byName = new HashMap(); @@ -33356,10 +46352,12 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // NEW_INDEX - return NEW_INDEX; - case 2: // INDEX_TABLE - return INDEX_TABLE; + case 1: // ROLE_NAME + return ROLE_NAME; + case 2: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 3: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; default: return null; } @@ -33404,109 +46402,156 @@ 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.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, PrincipalType.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_role_args.class, metaDataMap); } - public add_index_args() { + public revoke_role_args() { } - public add_index_args( - Index new_index, - Table index_table) + public revoke_role_args( + String role_name, + String principal_name, + PrincipalType principal_type) { this(); - this.new_index = new_index; - this.index_table = index_table; + this.role_name = role_name; + this.principal_name = principal_name; + this.principal_type = principal_type; } /** * 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 revoke_role_args(revoke_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetIndex_table()) { - this.index_table = new Table(other.index_table); + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; } } - public add_index_args deepCopy() { - return new add_index_args(this); + public revoke_role_args deepCopy() { + return new revoke_role_args(this); } @Override public void clear() { - this.new_index = null; - this.index_table = null; + this.role_name = null; + this.principal_name = null; + this.principal_type = null; } - public Index getNew_index() { - return this.new_index; + public String getRole_name() { + return this.role_name; } - public void setNew_index(Index new_index) { - this.new_index = new_index; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void unsetNew_index() { - this.new_index = null; + public void unsetRole_name() { + this.role_name = 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; + /** 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 setNew_indexIsSet(boolean value) { + public void setRole_nameIsSet(boolean value) { if (!value) { - this.new_index = null; + this.role_name = null; } } - public Table getIndex_table() { - return this.index_table; + public String getPrincipal_name() { + return this.principal_name; } - public void setIndex_table(Table index_table) { - this.index_table = index_table; + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; } - public void unsetIndex_table() { - this.index_table = null; + 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; + } + } + + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; + } + + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; + } + + public void unsetPrincipal_type() { + this.principal_type = 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 principal_type is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; } - public void setIndex_tableIsSet(boolean value) { + public void setPrincipal_typeIsSet(boolean value) { if (!value) { - this.index_table = null; + this.principal_type = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case NEW_INDEX: + case ROLE_NAME: if (value == null) { - unsetNew_index(); + unsetRole_name(); } else { - setNew_index((Index)value); + setRole_name((String)value); } break; - case INDEX_TABLE: + case PRINCIPAL_NAME: if (value == null) { - unsetIndex_table(); + unsetPrincipal_name(); } else { - setIndex_table((Table)value); + setPrincipal_name((String)value); + } + break; + + case PRINCIPAL_TYPE: + if (value == null) { + unsetPrincipal_type(); + } else { + setPrincipal_type((PrincipalType)value); } break; @@ -33515,11 +46560,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case NEW_INDEX: - return getNew_index(); + case ROLE_NAME: + return getRole_name(); - case INDEX_TABLE: - return getIndex_table(); + case PRINCIPAL_NAME: + return getPrincipal_name(); + + case PRINCIPAL_TYPE: + return getPrincipal_type(); } throw new IllegalStateException(); @@ -33532,10 +46580,12 @@ } switch (field) { - case NEW_INDEX: - return isSetNew_index(); - case INDEX_TABLE: - return isSetIndex_table(); + case ROLE_NAME: + return isSetRole_name(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); } throw new IllegalStateException(); } @@ -33544,30 +46594,39 @@ 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 revoke_role_args) + return this.equals((revoke_role_args)that); return false; } - public boolean equals(add_index_args that) { + public boolean equals(revoke_role_args 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_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.new_index.equals(that.new_index)) + if (!this.role_name.equals(that.role_name)) 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_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.index_table.equals(that.index_table)) + if (!this.principal_name.equals(that.principal_name)) + return false; + } + + boolean this_present_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) + return false; + if (!this.principal_type.equals(that.principal_type)) return false; } @@ -33579,30 +46638,40 @@ return 0; } - public int compareTo(add_index_args other) { + public int compareTo(revoke_role_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - add_index_args typedOther = (add_index_args)other; + revoke_role_args typedOther = (revoke_role_args)other; - lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(typedOther.isSetNew_index()); + lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_index()) { - lastComparison = TBaseHelper.compareTo(this.new_index, typedOther.new_index); + if (isSetRole_name()) { + lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(typedOther.isSetIndex_table()); + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetIndex_table()) { - lastComparison = TBaseHelper.compareTo(this.index_table, typedOther.index_table); + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrincipal_type()) { + lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } @@ -33624,18 +46693,23 @@ break; } switch (field.id) { - case 1: // NEW_INDEX - if (field.type == TType.STRUCT) { - this.new_index = new Index(); - this.new_index.read(iprot); + case 1: // ROLE_NAME + if (field.type == TType.STRING) { + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // INDEX_TABLE - if (field.type == TType.STRUCT) { - this.index_table = new Table(); - this.index_table.read(iprot); + case 2: // PRINCIPAL_NAME + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // PRINCIPAL_TYPE + if (field.type == TType.I32) { + this.principal_type = PrincipalType.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } @@ -33653,14 +46727,19 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.new_index != null) { - oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); - this.new_index.write(oprot); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); oprot.writeFieldEnd(); } - if (this.index_table != null) { - oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); - this.index_table.write(oprot); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); + oprot.writeFieldEnd(); + } + if (this.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(this.principal_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -33669,22 +46748,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_index_args("); + StringBuilder sb = new StringBuilder("revoke_role_args("); boolean first = true; - sb.append("new_index:"); - if (this.new_index == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.new_index); + sb.append(this.role_name); } first = false; if (!first) sb.append(", "); - sb.append("index_table:"); - if (this.index_table == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.index_table); + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("principal_type:"); + if (this.principal_type == null) { + sb.append("null"); + } else { + sb.append(this.principal_type); } first = false; sb.append(")"); @@ -33697,25 +46784,19 @@ } - 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 revoke_role_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_role_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 Index success; - private InvalidObjectException o1; - private AlreadyExistsException o2; - private MetaException o3; + 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"), - O1((short)1, "o1"), - O2((short)2, "o2"), - O3((short)3, "o3"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -33734,10 +46815,6 @@ return SUCCESS; case 1: // O1 return O1; - case 2: // O2 - return O2; - case 3: // O3 - return O3; default: return null; } @@ -33778,157 +46855,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 StructMetaData(TType.STRUCT, Index.class))); + 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(add_index_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_role_result.class, metaDataMap); } - public add_index_result() { + public revoke_role_result() { } - public add_index_result( - Index success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public revoke_role_result( + boolean success, + MetaException o1) { this(); this.success = success; + setSuccessIsSet(true); this.o1 = o1; - this.o2 = o2; - this.o3 = o3; } /** * Performs a deep copy on other. */ - public add_index_result(add_index_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); - } + public revoke_role_result(revoke_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 InvalidObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + this.o1 = new MetaException(other.o1); } } - public add_index_result deepCopy() { - return new add_index_result(this); + public revoke_role_result deepCopy() { + return new revoke_role_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.o1 = null; - this.o2 = null; - this.o3 = null; } - public Index getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(Index 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; - } - - 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 boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } - public void setO2IsSet(boolean value) { - if (!value) { - this.o2 = null; - } + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } - public MetaException getO3() { - return this.o3; + public MetaException getO1() { + return this.o1; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetO3() { - this.o3 = null; + public void unsetO1() { + this.o1 = 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 o1 is set (has been asigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; } - public void setO3IsSet(boolean value) { + public void setO1IsSet(boolean value) { if (!value) { - this.o3 = null; + this.o1 = null; } } @@ -33938,7 +46956,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Index)value); + setSuccess((Boolean)value); } break; @@ -33946,23 +46964,7 @@ 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); + setO1((MetaException)value); } break; @@ -33972,17 +46974,11 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); - case O2: - return getO2(); - - case O3: - return getO3(); - } throw new IllegalStateException(); } @@ -33998,10 +46994,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); } throw new IllegalStateException(); } @@ -34010,21 +47002,21 @@ 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 revoke_role_result) + return this.equals((revoke_role_result)that); return false; } - public boolean equals(add_index_result that) { + public boolean equals(revoke_role_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; } @@ -34037,24 +47029,6 @@ 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; } @@ -34063,13 +47037,13 @@ return 0; } - public int compareTo(add_index_result other) { + public int compareTo(revoke_role_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - add_index_result typedOther = (add_index_result)other; + revoke_role_result typedOther = (revoke_role_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -34091,26 +47065,6 @@ 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; } @@ -34129,37 +47083,21 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); + 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 InvalidObjectException(); + 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 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); } @@ -34174,20 +47112,12 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + 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(); @@ -34195,15 +47125,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_index_result("); + StringBuilder sb = new StringBuilder("revoke_role_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -34213,22 +47139,6 @@ 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(); } @@ -34239,25 +47149,23 @@ } - 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_roles_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_roles_args"); - 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 PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)2); - private String dbname; - private String base_tbl_name; - private String idx_name; - private Index new_idx; + private String principal_name; + private PrincipalType principal_type; /** 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"); + PRINCIPAL_NAME((short)1, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)2, "principal_type"); private static final Map byName = new HashMap(); @@ -34272,14 +47180,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 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; default: return null; } @@ -34324,187 +47228,117 @@ 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, + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_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.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, PrincipalType.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); - } - - public alter_index_args() { - } - - public alter_index_args( - String dbname, - String base_tbl_name, - String idx_name, - Index new_idx) - { - this(); - 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 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; - } - if (other.isSetNew_idx()) { - this.new_idx = new Index(other.new_idx); - } - } - - public alter_index_args deepCopy() { - return new alter_index_args(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; - } + FieldMetaData.addStructMetaDataMap(list_roles_args.class, metaDataMap); } - public String getBase_tbl_name() { - return this.base_tbl_name; + public list_roles_args() { } - public void setBase_tbl_name(String base_tbl_name) { - this.base_tbl_name = base_tbl_name; + public list_roles_args( + String principal_name, + PrincipalType principal_type) + { + this(); + this.principal_name = principal_name; + this.principal_type = principal_type; } - public void unsetBase_tbl_name() { - this.base_tbl_name = null; + /** + * Performs a deep copy on other. + */ + public list_roles_args(list_roles_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; + } } - /** 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 list_roles_args deepCopy() { + return new list_roles_args(this); } - public void setBase_tbl_nameIsSet(boolean value) { - if (!value) { - this.base_tbl_name = null; - } + @Override + public void clear() { + this.principal_name = null; + this.principal_type = null; } - public String getIdx_name() { - return this.idx_name; + public String getPrincipal_name() { + return this.principal_name; } - public void setIdx_name(String idx_name) { - this.idx_name = idx_name; + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; } - public void unsetIdx_name() { - this.idx_name = null; + public void unsetPrincipal_name() { + this.principal_name = 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 principal_name is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_name() { + return this.principal_name != null; } - public void setIdx_nameIsSet(boolean value) { + public void setPrincipal_nameIsSet(boolean value) { if (!value) { - this.idx_name = null; + this.principal_name = null; } } - public Index getNew_idx() { - return this.new_idx; + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; } - public void setNew_idx(Index new_idx) { - this.new_idx = new_idx; + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; } - public void unsetNew_idx() { - this.new_idx = null; + public void unsetPrincipal_type() { + this.principal_type = 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 principal_type is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; } - public void setNew_idxIsSet(boolean value) { + public void setPrincipal_typeIsSet(boolean value) { if (!value) { - this.new_idx = null; + this.principal_type = 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 PRINCIPAL_NAME: if (value == null) { - unsetIdx_name(); + unsetPrincipal_name(); } else { - setIdx_name((String)value); + setPrincipal_name((String)value); } break; - case NEW_IDX: + case PRINCIPAL_TYPE: if (value == null) { - unsetNew_idx(); + unsetPrincipal_type(); } else { - setNew_idx((Index)value); + setPrincipal_type((PrincipalType)value); } break; @@ -34513,17 +47347,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 PRINCIPAL_NAME: + return getPrincipal_name(); - case NEW_IDX: - return getNew_idx(); + case PRINCIPAL_TYPE: + return getPrincipal_type(); } throw new IllegalStateException(); @@ -34536,14 +47364,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 PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); } throw new IllegalStateException(); } @@ -34552,48 +47376,30 @@ 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_roles_args) + return this.equals((list_roles_args)that); return false; } - public boolean equals(alter_index_args that) { + public boolean equals(list_roles_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_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_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.idx_name.equals(that.idx_name)) + if (!this.principal_name.equals(that.principal_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)) + boolean this_present_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) return false; - if (!this.new_idx.equals(that.new_idx)) + if (!this.principal_type.equals(that.principal_type)) return false; } @@ -34605,50 +47411,30 @@ return 0; } - public int compareTo(alter_index_args other) { + public int compareTo(list_roles_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; + list_roles_args typedOther = (list_roles_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; - } - } - lastComparison = Boolean.valueOf(isSetIdx_name()).compareTo(typedOther.isSetIdx_name()); + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetIdx_name()) { - lastComparison = TBaseHelper.compareTo(this.idx_name, typedOther.idx_name); + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNew_idx()).compareTo(typedOther.isSetNew_idx()); + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } - if (isSetNew_idx()) { - lastComparison = TBaseHelper.compareTo(this.new_idx, typedOther.new_idx); + if (isSetPrincipal_type()) { + lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } @@ -34670,31 +47456,16 @@ 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 + case 1: // PRINCIPAL_NAME if (field.type == TType.STRING) { - this.idx_name = iprot.readString(); + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 4: // NEW_IDX - if (field.type == TType.STRUCT) { - this.new_idx = new Index(); - this.new_idx.read(iprot); + case 2: // PRINCIPAL_TYPE + if (field.type == TType.I32) { + this.principal_type = PrincipalType.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } @@ -34712,24 +47483,14 @@ 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.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); } - if (this.new_idx != null) { - oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); - this.new_idx.write(oprot); + if (this.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(this.principal_type.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -34738,38 +47499,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_index_args("); + StringBuilder sb = new StringBuilder("list_roles_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("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("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.idx_name); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("new_idx:"); - if (this.new_idx == null) { + sb.append("principal_type:"); + if (this.principal_type == null) { sb.append("null"); } else { - sb.append(this.new_idx); + sb.append(this.principal_type); } first = false; sb.append(")"); @@ -34782,19 +47527,19 @@ } - public static class alter_index_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_index_result"); + 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 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 InvalidOperationException o1; - private MetaException o2; + 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 { - O1((short)1, "o1"), - O2((short)2, "o2"); + SUCCESS((short)0, "success"), + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -34809,10 +47554,10 @@ */ 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; } @@ -34857,109 +47602,129 @@ 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, Role.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); + FieldMetaData.addStructMetaDataMap(list_roles_result.class, metaDataMap); } - public alter_index_result() { + public list_roles_result() { } - public alter_index_result( - InvalidOperationException o1, - MetaException o2) + public list_roles_result( + List success, + MetaException o1) { this(); + this.success = success; this.o1 = o1; - this.o2 = o2; } /** * Performs a deep copy on other. */ - public alter_index_result(alter_index_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); + 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.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public alter_index_result deepCopy() { - return new alter_index_result(this); + public list_roles_result deepCopy() { + return new list_roles_result(this); } @Override public void clear() { + this.success = null; this.o1 = null; - this.o2 = null; } - public InvalidOperationException getO1() { - return this.o1; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setO1(InvalidOperationException o1) { - this.o1 = o1; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetO1() { - this.o1 = null; + public void addToSuccess(Role elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.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 getSuccess() { + return this.success; } - public void setO1IsSet(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.o1 = null; + this.success = null; } } - 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; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case O1: + case SUCCESS: if (value == null) { - unsetO1(); + unsetSuccess(); } else { - setO1((InvalidOperationException)value); + setSuccess((List)value); } break; - case O2: + case O1: if (value == null) { - unsetO2(); + unsetO1(); } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -34968,12 +47733,12 @@ public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); - case O2: - return getO2(); - } throw new IllegalStateException(); } @@ -34985,10 +47750,10 @@ } switch (field) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -34997,15 +47762,24 @@ 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_roles_result) + return this.equals((list_roles_result)that); return false; } - public boolean equals(alter_index_result that) { + public boolean equals(list_roles_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) { @@ -35015,15 +47789,6 @@ 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; } @@ -35032,30 +47797,30 @@ return 0; } - public int compareTo(alter_index_result other) { + public int compareTo(list_roles_result 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_roles_result typedOther = (list_roles_result)other; - lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } - if (isSetO1()) { - lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { 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; } @@ -35077,18 +47842,28 @@ break; } switch (field.id) { - case 1: // O1 - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); + case 0: // SUCCESS + if (field.type == TType.LIST) { + { + TList _list212 = iprot.readListBegin(); + this.success = new ArrayList(_list212.size); + for (int _i213 = 0; _i213 < _list212.size; ++_i213) + { + Role _elem214; + _elem214 = new Role(); + _elem214.read(iprot); + this.success.add(_elem214); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case 2: // 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); } @@ -35105,14 +47880,21 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Role _iter215 : this.success) + { + _iter215.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(); @@ -35120,22 +47902,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_index_result("); + StringBuilder sb = new StringBuilder("list_roles_result("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.o1); + 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(")"); @@ -35148,25 +47930,22 @@ } - 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 get_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_privilege_set_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 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 HIVE_OBJECT_FIELD_DESC = new TField("hiveObject", TType.STRUCT, (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 String db_name; - private String tbl_name; - private String index_name; - private boolean deleteData; + private HiveObjectRef hiveObject; + 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 { - DB_NAME((short)1, "db_name"), - TBL_NAME((short)2, "tbl_name"), - INDEX_NAME((short)3, "index_name"), - DELETE_DATA((short)4, "deleteData"); + HIVE_OBJECT((short)1, "hiveObject"), + USER_NAME((short)2, "user_name"), + GROUP_NAMES((short)3, "group_names"); private static final Map byName = new HashMap(); @@ -35181,14 +47960,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: // INDEX_NAME - return INDEX_NAME; - case 4: // DELETE_DATA - return DELETE_DATA; + case 1: // HIVE_OBJECT + return HIVE_OBJECT; + case 2: // USER_NAME + return USER_NAME; + case 3: // GROUP_NAMES + return GROUP_NAMES; default: return null; } @@ -35229,194 +48006,172 @@ } // 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, + tmpMap.put(_Fields.HIVE_OBJECT, new FieldMetaData("hiveObject", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, HiveObjectRef.class))); + tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + 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_index_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_privilege_set_args.class, metaDataMap); } - public drop_index_by_name_args() { + public get_privilege_set_args() { } - public drop_index_by_name_args( - String db_name, - String tbl_name, - String index_name, - boolean deleteData) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + public get_privilege_set_args( + HiveObjectRef hiveObject, + String user_name, + List group_names) + { + this(); + this.hiveObject = hiveObject; + this.user_name = user_name; + this.group_names = group_names; } /** * 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; + public get_privilege_set_args(get_privilege_set_args other) { + if (other.isSetHiveObject()) { + this.hiveObject = new HiveObjectRef(other.hiveObject); } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetIndex_name()) { - this.index_name = other.index_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; } - this.deleteData = other.deleteData; } - public drop_index_by_name_args deepCopy() { - return new drop_index_by_name_args(this); + public get_privilege_set_args deepCopy() { + return new get_privilege_set_args(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.index_name = null; - setDeleteDataIsSet(false); - this.deleteData = false; + this.hiveObject = null; + this.user_name = null; + this.group_names = null; } - public String getDb_name() { - return this.db_name; + public HiveObjectRef getHiveObject() { + return this.hiveObject; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setHiveObject(HiveObjectRef hiveObject) { + this.hiveObject = hiveObject; } - public void unsetDb_name() { - this.db_name = null; + public void unsetHiveObject() { + this.hiveObject = 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 hiveObject is set (has been asigned a value) and false otherwise */ + public boolean isSetHiveObject() { + return this.hiveObject != null; } - public void setDb_nameIsSet(boolean value) { + public void setHiveObjectIsSet(boolean value) { if (!value) { - this.db_name = null; + this.hiveObject = null; } } - public String getTbl_name() { - return this.tbl_name; + public String getUser_name() { + return this.user_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetUser_name() { + this.user_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; + /** 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 setTbl_nameIsSet(boolean value) { + public void setUser_nameIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.user_name = null; } } - public String getIndex_name() { - return this.index_name; - } - - public void setIndex_name(String index_name) { - this.index_name = index_name; - } - - public void unsetIndex_name() { - this.index_name = null; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - /** 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 java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void setIndex_nameIsSet(boolean value) { - if (!value) { - this.index_name = null; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); } + this.group_names.add(elem); } - public boolean isDeleteData() { - return this.deleteData; + public List getGroup_names() { + return this.group_names; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + public void unsetGroup_names() { + this.group_names = 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 group_names is set (has been asigned a value) and false otherwise */ + public boolean isSetGroup_names() { + return this.group_names != null; } - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + public void setGroup_namesIsSet(boolean value) { + if (!value) { + this.group_names = 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 HIVE_OBJECT: if (value == null) { - unsetTbl_name(); + unsetHiveObject(); } else { - setTbl_name((String)value); + setHiveObject((HiveObjectRef)value); } break; - case INDEX_NAME: + case USER_NAME: if (value == null) { - unsetIndex_name(); + unsetUser_name(); } else { - setIndex_name((String)value); + setUser_name((String)value); } break; - case DELETE_DATA: + case GROUP_NAMES: if (value == null) { - unsetDeleteData(); + unsetGroup_names(); } else { - setDeleteData((Boolean)value); + setGroup_names((List)value); } break; @@ -35425,17 +48180,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case HIVE_OBJECT: + return getHiveObject(); - case INDEX_NAME: - return getIndex_name(); + case USER_NAME: + return getUser_name(); - case DELETE_DATA: - return new Boolean(isDeleteData()); + case GROUP_NAMES: + return getGroup_names(); } throw new IllegalStateException(); @@ -35448,14 +48200,12 @@ } 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 HIVE_OBJECT: + return isSetHiveObject(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); } throw new IllegalStateException(); } @@ -35464,48 +48214,39 @@ 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 get_privilege_set_args) + return this.equals((get_privilege_set_args)that); return false; } - public boolean equals(drop_index_by_name_args that) { + public boolean equals(get_privilege_set_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)) + boolean this_present_hiveObject = true && this.isSetHiveObject(); + boolean that_present_hiveObject = true && that.isSetHiveObject(); + if (this_present_hiveObject || that_present_hiveObject) { + if (!(this_present_hiveObject && that_present_hiveObject)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (!this.hiveObject.equals(that.hiveObject)) 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_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.index_name.equals(that.index_name)) + if (!this.user_name.equals(that.user_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)) + 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.deleteData != that.deleteData) + if (!this.group_names.equals(that.group_names)) return false; } @@ -35517,50 +48258,40 @@ return 0; } - public int compareTo(drop_index_by_name_args other) { + public int compareTo(get_privilege_set_args 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; + get_privilege_set_args typedOther = (get_privilege_set_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()); + lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetHiveObject()) { + lastComparison = TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetIndex_name()) { - lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (isSetUser_name()) { + lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names()); if (lastComparison != 0) { return lastComparison; } - if (isSetDeleteData()) { - lastComparison = TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetGroup_names()) { + lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names); if (lastComparison != 0) { return lastComparison; } @@ -35582,31 +48313,34 @@ 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 1: // HIVE_OBJECT + if (field.type == TType.STRUCT) { + this.hiveObject = new HiveObjectRef(); + this.hiveObject.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // INDEX_NAME + case 2: // USER_NAME if (field.type == TType.STRING) { - this.index_name = iprot.readString(); + this.user_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); + case 3: // GROUP_NAMES + if (field.type == TType.LIST) { + { + TList _list216 = iprot.readListBegin(); + this.group_names = new ArrayList(_list216.size); + for (int _i217 = 0; _i217 < _list216.size; ++_i217) + { + String _elem218; + _elem218 = iprot.readString(); + this.group_names.add(_elem218); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -35624,60 +48358,60 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + if (this.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + this.hiveObject.write(oprot); oprot.writeFieldEnd(); } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter219 : this.group_names) + { + oprot.writeString(_iter219); + } + 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_index_by_name_args("); + StringBuilder sb = new StringBuilder("get_privilege_set_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("hiveObject:"); + if (this.hiveObject == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.hiveObject); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { + sb.append("group_names:"); + if (this.group_names == null) { sb.append("null"); } else { - sb.append(this.index_name); + sb.append(this.group_names); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -35688,22 +48422,19 @@ } - 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 get_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_privilege_set_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + 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 boolean success; - private NoSuchObjectException o1; - private MetaException o2; + 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 { SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -35722,8 +48453,6 @@ return SUCCESS; case 1: // O1 return O1; - case 2: // O2 - return O2; default: return null; } @@ -35764,91 +48493,80 @@ } // 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))); + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.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_index_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_privilege_set_result.class, metaDataMap); } - public drop_index_by_name_result() { + public get_privilege_set_result() { } - public drop_index_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) + public get_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); this.success = success; - setSuccessIsSet(true); this.o1 = o1; - this.o2 = o2; } /** * Performs a deep copy on other. */ - 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); + public get_privilege_set_result(get_privilege_set_result other) { + if (other.isSetSuccess()) { + this.success = new PrincipalPrivilegeSet(other.success); } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } - public drop_index_by_name_result deepCopy() { - return new drop_index_by_name_result(this); + public get_privilege_set_result deepCopy() { + return new get_privilege_set_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.o1 = null; - this.o2 = null; } - public boolean isSuccess() { + public PrincipalPrivilegeSet getSuccess() { return this.success; } - public void setSuccess(boolean success) { + public void setSuccess(PrincipalPrivilegeSet success) { this.success = success; - setSuccessIsSet(true); } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + this.success = 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); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } - public NoSuchObjectException getO1() { + public MetaException getO1() { return this.o1; } - public void setO1(NoSuchObjectException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -35867,36 +48585,13 @@ } } - 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); + setSuccess((PrincipalPrivilegeSet)value); } break; @@ -35904,15 +48599,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -35922,14 +48609,11 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return new Boolean(isSuccess()); + return getSuccess(); case O1: return getO1(); - case O2: - return getO2(); - } throw new IllegalStateException(); } @@ -35945,8 +48629,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -35955,21 +48637,21 @@ 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 get_privilege_set_result) + return this.equals((get_privilege_set_result)that); return false; } - public boolean equals(drop_index_by_name_result that) { + public boolean equals(get_privilege_set_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) return false; } @@ -35982,15 +48664,6 @@ 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; } @@ -35999,13 +48672,13 @@ return 0; } - public int compareTo(drop_index_by_name_result other) { + public int compareTo(get_privilege_set_result 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; + get_privilege_set_result typedOther = (get_privilege_set_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -36027,16 +48700,6 @@ 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; } @@ -36055,29 +48718,21 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + 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 = new MetaException(); 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); } @@ -36092,16 +48747,12 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + 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(); @@ -36109,26 +48760,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_result("); + StringBuilder sb = new StringBuilder("get_privilege_set_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + if (this.success == null) { sb.append("null"); } else { - sb.append(this.o1); + 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(")"); @@ -36141,22 +48788,26 @@ } - 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 list_privileges_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_privileges_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 INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)2); + private static final TField HIVE_OBJECT_FIELD_DESC = new TField("hiveObject", TType.STRUCT, (short)3); - private String db_name; - private String tbl_name; - private String index_name; + private String principal_name; + private PrincipalType principal_type; + private HiveObjectRef hiveObject; /** 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"); + PRINCIPAL_NAME((short)1, "principal_name"), + /** + * + * @see PrincipalType + */ + PRINCIPAL_TYPE((short)2, "principal_type"), + HIVE_OBJECT((short)3, "hiveObject"); private static final Map byName = new HashMap(); @@ -36171,12 +48822,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: // INDEX_NAME - return INDEX_NAME; + case 1: // PRINCIPAL_NAME + return PRINCIPAL_NAME; + case 2: // PRINCIPAL_TYPE + return PRINCIPAL_TYPE; + case 3: // HIVE_OBJECT + return HIVE_OBJECT; default: return null; } @@ -36221,148 +48872,156 @@ 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, + tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, PrincipalType.class))); + tmpMap.put(_Fields.HIVE_OBJECT, new FieldMetaData("hiveObject", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, HiveObjectRef.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); - } - - public get_index_by_name_args() { + FieldMetaData.addStructMetaDataMap(list_privileges_args.class, metaDataMap); } - public get_index_by_name_args( - String db_name, - String tbl_name, - String index_name) + public list_privileges_args() { + } + + public list_privileges_args( + String principal_name, + PrincipalType principal_type, + HiveObjectRef hiveObject) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; + this.principal_name = principal_name; + this.principal_type = principal_type; + this.hiveObject = hiveObject; } /** * 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; + public list_privileges_args(list_privileges_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetPrincipal_type()) { + this.principal_type = other.principal_type; } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; + if (other.isSetHiveObject()) { + this.hiveObject = new HiveObjectRef(other.hiveObject); } } - public get_index_by_name_args deepCopy() { - return new get_index_by_name_args(this); + public list_privileges_args deepCopy() { + return new list_privileges_args(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.index_name = null; + this.principal_name = null; + this.principal_type = null; + this.hiveObject = null; } - public String getDb_name() { - return this.db_name; + public String getPrincipal_name() { + return this.principal_name; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; } - public void unsetDb_name() { - this.db_name = null; + public void unsetPrincipal_name() { + this.principal_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; + /** 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 setDb_nameIsSet(boolean value) { + public void setPrincipal_nameIsSet(boolean value) { if (!value) { - this.db_name = null; + this.principal_name = null; } } - public String getTbl_name() { - return this.tbl_name; + /** + * + * @see PrincipalType + */ + public PrincipalType getPrincipal_type() { + return this.principal_type; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + /** + * + * @see PrincipalType + */ + public void setPrincipal_type(PrincipalType principal_type) { + this.principal_type = principal_type; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetPrincipal_type() { + this.principal_type = 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 principal_type is set (has been asigned a value) and false otherwise */ + public boolean isSetPrincipal_type() { + return this.principal_type != null; } - public void setTbl_nameIsSet(boolean value) { + public void setPrincipal_typeIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.principal_type = null; } } - public String getIndex_name() { - return this.index_name; + public HiveObjectRef getHiveObject() { + return this.hiveObject; } - public void setIndex_name(String index_name) { - this.index_name = index_name; + public void setHiveObject(HiveObjectRef hiveObject) { + this.hiveObject = hiveObject; } - public void unsetIndex_name() { - this.index_name = null; + public void unsetHiveObject() { + this.hiveObject = 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 hiveObject is set (has been asigned a value) and false otherwise */ + public boolean isSetHiveObject() { + return this.hiveObject != null; } - public void setIndex_nameIsSet(boolean value) { + public void setHiveObjectIsSet(boolean value) { if (!value) { - this.index_name = null; + this.hiveObject = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case DB_NAME: + case PRINCIPAL_NAME: if (value == null) { - unsetDb_name(); + unsetPrincipal_name(); } else { - setDb_name((String)value); + setPrincipal_name((String)value); } break; - case TBL_NAME: + case PRINCIPAL_TYPE: if (value == null) { - unsetTbl_name(); + unsetPrincipal_type(); } else { - setTbl_name((String)value); + setPrincipal_type((PrincipalType)value); } break; - case INDEX_NAME: + case HIVE_OBJECT: if (value == null) { - unsetIndex_name(); + unsetHiveObject(); } else { - setIndex_name((String)value); + setHiveObject((HiveObjectRef)value); } break; @@ -36371,14 +49030,14 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case TBL_NAME: - return getTbl_name(); + case PRINCIPAL_TYPE: + return getPrincipal_type(); - case INDEX_NAME: - return getIndex_name(); + case HIVE_OBJECT: + return getHiveObject(); } throw new IllegalStateException(); @@ -36391,12 +49050,12 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case PRINCIPAL_TYPE: + return isSetPrincipal_type(); + case HIVE_OBJECT: + return isSetHiveObject(); } throw new IllegalStateException(); } @@ -36405,39 +49064,39 @@ 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 list_privileges_args) + return this.equals((list_privileges_args)that); return false; } - public boolean equals(get_index_by_name_args that) { + public boolean equals(list_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_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.db_name.equals(that.db_name)) + if (!this.principal_name.equals(that.principal_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_principal_type = true && this.isSetPrincipal_type(); + boolean that_present_principal_type = true && that.isSetPrincipal_type(); + if (this_present_principal_type || that_present_principal_type) { + if (!(this_present_principal_type && that_present_principal_type)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (!this.principal_type.equals(that.principal_type)) 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_hiveObject = true && this.isSetHiveObject(); + boolean that_present_hiveObject = true && that.isSetHiveObject(); + if (this_present_hiveObject || that_present_hiveObject) { + if (!(this_present_hiveObject && that_present_hiveObject)) return false; - if (!this.index_name.equals(that.index_name)) + if (!this.hiveObject.equals(that.hiveObject)) return false; } @@ -36449,40 +49108,40 @@ return 0; } - public int compareTo(get_index_by_name_args other) { + public int compareTo(list_privileges_args 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; + list_privileges_args typedOther = (list_privileges_args)other; - lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetDb_name()) { - lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (isSetPrincipal_name()) { + lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type()); if (lastComparison != 0) { return lastComparison; } - if (isSetTbl_name()) { - lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (isSetPrincipal_type()) { + lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject()); if (lastComparison != 0) { return lastComparison; } - if (isSetIndex_name()) { - lastComparison = TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (isSetHiveObject()) { + lastComparison = TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject); if (lastComparison != 0) { return lastComparison; } @@ -36504,23 +49163,24 @@ break; } switch (field.id) { - case 1: // DB_NAME + case 1: // PRINCIPAL_NAME if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.principal_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: // PRINCIPAL_TYPE + if (field.type == TType.I32) { + this.principal_type = PrincipalType.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; - case 3: // INDEX_NAME - if (field.type == TType.STRING) { - this.index_name = iprot.readString(); + case 3: // HIVE_OBJECT + if (field.type == TType.STRUCT) { + this.hiveObject = new HiveObjectRef(); + this.hiveObject.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -36538,19 +49198,19 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + if (this.principal_type != null) { + oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC); + oprot.writeI32(this.principal_type.getValue()); oprot.writeFieldEnd(); } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); + if (this.hiveObject != null) { + oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC); + this.hiveObject.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -36559,30 +49219,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_args("); + StringBuilder sb = new StringBuilder("list_privileges_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("principal_type:"); + if (this.principal_type == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.principal_type); } first = false; if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { + sb.append("hiveObject:"); + if (this.hiveObject == null) { sb.append("null"); } else { - sb.append(this.index_name); + sb.append(this.hiveObject); } first = false; sb.append(")"); @@ -36595,22 +49255,19 @@ } - 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 list_privileges_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_privileges_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 Index success; + 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 { SUCCESS((short)0, "success"), - O1((short)1, "o1"), - O2((short)2, "o2"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -36629,8 +49286,6 @@ return SUCCESS; case 1: // O1 return O1; - case 2: // O2 - return O2; default: return null; } @@ -36676,60 +49331,72 @@ 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))); + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, HiveObjectPrivilege.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_index_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_privileges_result.class, metaDataMap); } - public get_index_by_name_result() { + public list_privileges_result() { } - public get_index_by_name_result( - Index success, - MetaException o1, - NoSuchObjectException o2) + public list_privileges_result( + List success, + MetaException o1) { this(); this.success = success; this.o1 = o1; - this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_index_by_name_result(get_index_by_name_result other) { + public list_privileges_result(list_privileges_result other) { if (other.isSetSuccess()) { - this.success = new Index(other.success); + List __this__success = new ArrayList(); + for (HiveObjectPrivilege other_element : other.success) { + __this__success.add(new HiveObjectPrivilege(other_element)); + } + this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } } - public get_index_by_name_result deepCopy() { - return new get_index_by_name_result(this); + public list_privileges_result deepCopy() { + return new list_privileges_result(this); } @Override public void clear() { this.success = null; this.o1 = null; - this.o2 = null; } - public Index getSuccess() { + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(HiveObjectPrivilege elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { return this.success; } - public void setSuccess(Index success) { + public void setSuccess(List success) { this.success = success; } @@ -36771,36 +49438,13 @@ } } - 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((Index)value); + setSuccess((List)value); } break; @@ -36812,14 +49456,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - } } @@ -36831,9 +49467,6 @@ case O1: return getO1(); - case O2: - return getO2(); - } throw new IllegalStateException(); } @@ -36849,8 +49482,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -36859,12 +49490,12 @@ 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 list_privileges_result) + return this.equals((list_privileges_result)that); return false; } - public boolean equals(get_index_by_name_result that) { + public boolean equals(list_privileges_result that) { if (that == null) return false; @@ -36886,15 +49517,6 @@ 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; } @@ -36903,13 +49525,13 @@ return 0; } - public int compareTo(get_index_by_name_result other) { + public int compareTo(list_privileges_result 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; + list_privileges_result typedOther = (list_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -36931,16 +49553,6 @@ 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; } @@ -36959,9 +49571,19 @@ } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); + if (field.type == TType.LIST) { + { + TList _list220 = iprot.readListBegin(); + this.success = new ArrayList(_list220.size); + for (int _i221 = 0; _i221 < _list220.size; ++_i221) + { + HiveObjectPrivilege _elem222; + _elem222 = new HiveObjectPrivilege(); + _elem222.read(iprot); + this.success.add(_elem222); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -36974,14 +49596,6 @@ 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); } @@ -36996,16 +49610,19 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (HiveObjectPrivilege _iter223 : this.success) + { + _iter223.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(); @@ -37013,7 +49630,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_result("); + StringBuilder sb = new StringBuilder("list_privileges_result("); boolean first = true; sb.append("success:"); @@ -37031,14 +49648,6 @@ 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(); } @@ -37049,22 +49658,16 @@ } - 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 grant_privileges_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("grant_privileges_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 MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private short max_indexes; + private PrivilegeBag privileges; /** 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"); + PRIVILEGES((short)1, "privileges"); private static final Map byName = new HashMap(); @@ -37079,12 +49682,8 @@ */ 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 1: // PRIVILEGES + return PRIVILEGES; default: return null; } @@ -37125,157 +49724,74 @@ } // 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.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.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrivilegeBag.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); } - public get_indexes_args() { - this.max_indexes = (short)-1; - + public grant_privileges_args() { } - public get_indexes_args( - String db_name, - String tbl_name, - short max_indexes) + public grant_privileges_args( + PrivilegeBag privileges) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + this.privileges = privileges; } /** * Performs a deep copy on other. */ - 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.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public grant_privileges_args(grant_privileges_args other) { + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); } - this.max_indexes = other.max_indexes; } - public get_indexes_args deepCopy() { - return new get_indexes_args(this); + public grant_privileges_args deepCopy() { + return new grant_privileges_args(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_indexes = (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 short getMax_indexes() { - return this.max_indexes; - } - - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + this.privileges = null; } - public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + public PrivilegeBag getPrivileges() { + return this.privileges; } - /** 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 setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; } - public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + public void unsetPrivileges() { + this.privileges = null; } - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; + /** Returns true if field privileges is set (has been asigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; + } - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; + public void setPrivilegesIsSet(boolean value) { + if (!value) { + this.privileges = null; + } + } - case MAX_INDEXES: + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case PRIVILEGES: if (value == null) { - unsetMax_indexes(); + unsetPrivileges(); } else { - setMax_indexes((Short)value); + setPrivileges((PrivilegeBag)value); } break; @@ -37284,14 +49800,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_INDEXES: - return new Short(getMax_indexes()); + case PRIVILEGES: + return getPrivileges(); } throw new IllegalStateException(); @@ -37304,12 +49814,8 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); + case PRIVILEGES: + return isSetPrivileges(); } throw new IllegalStateException(); } @@ -37318,39 +49824,21 @@ 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 grant_privileges_args) + return this.equals((grant_privileges_args)that); return false; } - public boolean equals(get_indexes_args that) { + public boolean equals(grant_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)) - 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_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_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.max_indexes != that.max_indexes) + if (!this.privileges.equals(that.privileges)) return false; } @@ -37362,40 +49850,20 @@ return 0; } - public int compareTo(get_indexes_args other) { + public int compareTo(grant_privileges_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_indexes_args typedOther = (get_indexes_args)other; + grant_privileges_args typedOther = (grant_privileges_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(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_indexes()) { - lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); if (lastComparison != 0) { return lastComparison; } @@ -37417,24 +49885,10 @@ 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: // MAX_INDEXES - if (field.type == TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); + case 1: // PRIVILEGES + if (field.type == TType.STRUCT) { + this.privileges = new PrivilegeBag(); + this.privileges.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -37452,47 +49906,27 @@ 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.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.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("grant_privileges_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("privileges:"); + if (this.privileges == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.privileges); } first = false; - if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); - first = false; sb.append(")"); return sb.toString(); } @@ -37503,22 +49937,19 @@ } - 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 grant_privileges_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("grant_privileges_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + 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 List success; - private NoSuchObjectException o1; - 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"), - O1((short)1, "o1"), - O2((short)2, "o2"); + O1((short)1, "o1"); private static final Map byName = new HashMap(); @@ -37537,8 +49968,6 @@ return SUCCESS; case 1: // O1 return O1; - case 2: // O2 - return O2; default: return null; } @@ -37579,108 +50008,83 @@ } // 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 StructMetaData(TType.STRUCT, Index.class)))); + 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(get_indexes_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(grant_privileges_result.class, metaDataMap); } - public get_indexes_result() { + public grant_privileges_result() { } - public get_indexes_result( - List success, - NoSuchObjectException o1, - MetaException o2) + public grant_privileges_result( + boolean success, + MetaException o1) { this(); this.success = success; + setSuccessIsSet(true); this.o1 = o1; - this.o2 = o2; } /** * 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; - } + 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 NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + this.o1 = new MetaException(other.o1); } } - public get_indexes_result deepCopy() { - return new get_indexes_result(this); + public grant_privileges_result deepCopy() { + return new grant_privileges_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.o1 = null; - 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() { + 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 NoSuchObjectException getO1() { + public MetaException getO1() { return this.o1; } - public void setO1(NoSuchObjectException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -37699,36 +50103,13 @@ } } - 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((List)value); + setSuccess((Boolean)value); } break; @@ -37736,15 +50117,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -37754,14 +50127,11 @@ public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); - case O2: - return getO2(); - } throw new IllegalStateException(); } @@ -37777,8 +50147,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); } throw new IllegalStateException(); } @@ -37787,21 +50155,21 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_indexes_result) - return this.equals((get_indexes_result)that); + if (that instanceof grant_privileges_result) + return this.equals((grant_privileges_result)that); return false; } - public boolean equals(get_indexes_result that) { + public boolean equals(grant_privileges_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) return false; } @@ -37814,15 +50182,6 @@ 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; } @@ -37831,13 +50190,13 @@ return 0; } - public int compareTo(get_indexes_result other) { + public int compareTo(grant_privileges_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_indexes_result typedOther = (get_indexes_result)other; + grant_privileges_result typedOther = (grant_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -37859,16 +50218,6 @@ 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; } @@ -37887,39 +50236,21 @@ } 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(); - } + 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 = new MetaException(); 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); } @@ -37934,23 +50265,12 @@ 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.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(); @@ -37958,15 +50278,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_result("); + StringBuilder sb = new StringBuilder("grant_privileges_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -37976,14 +50292,6 @@ 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(); } @@ -37994,22 +50302,16 @@ } - 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 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 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 PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)1); - private String db_name; - private String tbl_name; - private short max_indexes; + private PrivilegeBag privileges; /** 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"); + PRIVILEGES((short)1, "privileges"); private static final Map byName = new HashMap(); @@ -38024,12 +50326,8 @@ */ 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 1: // PRIVILEGES + return PRIVILEGES; default: return null; } @@ -38070,157 +50368,74 @@ } // 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.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.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrivilegeBag.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap); } - public get_index_names_args() { - this.max_indexes = (short)-1; - + public revoke_privileges_args() { } - public get_index_names_args( - String db_name, - String tbl_name, - short max_indexes) + public revoke_privileges_args( + PrivilegeBag privileges) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + this.privileges = privileges; } /** * 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 revoke_privileges_args(revoke_privileges_args other) { + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); } - this.max_indexes = other.max_indexes; } - public get_index_names_args deepCopy() { - return new get_index_names_args(this); + public revoke_privileges_args deepCopy() { + return new revoke_privileges_args(this); } @Override public void clear() { - this.db_name = null; - this.tbl_name = null; - this.max_indexes = (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; - } + this.privileges = null; } - public String getTbl_name() { - return this.tbl_name; + public PrivilegeBag getPrivileges() { + return this.privileges; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetPrivileges() { + this.privileges = 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 privileges is set (has been asigned a value) and false otherwise */ + public boolean isSetPrivileges() { + return this.privileges != null; } - public void setTbl_nameIsSet(boolean value) { + public void setPrivilegesIsSet(boolean value) { if (!value) { - this.tbl_name = null; + this.privileges = 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: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case MAX_INDEXES: + case PRIVILEGES: if (value == null) { - unsetMax_indexes(); + unsetPrivileges(); } else { - setMax_indexes((Short)value); + setPrivileges((PrivilegeBag)value); } break; @@ -38229,14 +50444,8 @@ public Object getFieldValue(_Fields field) { switch (field) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case MAX_INDEXES: - return new Short(getMax_indexes()); + case PRIVILEGES: + return getPrivileges(); } throw new IllegalStateException(); @@ -38249,12 +50458,8 @@ } switch (field) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); + case PRIVILEGES: + return isSetPrivileges(); } throw new IllegalStateException(); } @@ -38263,39 +50468,21 @@ 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_privileges_args) + return this.equals((revoke_privileges_args)that); return false; } - public boolean equals(get_index_names_args that) { + public boolean equals(revoke_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)) - 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_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_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.max_indexes != that.max_indexes) + if (!this.privileges.equals(that.privileges)) return false; } @@ -38307,40 +50494,20 @@ return 0; } - public int compareTo(get_index_names_args 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_names_args typedOther = (get_index_names_args)other; + revoke_privileges_args typedOther = (revoke_privileges_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(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_indexes()) { - lastComparison = TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (isSetPrivileges()) { + lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges); if (lastComparison != 0) { return lastComparison; } @@ -38362,24 +50529,10 @@ 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: // MAX_INDEXES - if (field.type == TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); + case 1: // PRIVILEGES + if (field.type == TType.STRUCT) { + this.privileges = new PrivilegeBag(); + this.privileges.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -38397,47 +50550,27 @@ 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.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.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_index_names_args("); + StringBuilder sb = new StringBuilder("revoke_privileges_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("privileges:"); + if (this.privileges == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.privileges); } first = false; - if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); - first = false; sb.append(")"); return sb.toString(); } @@ -38448,19 +50581,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_privileges_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_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(); @@ -38477,8 +50610,8 @@ switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // O2 - return O2; + case 1: // O1 + return O1; default: return null; } @@ -38519,115 +50652,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_privileges_result.class, metaDataMap); } - public get_index_names_result() { + public revoke_privileges_result() { } - public get_index_names_result( - List success, - MetaException o2) + public revoke_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_privileges_result(revoke_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_privileges_result deepCopy() { + return new revoke_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; } } @@ -38637,15 +50753,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; @@ -38655,10 +50771,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(); @@ -38673,8 +50789,8 @@ switch (field) { case SUCCESS: return isSetSuccess(); - case O2: - return isSetO2(); + case O1: + return isSetO1(); } throw new IllegalStateException(); } @@ -38683,30 +50799,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_privileges_result) + return this.equals((revoke_privileges_result)that); return false; } - public boolean equals(get_index_names_result that) { + public boolean equals(revoke_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; } @@ -38718,13 +50834,13 @@ return 0; } - public int compareTo(get_index_names_result other) { + public int compareTo(revoke_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_privileges_result typedOther = (revoke_privileges_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -38736,12 +50852,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; } @@ -38764,26 +50880,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); } @@ -38802,18 +50909,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(); @@ -38822,22 +50922,18 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_result("); + StringBuilder sb = new StringBuilder("revoke_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 1057802) +++ metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (working copy) @@ -34,10 +34,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); @@ -50,6 +53,15 @@ 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 create_role($role); + public function drop_role($role_name); + public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); + public function revoke_role($role_name, $principal_name, $principal_type); + public function list_roles($principal_name, $principal_type); + public function get_privilege_set($hiveObject, $user_name, $group_names); + public function list_privileges($principal_name, $principal_type, $hiveObject); + public function grant_privileges($privileges); + public function revoke_privileges($privileges); } class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftHiveMetastoreIf { @@ -1443,6 +1455,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); @@ -1561,6 +1634,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); @@ -1674,6 +1808,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); @@ -2362,93 +2558,3059 @@ throw new Exception("get_index_names failed: unknown result"); } -} - -// HELPER FUNCTIONS AND STRUCTURES + public function create_role($role) + { + $this->send_create_role($role); + return $this->recv_create_role(); + } -class metastore_ThriftHiveMetastore_create_database_args { - static $_TSPEC; + public function send_create_role($role) + { + $args = new metastore_ThriftHiveMetastore_create_role_args(); + $args->role = $role; + $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 $database = null; + 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; - 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_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 getName() { - return 'ThriftHiveMetastore_create_database_args'; + public function drop_role($role_name) + { + $this->send_drop_role($role_name); + return $this->recv_drop_role(); } - public function read($input) + public function send_drop_role($role_name) { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) + $args = new metastore_ThriftHiveMetastore_drop_role_args(); + $args->role_name = $role_name; + $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_, 'drop_role', 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('drop_role', 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_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 grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + { + $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); + return $this->recv_grant_role(); + } + + public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + { + $args = new metastore_ThriftHiveMetastore_grant_role_args(); + $args->role_name = $role_name; + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $args->grantor = $grantor; + $args->grantorType = $grantorType; + $args->grant_option = $grant_option; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_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_grant_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_grant_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("grant_role failed: unknown result"); + } + + public function revoke_role($role_name, $principal_name, $principal_type) + { + $this->send_revoke_role($role_name, $principal_name, $principal_type); + return $this->recv_revoke_role(); + } + + public function send_revoke_role($role_name, $principal_name, $principal_type) + { + $args = new metastore_ThriftHiveMetastore_revoke_role_args(); + $args->role_name = $role_name; + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_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_revoke_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_revoke_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("revoke_role failed: unknown result"); + } + + public function list_roles($principal_name, $principal_type) + { + $this->send_list_roles($principal_name, $principal_type); + return $this->recv_list_roles(); + } + + public function send_list_roles($principal_name, $principal_type) + { + $args = new metastore_ThriftHiveMetastore_list_roles_args(); + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $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 get_privilege_set($hiveObject, $user_name, $group_names) + { + $this->send_get_privilege_set($hiveObject, $user_name, $group_names); + return $this->recv_get_privilege_set(); + } + + public function send_get_privilege_set($hiveObject, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_privilege_set_args(); + $args->hiveObject = $hiveObject; + $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_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_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_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_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_privilege_set failed: unknown result"); + } + + public function list_privileges($principal_name, $principal_type, $hiveObject) + { + $this->send_list_privileges($principal_name, $principal_type, $hiveObject); + return $this->recv_list_privileges(); + } + + public function send_list_privileges($principal_name, $principal_type, $hiveObject) + { + $args = new metastore_ThriftHiveMetastore_list_privileges_args(); + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $args->hiveObject = $hiveObject; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_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_list_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_list_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("list_privileges failed: unknown result"); + } + + public function grant_privileges($privileges) + { + $this->send_grant_privileges($privileges); + return $this->recv_grant_privileges(); + } + + public function send_grant_privileges($privileges) + { + $args = new metastore_ThriftHiveMetastore_grant_privileges_args(); + $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_, '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($privileges) + { + $this->send_revoke_privileges($privileges); + return $this->recv_revoke_privileges(); + } + + public function send_revoke_privileges($privileges) + { + $args = new metastore_ThriftHiveMetastore_revoke_privileges_args(); + $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"); + } + +} + +// 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(); + $_size174 = 0; + $_etype177 = 0; + $xfer += $input->readListBegin($_etype177, $_size174); + for ($_i178 = 0; $_i178 < $_size174; ++$_i178) + { + $elem179 = null; + $xfer += $input->readString($elem179); + $this->success []= $elem179; + } + $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 $iter180) + { + $xfer += $output->writeString($iter180); + } + } + $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(); + $_size181 = 0; + $_etype184 = 0; + $xfer += $input->readListBegin($_etype184, $_size181); + for ($_i185 = 0; $_i185 < $_size181; ++$_i185) + { + $elem186 = null; + $xfer += $input->readString($elem186); + $this->success []= $elem186; + } + $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 $iter187) + { + $xfer += $output->writeString($iter187); + } + } + $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_alter_database_args { + static $_TSPEC; + + public $dbname = null; + public $db = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'db', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['db'])) { + $this->db = $vals['db']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_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->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + 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('ThriftHiveMetastore_alter_database_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $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, 2); + $xfer += $this->db->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_database_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_MetaException', + ), + 2 => array( + 'var' => 'o2', + '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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_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_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_alter_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(); + } + $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(); + $_size188 = 0; + $_ktype189 = 0; + $_vtype190 = 0; + $xfer += $input->readMapBegin($_ktype189, $_vtype190, $_size188); + for ($_i192 = 0; $_i192 < $_size188; ++$_i192) + { + $key193 = ''; + $val194 = new metastore_Type(); + $xfer += $input->readString($key193); + $val194 = new metastore_Type(); + $xfer += $val194->read($input); + $this->success[$key193] = $val194; + } + $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 $kiter195 => $viter196) + { + $xfer += $output->writeString($kiter195); + $xfer += $viter196->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(); + $_size197 = 0; + $_etype200 = 0; + $xfer += $input->readListBegin($_etype200, $_size197); + for ($_i201 = 0; $_i201 < $_size197; ++$_i201) + { + $elem202 = null; + $elem202 = new metastore_FieldSchema(); + $xfer += $elem202->read($input); + $this->success []= $elem202; + } + $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 $iter203) + { + $xfer += $iter203->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_create_database_result { +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(); + $_size204 = 0; + $_etype207 = 0; + $xfer += $input->readListBegin($_etype207, $_size204); + for ($_i208 = 0; $_i208 < $_size204; ++$_i208) + { + $elem209 = null; + $elem209 = new metastore_FieldSchema(); + $xfer += $elem209->read($input); + $this->success []= $elem209; + } + $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 $iter210) + { + $xfer += $iter210->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)) { @@ -2468,6 +5630,11 @@ 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), ); } if (is_array($vals)) { @@ -2480,11 +5647,14 @@ if (isset($vals['o3'])) { $this->o3 = $vals['o3']; } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_create_database_result'; + return 'ThriftHiveMetastore_create_table_result'; } public function read($input) @@ -2526,6 +5696,14 @@ $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; @@ -2538,7 +5716,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -2554,6 +5732,11 @@ $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; @@ -2561,29 +5744,45 @@ } -class metastore_ThriftHiveMetastore_get_database_args { +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_get_database_args'; + return 'ThriftHiveMetastore_drop_table_args'; } public function read($input) @@ -2603,11 +5802,25 @@ { 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; @@ -2620,12 +5833,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args'); + $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, 1); + $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; @@ -2633,48 +5856,39 @@ } -class metastore_ThriftHiveMetastore_get_database_result { +class metastore_ThriftHiveMetastore_drop_table_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_Database', - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_NoSuchObjectException', ), 2 => array( - 'var' => 'o2', + '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_get_database_result'; + return 'ThriftHiveMetastore_drop_table_result'; } public function read($input) @@ -2692,14 +5906,6 @@ } 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(); @@ -2710,8 +5916,8 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } @@ -2728,23 +5934,15 @@ 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(); - } + $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->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2754,37 +5952,37 @@ } -class metastore_ThriftHiveMetastore_drop_database_args { +class metastore_ThriftHiveMetastore_get_tables_args { static $_TSPEC; - public $name = null; - public $deleteData = null; + public $db_name = null; + public $pattern = 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' => 'pattern', + '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['pattern'])) { + $this->pattern = $vals['pattern']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_args'; + return 'ThriftHiveMetastore_get_tables_args'; } public function read($input) @@ -2804,14 +6002,14 @@ { 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->pattern); } else { $xfer += $input->skip($ftype); } @@ -2828,15 +6026,15 @@ 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_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->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); - $xfer += $output->writeBool($this->deleteData); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2846,48 +6044,42 @@ } -class metastore_ThriftHiveMetastore_drop_database_result { +class metastore_ThriftHiveMetastore_get_tables_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::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_InvalidOperationException', - ), - 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_drop_database_result'; + return 'ThriftHiveMetastore_get_tables_result'; } public function read($input) @@ -2905,26 +6097,27 @@ } 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); + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size211 = 0; + $_etype214 = 0; + $xfer += $input->readListBegin($_etype214, $_size211); + for ($_i215 = 0; $_i215 < $_size211; ++$_i215) + { + $elem216 = null; + $xfer += $input->readString($elem216); + $this->success []= $elem216; + } + $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->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -2941,22 +6134,29 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + $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 $iter217) + { + $xfer += $output->writeString($iter217); + } + } + $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; @@ -2964,29 +6164,29 @@ } -class metastore_ThriftHiveMetastore_get_databases_args { +class metastore_ThriftHiveMetastore_get_all_tables_args { static $_TSPEC; - public $pattern = null; + public $db_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'pattern', + 'var' => 'db_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']; } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_args'; + return 'ThriftHiveMetastore_get_all_tables_args'; } public function read($input) @@ -3006,7 +6206,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -3023,10 +6223,10 @@ 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_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(); @@ -3036,7 +6236,7 @@ } -class metastore_ThriftHiveMetastore_get_databases_result { +class metastore_ThriftHiveMetastore_get_all_tables_result { static $_TSPEC; public $success = null; @@ -3071,7 +6271,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_databases_result'; + return 'ThriftHiveMetastore_get_all_tables_result'; } public function read($input) @@ -3092,14 +6292,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size112 = 0; - $_etype115 = 0; - $xfer += $input->readListBegin($_etype115, $_size112); - for ($_i116 = 0; $_i116 < $_size112; ++$_i116) + $_size218 = 0; + $_etype221 = 0; + $xfer += $input->readListBegin($_etype221, $_size218); + for ($_i222 = 0; $_i222 < $_size218; ++$_i222) { - $elem117 = null; - $xfer += $input->readString($elem117); - $this->success []= $elem117; + $elem223 = null; + $xfer += $input->readString($elem223); + $this->success []= $elem223; } $xfer += $input->readListEnd(); } else { @@ -3126,7 +6326,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + $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); @@ -3135,9 +6335,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter118) + foreach ($this->success as $iter224) { - $xfer += $output->writeString($iter118); + $xfer += $output->writeString($iter224); } } $output->writeListEnd(); @@ -3156,19 +6356,37 @@ } -class metastore_ThriftHiveMetastore_get_all_databases_args { +class metastore_ThriftHiveMetastore_get_table_args { static $_TSPEC; + public $dbname = null; + public $tbl_name = null; - public function __construct() { + 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_all_databases_args'; + return 'ThriftHiveMetastore_get_table_args'; } public function read($input) @@ -3186,6 +6404,20 @@ } 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; @@ -3198,7 +6430,17 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $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; @@ -3206,28 +6448,31 @@ } -class metastore_ThriftHiveMetastore_get_all_databases_result { +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::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + '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)) { @@ -3237,11 +6482,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_table_result'; } public function read($input) @@ -3260,18 +6508,9 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size119 = 0; - $_etype122 = 0; - $xfer += $input->readListBegin($_etype122, $_size119); - for ($_i123 = 0; $_i123 < $_size119; ++$_i123) - { - $elem124 = null; - $xfer += $input->readString($elem124); - $this->success []= $elem124; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Table(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -3284,6 +6523,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; @@ -3296,22 +6543,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_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 $iter125) - { - $xfer += $output->writeString($iter125); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3319,6 +6557,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; @@ -3326,11 +6569,12 @@ } -class metastore_ThriftHiveMetastore_alter_database_args { +class metastore_ThriftHiveMetastore_alter_table_args { static $_TSPEC; public $dbname = null; - public $db = null; + public $tbl_name = null; + public $new_tbl = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -3340,9 +6584,13 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'db', + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_tbl', 'type' => TType::STRUCT, - 'class' => 'metastore_Database', + 'class' => 'metastore_Table', ), ); } @@ -3350,14 +6598,17 @@ if (isset($vals['dbname'])) { $this->dbname = $vals['dbname']; } - if (isset($vals['db'])) { - $this->db = $vals['db']; + 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_database_args'; + return 'ThriftHiveMetastore_alter_table_args'; } public function read($input) @@ -3383,9 +6634,16 @@ } 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->db = new metastore_Database(); - $xfer += $this->db->read($input); + $this->new_tbl = new metastore_Table(); + $xfer += $this->new_tbl->read($input); } else { $xfer += $input->skip($ftype); } @@ -3402,18 +6660,23 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_args'); + $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->db !== null) { - if (!is_object($this->db)) { + 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('db', TType::STRUCT, 2); - $xfer += $this->db->write($output); + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3423,7 +6686,7 @@ } -class metastore_ThriftHiveMetastore_alter_database_result { +class metastore_ThriftHiveMetastore_alter_table_result { static $_TSPEC; public $o1 = null; @@ -3435,12 +6698,12 @@ 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_InvalidOperationException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), ); } @@ -3455,7 +6718,7 @@ } public function getName() { - return 'ThriftHiveMetastore_alter_database_result'; + return 'ThriftHiveMetastore_alter_table_result'; } public function read($input) @@ -3475,7 +6738,7 @@ { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -3483,7 +6746,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); @@ -3501,7 +6764,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -3519,29 +6782,30 @@ } -class metastore_ThriftHiveMetastore_get_type_args { +class metastore_ThriftHiveMetastore_add_partition_args { static $_TSPEC; - public $name = null; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_args'; + return 'ThriftHiveMetastore_add_partition_args'; } public function read($input) @@ -3560,8 +6824,9 @@ switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + if ($ftype == TType::STRUCT) { + $this->new_part = new metastore_Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -3578,10 +6843,13 @@ 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_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(); @@ -3591,12 +6859,13 @@ } -class metastore_ThriftHiveMetastore_get_type_result { +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)) { @@ -3604,17 +6873,22 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'class' => 'metastore_Partition', ), 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', ), ); } @@ -3628,11 +6902,14 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_type_result'; + return 'ThriftHiveMetastore_add_partition_result'; } public function read($input) @@ -3652,7 +6929,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Type(); + $this->success = new metastore_Partition(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -3660,7 +6937,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); @@ -3668,12 +6945,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; @@ -3686,7 +6971,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result'); + $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); @@ -3705,6 +6990,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; @@ -3712,30 +7002,49 @@ } -class metastore_ThriftHiveMetastore_create_type_args { +class metastore_ThriftHiveMetastore_append_partition_args { static $_TSPEC; - public $type = 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' => 'type', - 'type' => TType::STRUCT, - 'class' => 'metastore_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, + ), ), ); } 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']; } } } public function getName() { - return 'ThriftHiveMetastore_create_type_args'; + return 'ThriftHiveMetastore_append_partition_args'; } public function read($input) @@ -3754,9 +7063,32 @@ 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::LST) { + $this->part_vals = array(); + $_size225 = 0; + $_etype228 = 0; + $xfer += $input->readListBegin($_etype228, $_size225); + for ($_i229 = 0; $_i229 < $_size225; ++$_i229) + { + $elem230 = null; + $xfer += $input->readString($elem230); + $this->part_vals []= $elem230; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -3773,13 +7105,32 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args'); - if ($this->type !== null) { - if (!is_object($this->type)) { + $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('type', TType::STRUCT, 1); - $xfer += $this->type->write($output); + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter231) + { + $xfer += $output->writeString($iter231); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3789,7 +7140,7 @@ } -class metastore_ThriftHiveMetastore_create_type_result { +class metastore_ThriftHiveMetastore_append_partition_result { static $_TSPEC; public $success = null; @@ -3802,17 +7153,18 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', + 'class' => 'metastore_InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', + 'class' => 'metastore_AlreadyExistsException', ), 3 => array( 'var' => 'o3', @@ -3838,7 +7190,7 @@ } public function getName() { - return 'ThriftHiveMetastore_create_type_result'; + return 'ThriftHiveMetastore_append_partition_result'; } public function read($input) @@ -3857,15 +7209,16 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + 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_AlreadyExistsException(); + $this->o1 = new metastore_InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -3873,7 +7226,7 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); + $this->o2 = new metastore_AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -3899,10 +7252,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_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) { @@ -3927,29 +7283,45 @@ } -class metastore_ThriftHiveMetastore_drop_type_args { +class metastore_ThriftHiveMetastore_append_partition_by_name_args { static $_TSPEC; - public $type = 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' => 'type', + '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['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_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_type_args'; + return 'ThriftHiveMetastore_append_partition_by_name_args'; } public function read($input) @@ -3969,7 +7341,21 @@ { 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::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -3986,10 +7372,20 @@ 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_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(); @@ -3999,29 +7395,36 @@ } -class metastore_ThriftHiveMetastore_drop_type_result { +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::BOOL, + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), 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', ), ); } @@ -4035,11 +7438,14 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_drop_type_result'; + return 'ThriftHiveMetastore_append_partition_by_name_result'; } public function read($input) @@ -4058,15 +7464,16 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + 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_MetaException(); + $this->o1 = new metastore_InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -4074,12 +7481,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; @@ -4092,10 +7507,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_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) { @@ -4108,6 +7526,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; @@ -4115,29 +7538,57 @@ } -class metastore_ThriftHiveMetastore_get_type_all_args { +class metastore_ThriftHiveMetastore_drop_partition_args { static $_TSPEC; - public $name = null; + 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' => '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' => 'deleteData', + 'type' => TType::BOOL, + ), ); } 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['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_all_args'; + return 'ThriftHiveMetastore_drop_partition_args'; } public function read($input) @@ -4157,7 +7608,38 @@ { 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(); + $_size232 = 0; + $_etype235 = 0; + $xfer += $input->readListBegin($_etype235, $_size232); + for ($_i236 = 0; $_i236 < $_size232; ++$_i236) + { + $elem237 = null; + $xfer += $input->readString($elem237); + $this->part_vals []= $elem237; + } + $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); } @@ -4174,10 +7656,37 @@ 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_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 $iter238) + { + $xfer += $output->writeString($iter238); + } + } + $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(); @@ -4187,10 +7696,11 @@ } -class metastore_ThriftHiveMetastore_get_type_all_result { +class metastore_ThriftHiveMetastore_drop_partition_result { static $_TSPEC; public $success = null; + public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -4198,18 +7708,14 @@ 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', - ), + 'type' => TType::BOOL, ), 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', @@ -4220,6 +7726,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']; } @@ -4227,7 +7736,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_type_all_result'; + return 'ThriftHiveMetastore_drop_partition_result'; } public function read($input) @@ -4246,28 +7755,22 @@ switch ($fid) { case 0: - if ($ftype == TType::MAP) { - $this->success = array(); - $_size126 = 0; - $_ktype127 = 0; - $_vtype128 = 0; - $xfer += $input->readMapBegin($_ktype127, $_vtype128, $_size126); - for ($_i130 = 0; $_i130 < $_size126; ++$_i130) - { - $key131 = ''; - $val132 = new metastore_Type(); - $xfer += $input->readString($key131); - $val132 = new metastore_Type(); - $xfer += $val132->read($input); - $this->success[$key131] = $val132; - } - $xfer += $input->readMapEnd(); + 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 { @@ -4286,27 +7789,19 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_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 $kiter133 => $viter134) - { - $xfer += $output->writeString($kiter133); - $xfer += $viter134->write($output); - } - } - $output->writeMapEnd(); - } + $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, 1); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -4317,11 +7812,13 @@ } -class metastore_ThriftHiveMetastore_get_fields_args { +class metastore_ThriftHiveMetastore_drop_partition_by_name_args { static $_TSPEC; public $db_name = null; - public $table_name = null; + public $tbl_name = null; + public $part_name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4331,23 +7828,37 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'table_name', + '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['table_name'])) { - $this->table_name = $vals['table_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_get_fields_args'; + return 'ThriftHiveMetastore_drop_partition_by_name_args'; } public function read($input) @@ -4374,7 +7885,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->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -4391,15 +7916,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + $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->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_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(); @@ -4409,40 +7944,29 @@ } -class metastore_ThriftHiveMetastore_get_fields_result { +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::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownDBException', + 'class' => 'metastore_MetaException', ), ); } @@ -4456,14 +7980,11 @@ 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_drop_partition_by_name_result'; } public function read($input) @@ -4482,26 +8003,15 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size135 = 0; - $_etype138 = 0; - $xfer += $input->readListBegin($_etype138, $_size135); - for ($_i139 = 0; $_i139 < $_size135; ++$_i139) - { - $elem140 = null; - $elem140 = new metastore_FieldSchema(); - $xfer += $elem140->read($input); - $this->success []= $elem140; - } - $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_MetaException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -4509,48 +8019,28 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_UnknownTableException(); + $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_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 $iter141) - { - $xfer += $iter141->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $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) { @@ -4563,11 +8053,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; @@ -4575,11 +8060,12 @@ } -class metastore_ThriftHiveMetastore_get_schema_args { +class metastore_ThriftHiveMetastore_get_partition_args { static $_TSPEC; public $db_name = null; - public $table_name = null; + public $tbl_name = null; + public $part_vals = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4589,23 +8075,34 @@ '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, + ), + ), ); } 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']; } } } public function getName() { - return 'ThriftHiveMetastore_get_schema_args'; + return 'ThriftHiveMetastore_get_partition_args'; } public function read($input) @@ -4632,7 +8129,24 @@ 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(); + $_size239 = 0; + $_etype242 = 0; + $xfer += $input->readListBegin($_etype242, $_size239); + for ($_i243 = 0; $_i243 < $_size239; ++$_i243) + { + $elem244 = null; + $xfer += $input->readString($elem244); + $this->part_vals []= $elem244; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -4649,15 +8163,32 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); + $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->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 $iter245) + { + $xfer += $output->writeString($iter245); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4667,25 +8198,20 @@ } -class metastore_ThriftHiveMetastore_get_schema_result { +class metastore_ThriftHiveMetastore_get_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::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), 1 => array( 'var' => 'o1', @@ -4695,12 +8221,7 @@ 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownDBException', + 'class' => 'metastore_NoSuchObjectException', ), ); } @@ -4714,14 +8235,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_partition_result'; } public function read($input) @@ -4740,19 +8258,9 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size142 = 0; - $_etype145 = 0; - $xfer += $input->readListBegin($_etype145, $_size142); - for ($_i146 = 0; $_i146 < $_size142; ++$_i146) - { - $elem147 = null; - $elem147 = new metastore_FieldSchema(); - $xfer += $elem147->read($input); - $this->success []= $elem147; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -4767,20 +8275,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; @@ -4793,22 +8293,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_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 $iter148) - { - $xfer += $iter148->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -4821,11 +8312,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; @@ -4833,30 +8319,69 @@ } -class metastore_ThriftHiveMetastore_create_table_args { +class metastore_ThriftHiveMetastore_get_partition_with_auth_args { static $_TSPEC; - public $tbl = 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' => 'tbl', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + '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' => '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['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['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_create_table_args'; + return 'ThriftHiveMetastore_get_partition_with_auth_args'; } public function read($input) @@ -4875,9 +8400,56 @@ switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->tbl = new metastore_Table(); - $xfer += $this->tbl->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::LST) { + $this->part_vals = array(); + $_size246 = 0; + $_etype249 = 0; + $xfer += $input->readListBegin($_etype249, $_size246); + for ($_i250 = 0; $_i250 < $_size246; ++$_i250) + { + $elem251 = null; + $xfer += $input->readString($elem251); + $this->part_vals []= $elem251; + } + $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(); + $_size252 = 0; + $_etype255 = 0; + $xfer += $input->readListBegin($_etype255, $_size252); + for ($_i256 = 0; $_i256 < $_size252; ++$_i256) + { + $elem257 = null; + $xfer += $input->readString($elem257); + $this->group_names []= $elem257; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -4894,13 +8466,54 @@ 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_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->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('tbl', TType::STRUCT, 1); - $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter258) + { + $xfer += $output->writeString($iter258); + } + } + $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 $iter259) + { + $xfer += $output->writeString($iter259); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4910,57 +8523,48 @@ } -class metastore_ThriftHiveMetastore_create_table_result { +class metastore_ThriftHiveMetastore_get_partition_with_auth_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; - public $o4 = 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_AlreadyExistsException', + 'class' => 'metastore_MetaException', ), 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['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']; - } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_table_result'; + return 'ThriftHiveMetastore_get_partition_with_auth_result'; } public function read($input) @@ -4978,34 +8582,26 @@ } 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: + case 0: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); - $xfer += $this->o2->read($input); + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); } 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->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 4: + case 2: if ($ftype == TType::STRUCT) { - $this->o4 = new metastore_NoSuchObjectException(); - $xfer += $this->o4->read($input); + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -5022,7 +8618,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_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); @@ -5033,16 +8637,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; @@ -5050,45 +8644,45 @@ } -class metastore_ThriftHiveMetastore_drop_table_args { +class metastore_ThriftHiveMetastore_get_partition_by_name_args { static $_TSPEC; - public $dbname = null; - public $name = null; - public $deleteData = 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' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'name', + 'var' => 'tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'part_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_args'; + return 'ThriftHiveMetastore_get_partition_by_name_args'; } public function read($input) @@ -5108,21 +8702,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -5139,20 +8733,20 @@ 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->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->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); - $xfer += $output->writeString($this->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->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); - $xfer += $output->writeBool($this->deleteData); + 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(); @@ -5162,39 +8756,48 @@ } -class metastore_ThriftHiveMetastore_drop_table_result { +class metastore_ThriftHiveMetastore_get_partition_by_name_result { static $_TSPEC; + public $success = null; public $o1 = null; - public $o3 = 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_Partition', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), 2 => array( - 'var' => 'o3', + 'var' => 'o2', '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['o3'])) { - $this->o3 = $vals['o3']; + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_result'; + return 'ThriftHiveMetastore_get_partition_by_name_result'; } public function read($input) @@ -5212,9 +8815,17 @@ } 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_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -5222,8 +8833,8 @@ break; 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); } @@ -5240,15 +8851,23 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_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->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); - $xfer += $this->o3->write($output); + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5258,11 +8877,12 @@ } -class metastore_ThriftHiveMetastore_get_tables_args { +class metastore_ThriftHiveMetastore_get_partitions_args { static $_TSPEC; public $db_name = null; - public $pattern = null; + public $tbl_name = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -5272,23 +8892,30 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'pattern', + '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['pattern'])) { - $this->pattern = $vals['pattern']; + 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_tables_args'; + return 'ThriftHiveMetastore_get_partitions_args'; } public function read($input) @@ -5315,7 +8942,14 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $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); } @@ -5332,15 +8966,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_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->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); - $xfer += $output->writeString($this->pattern); + 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(); @@ -5350,11 +8989,12 @@ } -class metastore_ThriftHiveMetastore_get_tables_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)) { @@ -5362,14 +9002,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', ), ); @@ -5381,11 +9027,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_tables_result'; + return 'ThriftHiveMetastore_get_partitions_result'; } public function read($input) @@ -5406,14 +9055,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size149 = 0; - $_etype152 = 0; - $xfer += $input->readListBegin($_etype152, $_size149); - for ($_i153 = 0; $_i153 < $_size149; ++$_i153) + $_size260 = 0; + $_etype263 = 0; + $xfer += $input->readListBegin($_etype263, $_size260); + for ($_i264 = 0; $_i264 < $_size260; ++$_i264) { - $elem154 = null; - $xfer += $input->readString($elem154); - $this->success []= $elem154; + $elem265 = null; + $elem265 = new metastore_Partition(); + $xfer += $elem265->read($input); + $this->success []= $elem265; } $xfer += $input->readListEnd(); } else { @@ -5422,12 +9072,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; @@ -5440,18 +9098,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_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 $iter155) + foreach ($this->success as $iter266) { - $xfer += $output->writeString($iter155); + $xfer += $iter266->write($output); } } $output->writeListEnd(); @@ -5463,6 +9121,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; @@ -5470,10 +9133,14 @@ } -class metastore_ThriftHiveMetastore_get_all_tables_args { +class metastore_ThriftHiveMetastore_get_partitions_with_auth_args { static $_TSPEC; 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)) { @@ -5482,17 +9149,49 @@ '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['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_all_tables_args'; + return 'ThriftHiveMetastore_get_partitions_with_auth_args'; } public function read($input) @@ -5517,6 +9216,44 @@ $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(); + $_size267 = 0; + $_etype270 = 0; + $xfer += $input->readListBegin($_etype270, $_size267); + for ($_i271 = 0; $_i271 < $_size267; ++$_i271) + { + $elem272 = null; + $xfer += $input->readString($elem272); + $this->group_names []= $elem272; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -5529,12 +9266,44 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args'); + $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 $iter273) + { + $xfer += $output->writeString($iter273); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5542,11 +9311,12 @@ } -class metastore_ThriftHiveMetastore_get_all_tables_result { +class metastore_ThriftHiveMetastore_get_partitions_with_auth_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -5554,14 +9324,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', ), ); @@ -5573,11 +9349,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_result'; + return 'ThriftHiveMetastore_get_partitions_with_auth_result'; } public function read($input) @@ -5598,14 +9377,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size156 = 0; - $_etype159 = 0; - $xfer += $input->readListBegin($_etype159, $_size156); - for ($_i160 = 0; $_i160 < $_size156; ++$_i160) + $_size274 = 0; + $_etype277 = 0; + $xfer += $input->readListBegin($_etype277, $_size274); + for ($_i278 = 0; $_i278 < $_size274; ++$_i278) { - $elem161 = null; - $xfer += $input->readString($elem161); - $this->success []= $elem161; + $elem279 = null; + $elem279 = new metastore_Partition(); + $xfer += $elem279->read($input); + $this->success []= $elem279; } $xfer += $input->readListEnd(); } else { @@ -5614,12 +9394,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; @@ -5632,18 +9420,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_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::LST, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter162) + foreach ($this->success as $iter280) { - $xfer += $output->writeString($iter162); + $xfer += $iter280->write($output); } } $output->writeListEnd(); @@ -5655,6 +9443,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; @@ -5662,37 +9455,45 @@ } -class metastore_ThriftHiveMetastore_get_table_args { +class metastore_ThriftHiveMetastore_get_partition_names_args { static $_TSPEC; - public $dbname = 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' => 'dbname', + '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['dbname'])) { - $this->dbname = $vals['dbname']; + 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_table_args'; + return 'ThriftHiveMetastore_get_partition_names_args'; } public function read($input) @@ -5712,7 +9513,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -5724,6 +9525,13 @@ $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; @@ -5736,10 +9544,10 @@ 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_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) { @@ -5747,6 +9555,11 @@ $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; @@ -5754,11 +9567,10 @@ } -class metastore_ThriftHiveMetastore_get_table_result { +class metastore_ThriftHiveMetastore_get_partition_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -5766,18 +9578,16 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), ); } @@ -5785,9 +9595,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']; } @@ -5795,7 +9602,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_table_result'; + return 'ThriftHiveMetastore_get_partition_names_result'; } public function read($input) @@ -5814,24 +9621,25 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Table(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size281 = 0; + $_etype284 = 0; + $xfer += $input->readListBegin($_etype284, $_size281); + for ($_i285 = 0; $_i285 < $_size281; ++$_i285) + { + $elem286 = null; + $xfer += $input->readString($elem286); + $this->success []= $elem286; + } + $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_NoSuchObjectException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -5849,22 +9657,26 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_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->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter287) + { + $xfer += $output->writeString($iter287); + } + } + $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(); } @@ -5875,18 +9687,19 @@ } -class metastore_ThriftHiveMetastore_alter_table_args { +class metastore_ThriftHiveMetastore_get_partitions_ps_args { static $_TSPEC; - public $dbname = null; + public $db_name = null; public $tbl_name = null; - public $new_tbl = null; + public $part_vals = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( @@ -5894,27 +9707,37 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_tbl', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + '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['dbname'])) { - $this->dbname = $vals['dbname']; + 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['new_tbl'])) { - $this->new_tbl = $vals['new_tbl']; + 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_alter_table_args'; + return 'ThriftHiveMetastore_get_partitions_ps_args'; } public function read($input) @@ -5934,7 +9757,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -5947,9 +9770,25 @@ } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_tbl = new metastore_Table(); - $xfer += $this->new_tbl->read($input); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size288 = 0; + $_etype291 = 0; + $xfer += $input->readListBegin($_etype291, $_size288); + for ($_i292 = 0; $_i292 < $_size288; ++$_i292) + { + $elem293 = null; + $xfer += $input->readString($elem293); + $this->part_vals []= $elem293; + } + $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); } @@ -5966,10 +9805,10 @@ 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->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) { @@ -5977,12 +9816,26 @@ $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_tbl !== null) { - if (!is_object($this->new_tbl)) { + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { 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('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter294) + { + $xfer += $output->writeString($iter294); + } + } + $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(); @@ -5992,39 +9845,43 @@ } -class metastore_ThriftHiveMetastore_alter_table_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::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ), 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_table_result'; + return 'ThriftHiveMetastore_get_partitions_ps_result'; } public function read($input) @@ -6042,18 +9899,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(); + $_size295 = 0; + $_etype298 = 0; + $xfer += $input->readListBegin($_etype298, $_size295); + for ($_i299 = 0; $_i299 < $_size295; ++$_i299) + { + $elem300 = null; + $elem300 = new metastore_Partition(); + $xfer += $elem300->read($input); + $this->success []= $elem300; + } + $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); } @@ -6070,17 +9937,29 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_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)); + { + foreach ($this->success as $iter301) + { + $xfer += $iter301->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; @@ -6088,30 +9967,77 @@ } -class metastore_ThriftHiveMetastore_add_partition_args { +class metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_args { static $_TSPEC; - public $new_part = 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' => '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' => '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['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['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_add_partition_args'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; } public function read($input) @@ -6130,9 +10056,63 @@ 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::LST) { + $this->part_vals = array(); + $_size302 = 0; + $_etype305 = 0; + $xfer += $input->readListBegin($_etype305, $_size302); + for ($_i306 = 0; $_i306 < $_size302; ++$_i306) + { + $elem307 = null; + $xfer += $input->readString($elem307); + $this->part_vals []= $elem307; + } + $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(); + $_size308 = 0; + $_etype311 = 0; + $xfer += $input->readListBegin($_etype311, $_size308); + for ($_i312 = 0; $_i312 < $_size308; ++$_i312) + { + $elem313 = null; + $xfer += $input->readString($elem313); + $this->group_names []= $elem313; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -6149,13 +10129,59 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args'); - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { + $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 $iter314) + { + $xfer += $output->writeString($iter314); + } + } + $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('new_part', TType::STRUCT, 1); - $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter315) + { + $xfer += $output->writeString($iter315); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6165,35 +10191,33 @@ } -class metastore_ThriftHiveMetastore_add_partition_result { +class metastore_ThriftHiveMetastore_get_partitions_ps_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', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), ), 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', ), ); @@ -6208,14 +10232,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_get_partitions_ps_with_auth_result'; } public function read($input) @@ -6234,16 +10255,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(); + $_size316 = 0; + $_etype319 = 0; + $xfer += $input->readListBegin($_etype319, $_size316); + for ($_i320 = 0; $_i320 < $_size316; ++$_i320) + { + $elem321 = null; + $elem321 = new metastore_Partition(); + $xfer += $elem321->read($input); + $this->success []= $elem321; + } + $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); @@ -6251,20 +10282,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; @@ -6277,13 +10300,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_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 $iter322) + { + $xfer += $iter322->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6296,11 +10328,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; @@ -6308,12 +10335,13 @@ } -class metastore_ThriftHiveMetastore_append_partition_args { +class metastore_ThriftHiveMetastore_get_partition_names_ps_args { static $_TSPEC; 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)) { @@ -6334,6 +10362,10 @@ 'type' => TType::STRING, ), ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { @@ -6346,11 +10378,14 @@ 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_append_partition_args'; + return 'ThriftHiveMetastore_get_partition_names_ps_args'; } public function read($input) @@ -6385,20 +10420,27 @@ 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) + $_size323 = 0; + $_etype326 = 0; + $xfer += $input->readListBegin($_etype326, $_size323); + for ($_i327 = 0; $_i327 < $_size323; ++$_i327) { - $elem168 = null; - $xfer += $input->readString($elem168); - $this->part_vals []= $elem168; + $elem328 = null; + $xfer += $input->readString($elem328); + $this->part_vals []= $elem328; } $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; default: $xfer += $input->skip($ftype); break; @@ -6411,7 +10453,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_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); @@ -6430,15 +10472,20 @@ { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter169) + foreach ($this->part_vals as $iter329) { - $xfer += $output->writeString($iter169); + $xfer += $output->writeString($iter329); } } $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(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6446,35 +10493,26 @@ } -class metastore_ThriftHiveMetastore_append_partition_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)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 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', ), ); @@ -6486,17 +10524,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_append_partition_result'; + return 'ThriftHiveMetastore_get_partition_names_ps_result'; } public function read($input) @@ -6515,37 +10547,30 @@ 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(); + $_size330 = 0; + $_etype333 = 0; + $xfer += $input->readListBegin($_etype333, $_size330); + for ($_i334 = 0; $_i334 < $_size330; ++$_i334) + { + $elem335 = null; + $xfer += $input->readString($elem335); + $this->success []= $elem335; + } + $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; @@ -6558,13 +10583,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_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::STRING, count($this->success)); + { + foreach ($this->success as $iter336) + { + $xfer += $output->writeString($iter336); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6572,16 +10606,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; @@ -6589,12 +10613,13 @@ } -class metastore_ThriftHiveMetastore_append_partition_by_name_args { +class metastore_ThriftHiveMetastore_get_partitions_by_filter_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; + public $filter = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6608,9 +10633,13 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', + 'var' => 'filter', 'type' => TType::STRING, ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { @@ -6620,14 +10649,17 @@ 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['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_args'; + return 'ThriftHiveMetastore_get_partitions_by_filter_args'; } public function read($input) @@ -6661,7 +10693,14 @@ break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $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); } @@ -6678,7 +10717,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_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); @@ -6689,9 +10728,14 @@ $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->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(); @@ -6701,36 +10745,34 @@ } -class metastore_ThriftHiveMetastore_append_partition_by_name_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)) { 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_Partition', + ), ), 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', ), ); } @@ -6744,14 +10786,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_partitions_by_filter_result'; } public function read($input) @@ -6770,16 +10809,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(); + $_size337 = 0; + $_etype340 = 0; + $xfer += $input->readListBegin($_etype340, $_size337); + for ($_i341 = 0; $_i341 < $_size337; ++$_i341) + { + $elem342 = null; + $elem342 = new metastore_Partition(); + $xfer += $elem342->read($input); + $this->success []= $elem342; + } + $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); @@ -6787,20 +10836,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; @@ -6813,13 +10854,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_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 $iter343) + { + $xfer += $iter343->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6832,11 +10882,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; @@ -6844,13 +10889,12 @@ } -class metastore_ThriftHiveMetastore_drop_partition_args { +class metastore_ThriftHiveMetastore_alter_partition_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $deleteData = null; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6864,16 +10908,9 @@ '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' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), ); } @@ -6884,17 +10921,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['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_args'; + return 'ThriftHiveMetastore_alter_partition_args'; } public function read($input) @@ -6927,25 +10961,9 @@ } 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::STRUCT) { + $this->new_part = new metastore_Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -6962,7 +10980,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args'); + $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); @@ -6973,26 +10991,12 @@ $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { 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); + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7002,24 +11006,19 @@ } -class metastore_ThriftHiveMetastore_drop_partition_result { +class metastore_ThriftHiveMetastore_alter_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', + 'class' => 'metastore_InvalidOperationException', ), 2 => array( 'var' => 'o2', @@ -7029,9 +11028,6 @@ ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -7042,7 +11038,7 @@ } public function getName() { - return 'ThriftHiveMetastore_drop_partition_result'; + return 'ThriftHiveMetastore_alter_partition_result'; } public function read($input) @@ -7060,16 +11056,9 @@ } 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(); + $this->o1 = new metastore_InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -7095,12 +11084,7 @@ 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(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -7118,53 +11102,37 @@ } -class metastore_ThriftHiveMetastore_drop_partition_by_name_args { +class metastore_ThriftHiveMetastore_get_config_value_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_name = null; - public $deleteData = null; + public $name = null; + public $defaultValue = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_name', + 'var' => 'defaultValue', '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['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_partition_by_name_args'; + return 'ThriftHiveMetastore_get_config_value_args'; } public function read($input) @@ -7184,28 +11152,14 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->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); + $xfer += $input->readString($this->defaultValue); } else { $xfer += $input->skip($ftype); } @@ -7222,25 +11176,15 @@ 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_config_value_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, 4); - $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(); @@ -7250,29 +11194,23 @@ } -class metastore_ThriftHiveMetastore_drop_partition_by_name_result { +class metastore_ThriftHiveMetastore_get_config_value_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::STRING, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_ConfigValSecurityException', ), ); } @@ -7283,14 +11221,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_config_value_result'; } public function read($input) @@ -7309,28 +11244,20 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_ConfigValSecurityException(); $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; @@ -7343,10 +11270,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -7354,11 +11281,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; @@ -7366,49 +11288,29 @@ } -class metastore_ThriftHiveMetastore_get_partition_args { +class metastore_ThriftHiveMetastore_partition_name_to_vals_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_vals = 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_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => 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_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_args'; + return 'ThriftHiveMetastore_partition_name_to_vals_args'; } public function read($input) @@ -7428,31 +11330,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->tbl_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) - { - $elem182 = null; - $xfer += $input->readString($elem182); - $this->part_vals []= $elem182; - } - $xfer += $input->readListEnd(); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -7469,32 +11347,10 @@ public function write($output) { $xfer = 0; - $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 $iter183) - { - $xfer += $output->writeString($iter183); - } - } - $output->writeListEnd(); - } + $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(); @@ -7504,31 +11360,28 @@ } -class metastore_ThriftHiveMetastore_get_partition_result { +class metastore_ThriftHiveMetastore_partition_name_to_vals_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_Partition', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -7538,14 +11391,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_partition_name_to_vals_result'; } public function read($input) @@ -7564,9 +11414,18 @@ 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(); + $_size344 = 0; + $_etype347 = 0; + $xfer += $input->readListBegin($_etype347, $_size344); + for ($_i348 = 0; $_i348 < $_size344; ++$_i348) + { + $elem349 = null; + $xfer += $input->readString($elem349); + $this->success []= $elem349; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7579,14 +11438,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; @@ -7599,13 +11450,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_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::STRING, count($this->success)); + { + foreach ($this->success as $iter350) + { + $xfer += $output->writeString($iter350); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -7613,11 +11473,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; @@ -7625,37 +11480,21 @@ } -class metastore_ThriftHiveMetastore_get_partition_by_name_args { +class metastore_ThriftHiveMetastore_partition_name_to_spec_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']; } @@ -7663,7 +11502,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_args'; + return 'ThriftHiveMetastore_partition_name_to_spec_args'; } public function read($input) @@ -7683,20 +11522,6 @@ { 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); @@ -7714,19 +11539,9 @@ public function write($output) { $xfer = 0; - $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(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args'); if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } @@ -7737,31 +11552,32 @@ } -class metastore_ThriftHiveMetastore_get_partition_by_name_result { +class metastore_ThriftHiveMetastore_partition_name_to_spec_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_Partition', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -7771,14 +11587,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_partition_name_to_spec_result'; } public function read($input) @@ -7797,9 +11610,21 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::MAP) { + $this->success = array(); + $_size351 = 0; + $_ktype352 = 0; + $_vtype353 = 0; + $xfer += $input->readMapBegin($_ktype352, $_vtype353, $_size351); + for ($_i355 = 0; $_i355 < $_size351; ++$_i355) + { + $key356 = ''; + $val357 = ''; + $xfer += $input->readString($key356); + $xfer += $input->readString($val357); + $this->success[$key356] = $val357; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -7812,14 +11637,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; @@ -7832,13 +11649,23 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_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::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); + { + foreach ($this->success as $kiter358 => $viter359) + { + $xfer += $output->writeString($kiter358); + $xfer += $output->writeString($viter359); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -7846,11 +11673,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; @@ -7858,45 +11680,39 @@ } -class metastore_ThriftHiveMetastore_get_partitions_args { +class metastore_ThriftHiveMetastore_add_index_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_parts = -1; + public $new_index = null; + public $index_table = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'index_table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', ), ); } 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['new_index'])) { + $this->new_index = $vals['new_index']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_args'; + return 'ThriftHiveMetastore_add_index_args'; } public function read($input) @@ -7915,22 +11731,17 @@ switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + 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); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRUCT) { + $this->index_table = new metastore_Table(); + $xfer += $this->index_table->read($input); } else { $xfer += $input->skip($ftype); } @@ -7947,20 +11758,21 @@ public function write($output) { $xfer = 0; - $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->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->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); + 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(); @@ -7970,33 +11782,35 @@ } -class metastore_ThriftHiveMetastore_get_partitions_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)) { 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_Index', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -8011,11 +11825,14 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_result'; + return 'ThriftHiveMetastore_add_index_result'; } public function read($input) @@ -8034,26 +11851,16 @@ 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_Index(); + $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_InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -8061,12 +11868,20 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); + $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; @@ -8079,22 +11894,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_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) { @@ -8107,6 +11913,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; @@ -8114,45 +11925,54 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_args { +class metastore_ThriftHiveMetastore_alter_index_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_parts = -1; + public $dbname = null; + public $base_tbl_name = null; + public $idx_name = null; + public $new_idx = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'dbname', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'base_tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'idx_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'new_idx', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + 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['max_parts'])) { - $this->max_parts = $vals['max_parts']; + 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_get_partition_names_args'; + return 'ThriftHiveMetastore_alter_index_args'; } public function read($input) @@ -8172,21 +11992,29 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->dbname); } else { $xfer += $input->skip($ftype); } 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::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->idx_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->new_idx = new metastore_Index(); + $xfer += $this->new_idx->read($input); } else { $xfer += $input->skip($ftype); } @@ -8203,20 +12031,28 @@ public function write($output) { $xfer = 0; - $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->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->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); + 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_idx', TType::STRUCT, 4); + $xfer += $this->new_idx->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8226,24 +12062,21 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_result { +class metastore_ThriftHiveMetastore_alter_index_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, - ), - ), 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', @@ -8251,8 +12084,8 @@ ); } 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']; @@ -8261,7 +12094,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_result'; + return 'ThriftHiveMetastore_alter_index_result'; } public function read($input) @@ -8279,63 +12112,42 @@ } 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(); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidOperationException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + 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_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(); + } + 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_index_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, 1); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -8346,13 +12158,13 @@ } -class metastore_ThriftHiveMetastore_get_partitions_ps_args { +class metastore_ThriftHiveMetastore_drop_index_by_name_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; + public $index_name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -8366,16 +12178,12 @@ '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, ), 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'deleteData', + 'type' => TType::BOOL, ), ); } @@ -8386,17 +12194,17 @@ 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']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_args'; + return 'ThriftHiveMetastore_drop_index_by_name_args'; } public function read($input) @@ -8429,25 +12237,15 @@ } 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(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); } 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->deleteData); } else { $xfer += $input->skip($ftype); } @@ -8464,7 +12262,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); + $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); @@ -8475,26 +12273,14 @@ $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 $iter204) - { - $xfer += $output->writeString($iter204); - } - } - $output->writeListEnd(); - } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_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->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8504,27 +12290,28 @@ } -class metastore_ThriftHiveMetastore_get_partitions_ps_result { +class metastore_ThriftHiveMetastore_drop_index_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::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -8536,11 +12323,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_result'; + return 'ThriftHiveMetastore_drop_index_by_name_result'; } public function read($input) @@ -8559,31 +12349,28 @@ 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); } 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; @@ -8596,22 +12383,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_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) { @@ -8619,6 +12394,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; @@ -8626,13 +12406,12 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_ps_args { +class metastore_ThriftHiveMetastore_get_index_by_name_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; + public $index_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -8646,16 +12425,8 @@ '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' => 'index_name', + 'type' => TType::STRING, ), ); } @@ -8666,17 +12437,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['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_args'; + return 'ThriftHiveMetastore_get_index_by_name_args'; } public function read($input) @@ -8709,25 +12477,8 @@ } 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); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); } else { $xfer += $input->skip($ftype); } @@ -8744,7 +12495,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_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); @@ -8755,26 +12506,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 $iter218) - { - $xfer += $output->writeString($iter218); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + 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(); @@ -8784,28 +12518,31 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_ps_result { +class metastore_ThriftHiveMetastore_get_index_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_Index', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), ); } if (is_array($vals)) { @@ -8815,11 +12552,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_result'; + return 'ThriftHiveMetastore_get_index_by_name_result'; } public function read($input) @@ -8838,18 +12578,9 @@ 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::STRUCT) { + $this->success = new metastore_Index(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -8862,6 +12593,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; @@ -8870,26 +12609,17 @@ } $xfer += $input->readStructEnd(); return $xfer; - } - - public function write($output) { - $xfer = 0; - $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::STRING, count($this->success)); - { - foreach ($this->success as $iter225) - { - $xfer += $output->writeString($iter225); - } - } - $output->writeListEnd(); + } + + public function write($output) { + $xfer = 0; + $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); } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8897,6 +12627,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; @@ -8904,13 +12639,12 @@ } -class metastore_ThriftHiveMetastore_get_partitions_by_filter_args { +class metastore_ThriftHiveMetastore_get_indexes_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $filter = null; - public $max_parts = -1; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -8924,11 +12658,7 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'filter', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'max_parts', + 'var' => 'max_indexes', 'type' => TType::I16, ), ); @@ -8940,17 +12670,14 @@ 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']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_args'; + return 'ThriftHiveMetastore_get_indexes_args'; } public function read($input) @@ -8983,15 +12710,8 @@ } 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); + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -9008,7 +12728,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_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); @@ -9019,14 +12739,9 @@ $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); + 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(); @@ -9036,7 +12751,7 @@ } -class metastore_ThriftHiveMetastore_get_partitions_by_filter_result { +class metastore_ThriftHiveMetastore_get_indexes_result { static $_TSPEC; public $success = null; @@ -9052,18 +12767,18 @@ 'etype' => TType::STRUCT, 'elem' => array( 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'class' => 'metastore_Index', ), ), 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', ), ); } @@ -9081,7 +12796,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_result'; + return 'ThriftHiveMetastore_get_indexes_result'; } public function read($input) @@ -9102,15 +12817,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size226 = 0; - $_etype229 = 0; - $xfer += $input->readListBegin($_etype229, $_size226); - for ($_i230 = 0; $_i230 < $_size226; ++$_i230) + $_size360 = 0; + $_etype363 = 0; + $xfer += $input->readListBegin($_etype363, $_size360); + for ($_i364 = 0; $_i364 < $_size360; ++$_i364) { - $elem231 = null; - $elem231 = new metastore_Partition(); - $xfer += $elem231->read($input); - $this->success []= $elem231; + $elem365 = null; + $elem365 = new metastore_Index(); + $xfer += $elem365->read($input); + $this->success []= $elem365; } $xfer += $input->readListEnd(); } else { @@ -9119,7 +12834,7 @@ 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); @@ -9127,7 +12842,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); @@ -9145,7 +12860,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -9154,9 +12869,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter232) + foreach ($this->success as $iter366) { - $xfer += $iter232->write($output); + $xfer += $iter366->write($output); } } $output->writeListEnd(); @@ -9180,12 +12895,12 @@ } -class metastore_ThriftHiveMetastore_alter_partition_args { +class metastore_ThriftHiveMetastore_get_index_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $new_part = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -9199,9 +12914,8 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -9212,14 +12926,14 @@ if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_args'; + return 'ThriftHiveMetastore_get_index_names_args'; } public function read($input) @@ -9252,9 +12966,8 @@ } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_part = new metastore_Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -9271,7 +12984,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_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); @@ -9282,12 +12995,9 @@ $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('new_part', TType::STRUCT, 3); - $xfer += $this->new_part->write($output); + 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(); @@ -9297,21 +13007,24 @@ } -class metastore_ThriftHiveMetastore_alter_partition_result { +class metastore_ThriftHiveMetastore_get_index_names_result { static $_TSPEC; - public $o1 = null; + public $success = 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', + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), - 2 => array( + 1 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', @@ -9319,8 +13032,8 @@ ); } if (is_array($vals)) { - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; + if (isset($vals['success'])) { + $this->success = $vals['success']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; @@ -9329,7 +13042,7 @@ } public function getName() { - return 'ThriftHiveMetastore_alter_partition_result'; + return 'ThriftHiveMetastore_get_index_names_result'; } public function read($input) @@ -9347,15 +13060,24 @@ } 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(); + $_size367 = 0; + $_etype370 = 0; + $xfer += $input->readListBegin($_etype370, $_size367); + for ($_i371 = 0; $_i371 < $_size367; ++$_i371) + { + $elem372 = null; + $xfer += $input->readString($elem372); + $this->success []= $elem372; + } + $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); @@ -9375,14 +13097,26 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_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 $iter373) + { + $xfer += $output->writeString($iter373); + } + } + $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(); } @@ -9393,37 +13127,30 @@ } -class metastore_ThriftHiveMetastore_get_config_value_args { +class metastore_ThriftHiveMetastore_create_role_args { static $_TSPEC; - public $name = null; - public $defaultValue = null; + public $role = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'defaultValue', - 'type' => TType::STRING, + 'var' => 'role', + 'type' => TType::STRUCT, + 'class' => 'metastore_Role', ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['defaultValue'])) { - $this->defaultValue = $vals['defaultValue']; + if (isset($vals['role'])) { + $this->role = $vals['role']; } } } public function getName() { - return 'ThriftHiveMetastore_get_config_value_args'; + return 'ThriftHiveMetastore_create_role_args'; } public function read($input) @@ -9442,15 +13169,9 @@ 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->defaultValue); + if ($ftype == TType::STRUCT) { + $this->role = new metastore_Role(); + $xfer += $this->role->read($input); } else { $xfer += $input->skip($ftype); } @@ -9467,15 +13188,13 @@ 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->writeFieldEnd(); - } - if ($this->defaultValue !== null) { - $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); - $xfer += $output->writeString($this->defaultValue); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_args'); + if ($this->role !== null) { + if (!is_object($this->role)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('role', TType::STRUCT, 1); + $xfer += $this->role->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9485,7 +13204,7 @@ } -class metastore_ThriftHiveMetastore_get_config_value_result { +class metastore_ThriftHiveMetastore_create_role_result { static $_TSPEC; public $success = null; @@ -9496,12 +13215,12 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRING, + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_ConfigValSecurityException', + 'class' => 'metastore_MetaException', ), ); } @@ -9516,7 +13235,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_config_value_result'; + return 'ThriftHiveMetastore_create_role_result'; } public function read($input) @@ -9535,15 +13254,15 @@ switch ($fid) { case 0: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->success); + 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_ConfigValSecurityException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9561,10 +13280,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::STRING, 0); - $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9579,29 +13298,29 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_vals_args { +class metastore_ThriftHiveMetastore_drop_role_args { static $_TSPEC; - public $part_name = null; + public $role_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_name', + 'var' => 'role_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_args'; + return 'ThriftHiveMetastore_drop_role_args'; } public function read($input) @@ -9621,7 +13340,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } @@ -9638,10 +13357,10 @@ 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_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(); } $xfer += $output->writeFieldStop(); @@ -9651,7 +13370,7 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_vals_result { +class metastore_ThriftHiveMetastore_drop_role_result { static $_TSPEC; public $success = null; @@ -9662,11 +13381,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', @@ -9686,7 +13401,7 @@ } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_result'; + return 'ThriftHiveMetastore_drop_role_result'; } public function read($input) @@ -9705,18 +13420,8 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size233 = 0; - $_etype236 = 0; - $xfer += $input->readListBegin($_etype236, $_size233); - for ($_i237 = 0; $_i237 < $_size233; ++$_i237) - { - $elem238 = null; - $xfer += $input->readString($elem238); - $this->success []= $elem238; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -9741,22 +13446,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_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 $iter239) - { - $xfer += $output->writeString($iter239); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9771,29 +13464,69 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_spec_args { +class metastore_ThriftHiveMetastore_grant_role_args { static $_TSPEC; - public $part_name = null; + public $role_name = null; + public $principal_name = null; + public $principal_type = null; + public $grantor = null; + public $grantorType = null; + public $grant_option = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_name', + 'var' => 'role_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principal_type', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'grantor', 'type' => TType::STRING, ), + 5 => array( + 'var' => 'grantorType', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grant_option', + 'type' => TType::BOOL, + ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['grantorType'])) { + $this->grantorType = $vals['grantorType']; + } + if (isset($vals['grant_option'])) { + $this->grant_option = $vals['grant_option']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_args'; + return 'ThriftHiveMetastore_grant_role_args'; } public function read($input) @@ -9813,7 +13546,42 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->role_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->grant_option); } else { $xfer += $input->skip($ftype); } @@ -9830,10 +13598,35 @@ 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_grant_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->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 2); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 3); + $xfer += $output->writeI32($this->principal_type); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 4); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorType !== null) { + $xfer += $output->writeFieldBegin('grantorType', TType::I32, 5); + $xfer += $output->writeI32($this->grantorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grant_option !== null) { + $xfer += $output->writeFieldBegin('grant_option', TType::BOOL, 6); + $xfer += $output->writeBool($this->grant_option); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9843,7 +13636,7 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_spec_result { +class metastore_ThriftHiveMetastore_grant_role_result { static $_TSPEC; public $success = null; @@ -9854,15 +13647,7 @@ 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::BOOL, ), 1 => array( 'var' => 'o1', @@ -9882,7 +13667,7 @@ } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_result'; + return 'ThriftHiveMetastore_grant_role_result'; } public function read($input) @@ -9901,21 +13686,8 @@ switch ($fid) { case 0: - if ($ftype == TType::MAP) { - $this->success = array(); - $_size240 = 0; - $_ktype241 = 0; - $_vtype242 = 0; - $xfer += $input->readMapBegin($_ktype241, $_vtype242, $_size240); - for ($_i244 = 0; $_i244 < $_size240; ++$_i244) - { - $key245 = ''; - $val246 = ''; - $xfer += $input->readString($key245); - $xfer += $input->readString($val246); - $this->success[$key245] = $val246; - } - $xfer += $input->readMapEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -9940,23 +13712,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_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::MAP, 0); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); - { - foreach ($this->success as $kiter247 => $viter248) - { - $xfer += $output->writeString($kiter247); - $xfer += $output->writeString($viter248); - } - } - $output->writeMapEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9971,39 +13730,45 @@ } -class metastore_ThriftHiveMetastore_add_index_args { +class metastore_ThriftHiveMetastore_revoke_role_args { static $_TSPEC; - public $new_index = null; - public $index_table = null; + public $role_name = null; + public $principal_name = null; + public $principal_type = 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' => 'role_name', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'index_table', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principal_type', + 'type' => TType::I32, ), ); } if (is_array($vals)) { - if (isset($vals['new_index'])) { - $this->new_index = $vals['new_index']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; } - if (isset($vals['index_table'])) { - $this->index_table = $vals['index_table']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; } } } public function getName() { - return 'ThriftHiveMetastore_add_index_args'; + return 'ThriftHiveMetastore_revoke_role_args'; } public function read($input) @@ -10022,17 +13787,22 @@ 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->role_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::STRING) { + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); } else { $xfer += $input->skip($ftype); } @@ -10049,21 +13819,20 @@ 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_revoke_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->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->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 2); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 3); + $xfer += $output->writeI32($this->principal_type); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10073,35 +13842,22 @@ } -class metastore_ThriftHiveMetastore_add_index_result { +class metastore_ThriftHiveMetastore_revoke_role_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', + 'type' => TType::BOOL, ), 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', ), ); @@ -10113,17 +13869,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_revoke_role_result'; } public function read($input) @@ -10142,37 +13892,20 @@ 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); } 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; @@ -10185,13 +13918,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_role_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) { @@ -10199,16 +13929,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; @@ -10216,54 +13936,37 @@ } -class metastore_ThriftHiveMetastore_alter_index_args { +class metastore_ThriftHiveMetastore_list_roles_args { static $_TSPEC; - public $dbname = null; - public $base_tbl_name = null; - public $idx_name = null; - public $new_idx = null; + public $principal_name = null; + public $principal_type = 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, - ), - 3 => array( - 'var' => 'idx_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'new_idx', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', + 'var' => 'principal_type', + 'type' => TType::I32, ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['base_tbl_name'])) { - $this->base_tbl_name = $vals['base_tbl_name']; - } - if (isset($vals['idx_name'])) { - $this->idx_name = $vals['idx_name']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; } - if (isset($vals['new_idx'])) { - $this->new_idx = $vals['new_idx']; + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_args'; + return 'ThriftHiveMetastore_list_roles_args'; } public function read($input) @@ -10274,38 +13977,23 @@ $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->base_tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->idx_name); + $xfer += $input->readString($this->principal_name); } else { $xfer += $input->skip($ftype); } break; - case 4: - if ($ftype == TType::STRUCT) { - $this->new_idx = new metastore_Index(); - $xfer += $this->new_idx->read($input); + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); } else { $xfer += $input->skip($ftype); } @@ -10322,28 +14010,15 @@ 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->writeFieldEnd(); - } - 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->idx_name !== null) { - $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); - $xfer += $output->writeString($this->idx_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->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->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 2); + $xfer += $output->writeI32($this->principal_type); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10353,39 +14028,43 @@ } -class metastore_ThriftHiveMetastore_alter_index_result { +class metastore_ThriftHiveMetastore_list_roles_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_Role', + ), + ), 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_roles_result'; } public function read($input) @@ -10403,18 +14082,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(); + $_size374 = 0; + $_etype377 = 0; + $xfer += $input->readListBegin($_etype377, $_size374); + for ($_i378 = 0; $_i378 < $_size374; ++$_i378) + { + $elem379 = null; + $elem379 = new metastore_Role(); + $xfer += $elem379->read($input); + $this->success []= $elem379; + } + $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); } @@ -10431,17 +14120,29 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_roles_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 $iter380) + { + $xfer += $iter380->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; @@ -10449,53 +14150,50 @@ } -class metastore_ThriftHiveMetastore_drop_index_by_name_args { +class metastore_ThriftHiveMetastore_get_privilege_set_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $index_name = null; - public $deleteData = null; + public $hiveObject = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => 'metastore_HiveObjectRef', ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'index_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + '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['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_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_index_by_name_args'; + return 'ThriftHiveMetastore_get_privilege_set_args'; } public function read($input) @@ -10514,29 +14212,33 @@ switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + if ($ftype == TType::STRUCT) { + $this->hiveObject = new metastore_HiveObjectRef(); + $xfer += $this->hiveObject->read($input); } 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->index_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(); + $_size381 = 0; + $_etype384 = 0; + $xfer += $input->readListBegin($_etype384, $_size381); + for ($_i385 = 0; $_i385 < $_size381; ++$_i385) + { + $elem386 = null; + $xfer += $input->readString($elem386); + $this->group_names []= $elem386; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -10553,25 +14255,35 @@ public function write($output) { $xfer = 0; - $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->writeStructBegin('ThriftHiveMetastore_get_privilege_set_args'); + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 1); + $xfer += $this->hiveObject->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_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->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, 3); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter387) + { + $xfer += $output->writeString($iter387); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10581,28 +14293,23 @@ } -class metastore_ThriftHiveMetastore_drop_index_by_name_result { +class metastore_ThriftHiveMetastore_get_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', ), ); @@ -10614,14 +14321,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_get_privilege_set_result'; } public function read($input) @@ -10640,28 +14344,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; @@ -10674,10 +14371,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_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) { @@ -10685,11 +14385,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; @@ -10697,45 +14392,46 @@ } -class metastore_ThriftHiveMetastore_get_index_by_name_args { +class metastore_ThriftHiveMetastore_list_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $index_name = null; + public $principal_name = null; + public $principal_type = null; + public $hiveObject = 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' => 'principal_type', + 'type' => TType::I32, ), 3 => array( - 'var' => 'index_name', - 'type' => TType::STRING, + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => 'metastore_HiveObjectRef', ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['principal_type'])) { + $this->principal_type = $vals['principal_type']; } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_name']; + if (isset($vals['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_args'; + return 'ThriftHiveMetastore_list_privileges_args'; } public function read($input) @@ -10755,21 +14451,22 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->principal_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principal_type); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->index_name); + if ($ftype == TType::STRUCT) { + $this->hiveObject = new metastore_HiveObjectRef(); + $xfer += $this->hiveObject->read($input); } else { $xfer += $input->skip($ftype); } @@ -10786,20 +14483,23 @@ 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_list_privileges_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->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->principal_type !== null) { + $xfer += $output->writeFieldBegin('principal_type', TType::I32, 2); + $xfer += $output->writeI32($this->principal_type); $xfer += $output->writeFieldEnd(); } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_name); + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 3); + $xfer += $this->hiveObject->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10809,31 +14509,29 @@ } -class metastore_ThriftHiveMetastore_get_index_by_name_result { +class metastore_ThriftHiveMetastore_list_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::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_HiveObjectPrivilege', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -10843,14 +14541,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_list_privileges_result'; } public function read($input) @@ -10869,9 +14564,19 @@ 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(); + $_size388 = 0; + $_etype391 = 0; + $xfer += $input->readListBegin($_etype391, $_size388); + for ($_i392 = 0; $_i392 < $_size388; ++$_i392) + { + $elem393 = null; + $elem393 = new metastore_HiveObjectPrivilege(); + $xfer += $elem393->read($input); + $this->success []= $elem393; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -10884,14 +14589,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; @@ -10904,13 +14601,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_privileges_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 $iter394) + { + $xfer += $iter394->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10918,11 +14624,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; @@ -10930,45 +14631,30 @@ } -class metastore_ThriftHiveMetastore_get_indexes_args { +class metastore_ThriftHiveMetastore_grant_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_indexes = -1; + public $privileges = 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' => 'max_indexes', - 'type' => TType::I16, + '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['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; } } } public function getName() { - return 'ThriftHiveMetastore_get_indexes_args'; + return 'ThriftHiveMetastore_grant_privileges_args'; } public function read($input) @@ -10987,22 +14673,9 @@ 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_indexes); + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrivilegeBag(); + $xfer += $this->privileges->read($input); } else { $xfer += $input->skip($ftype); } @@ -11019,20 +14692,13 @@ 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->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_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_privileges_args'); + 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, 1); + $xfer += $this->privileges->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -11042,33 +14708,22 @@ } -class metastore_ThriftHiveMetastore_get_indexes_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::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', ), ); @@ -11080,14 +14735,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_grant_privileges_result'; } public function read($input) @@ -11106,39 +14758,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; @@ -11151,22 +14784,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_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) { @@ -11174,11 +14795,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; @@ -11186,45 +14802,30 @@ } -class metastore_ThriftHiveMetastore_get_index_names_args { +class metastore_ThriftHiveMetastore_revoke_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_indexes = -1; + public $privileges = 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' => 'max_indexes', - 'type' => TType::I16, + '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['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_names_args'; + return 'ThriftHiveMetastore_revoke_privileges_args'; } public function read($input) @@ -11243,22 +14844,9 @@ 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_indexes); + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrivilegeBag(); + $xfer += $this->privileges->read($input); } else { $xfer += $input->skip($ftype); } @@ -11275,20 +14863,13 @@ 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->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_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_privileges_args'); + 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, 1); + $xfer += $this->privileges->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -11298,25 +14879,21 @@ } -class metastore_ThriftHiveMetastore_get_index_names_result { +class metastore_ThriftHiveMetastore_revoke_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', ), @@ -11326,14 +14903,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_privileges_result'; } public function read($input) @@ -11352,26 +14929,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); } @@ -11388,27 +14955,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_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::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 1057802) +++ metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php (working copy) @@ -8,6 +8,46 @@ include_once $GLOBALS['THRIFT_ROOT'].'/packages/fb303/fb303_types.php'; +$GLOBALS['metastore_E_HiveObjectType'] = array( + 'GLOBAL' => 1, + 'DATABASE' => 2, + 'TABLE' => 3, + 'PARTITION' => 4, + 'COLUMN' => 5, +); + +final class metastore_HiveObjectType { + const GLOBAL = 1; + const DATABASE = 2; + const TABLE = 3; + const PARTITION = 4; + const COLUMN = 5; + static public $__names = array( + 1 => 'GLOBAL', + 2 => 'DATABASE', + 3 => 'TABLE', + 4 => 'PARTITION', + 5 => 'COLUMN', + ); +} + +$GLOBALS['metastore_E_PrincipalType'] = array( + 'USER' => 1, + 'ROLE' => 2, + 'GROUP' => 3, +); + +final class metastore_PrincipalType { + const USER = 1; + const ROLE = 2; + const GROUP = 3; + static public $__names = array( + 1 => 'USER', + 2 => 'ROLE', + 3 => 'GROUP', + ); +} + class metastore_Version { static $_TSPEC; @@ -82,15 +122,859 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Version'); - if ($this->version !== null) { - $xfer += $output->writeFieldBegin('version', TType::STRING, 1); - $xfer += $output->writeString($this->version); - $xfer += $output->writeFieldEnd(); - } - if ($this->comments !== null) { - $xfer += $output->writeFieldBegin('comments', TType::STRING, 2); - $xfer += $output->writeString($this->comments); + $xfer += $output->writeStructBegin('Version'); + if ($this->version !== null) { + $xfer += $output->writeFieldBegin('version', TType::STRING, 1); + $xfer += $output->writeString($this->version); + $xfer += $output->writeFieldEnd(); + } + if ($this->comments !== null) { + $xfer += $output->writeFieldBegin('comments', TType::STRING, 2); + $xfer += $output->writeString($this->comments); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_FieldSchema { + static $_TSPEC; + + public $name = null; + public $type = null; + public $comment = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'comment', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['comment'])) { + $this->comment = $vals['comment']; + } + } + } + + public function getName() { + return 'FieldSchema'; + } + + 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->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->comment); + } 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('FieldSchema'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 2); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->comment !== null) { + $xfer += $output->writeFieldBegin('comment', TType::STRING, 3); + $xfer += $output->writeString($this->comment); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Type { + static $_TSPEC; + + public $name = null; + public $type1 = null; + public $type2 = null; + public $fields = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'type1', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'type2', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'fields', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['type1'])) { + $this->type1 = $vals['type1']; + } + if (isset($vals['type2'])) { + $this->type2 = $vals['type2']; + } + if (isset($vals['fields'])) { + $this->fields = $vals['fields']; + } + } + } + + public function getName() { + return 'Type'; + } + + 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->type1); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type2); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->fields = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $elem5 = new metastore_FieldSchema(); + $xfer += $elem5->read($input); + $this->fields []= $elem5; + } + $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('Type'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->type1 !== null) { + $xfer += $output->writeFieldBegin('type1', TType::STRING, 2); + $xfer += $output->writeString($this->type1); + $xfer += $output->writeFieldEnd(); + } + if ($this->type2 !== null) { + $xfer += $output->writeFieldBegin('type2', TType::STRING, 3); + $xfer += $output->writeString($this->type2); + $xfer += $output->writeFieldEnd(); + } + if ($this->fields !== null) { + if (!is_array($this->fields)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fields', TType::LST, 4); + { + $output->writeListBegin(TType::STRUCT, count($this->fields)); + { + foreach ($this->fields as $iter6) + { + $xfer += $iter6->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_HiveObjectRef { + static $_TSPEC; + + public $objectType = null; + public $dbName = null; + public $objectName = null; + public $partValues = null; + public $columnName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'objectType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'objectName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partValues', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'columnName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['objectType'])) { + $this->objectType = $vals['objectType']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['objectName'])) { + $this->objectName = $vals['objectName']; + } + if (isset($vals['partValues'])) { + $this->partValues = $vals['partValues']; + } + if (isset($vals['columnName'])) { + $this->columnName = $vals['columnName']; + } + } + } + + public function getName() { + return 'HiveObjectRef'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->objectType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->objectName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->partValues = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->partValues []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->columnName); + } 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('HiveObjectRef'); + if ($this->objectType !== null) { + $xfer += $output->writeFieldBegin('objectType', TType::I32, 1); + $xfer += $output->writeI32($this->objectType); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->objectName !== null) { + $xfer += $output->writeFieldBegin('objectName', TType::STRING, 3); + $xfer += $output->writeString($this->objectName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partValues !== null) { + if (!is_array($this->partValues)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partValues', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->partValues)); + { + foreach ($this->partValues as $iter13) + { + $xfer += $output->writeString($iter13); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columnName !== null) { + $xfer += $output->writeFieldBegin('columnName', TType::STRING, 5); + $xfer += $output->writeString($this->columnName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_PrivilegeGrantInfo { + static $_TSPEC; + + public $privilege = null; + public $createTime = null; + public $grantor = null; + public $grantorType = null; + public $grantOption = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privilege', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'grantorType', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'grantOption', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privilege'])) { + $this->privilege = $vals['privilege']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['grantorType'])) { + $this->grantorType = $vals['grantorType']; + } + if (isset($vals['grantOption'])) { + $this->grantOption = $vals['grantOption']; + } + } + } + + public function getName() { + return 'PrivilegeGrantInfo'; + } + + 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->privilege); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->grantorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->grantOption); + } 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('PrivilegeGrantInfo'); + if ($this->privilege !== null) { + $xfer += $output->writeFieldBegin('privilege', TType::STRING, 1); + $xfer += $output->writeString($this->privilege); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 3); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantorType !== null) { + $xfer += $output->writeFieldBegin('grantorType', TType::I32, 4); + $xfer += $output->writeI32($this->grantorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantOption !== null) { + $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 5); + $xfer += $output->writeBool($this->grantOption); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_HiveObjectPrivilege { + static $_TSPEC; + + public $hiveObject = null; + public $principalName = null; + public $principalType = null; + public $grantInfo = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'hiveObject', + 'type' => TType::STRUCT, + 'class' => 'metastore_HiveObjectRef', + ), + 2 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'principalType', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'grantInfo', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrivilegeGrantInfo', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['hiveObject'])) { + $this->hiveObject = $vals['hiveObject']; + } + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['principalType'])) { + $this->principalType = $vals['principalType']; + } + if (isset($vals['grantInfo'])) { + $this->grantInfo = $vals['grantInfo']; + } + } + } + + public function getName() { + return 'HiveObjectPrivilege'; + } + + 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->hiveObject = new metastore_HiveObjectRef(); + $xfer += $this->hiveObject->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->principalType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->grantInfo = new metastore_PrivilegeGrantInfo(); + $xfer += $this->grantInfo->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('HiveObjectPrivilege'); + if ($this->hiveObject !== null) { + if (!is_object($this->hiveObject)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 1); + $xfer += $this->hiveObject->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 2); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->principalType !== null) { + $xfer += $output->writeFieldBegin('principalType', TType::I32, 3); + $xfer += $output->writeI32($this->principalType); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantInfo !== null) { + if (!is_object($this->grantInfo)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('grantInfo', TType::STRUCT, 4); + $xfer += $this->grantInfo->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_PrivilegeBag { + static $_TSPEC; + + public $privileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'privileges', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_HiveObjectPrivilege', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + } + } + + 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::LST) { + $this->privileges = array(); + $_size14 = 0; + $_etype17 = 0; + $xfer += $input->readListBegin($_etype17, $_size14); + for ($_i18 = 0; $_i18 < $_size14; ++$_i18) + { + $elem19 = null; + $elem19 = new metastore_HiveObjectPrivilege(); + $xfer += $elem19->read($input); + $this->privileges []= $elem19; + } + $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->privileges !== null) { + if (!is_array($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->privileges)); + { + foreach ($this->privileges as $iter20) + { + $xfer += $iter20->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -100,45 +984,84 @@ } -class metastore_FieldSchema { +class metastore_PrincipalPrivilegeSet { static $_TSPEC; - public $name = null; - public $type = null; - public $comment = 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::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_PrivilegeGrantInfo', + ), + ), ), 2 => array( - 'var' => 'type', - 'type' => TType::STRING, + 'var' => 'groupPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_PrivilegeGrantInfo', + ), + ), ), 3 => array( - 'var' => 'comment', - 'type' => TType::STRING, + 'var' => 'rolePrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_PrivilegeGrantInfo', + ), + ), ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['userPrivileges'])) { + $this->userPrivileges = $vals['userPrivileges']; } - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['groupPrivileges'])) { + $this->groupPrivileges = $vals['groupPrivileges']; } - if (isset($vals['comment'])) { - $this->comment = $vals['comment']; + if (isset($vals['rolePrivileges'])) { + $this->rolePrivileges = $vals['rolePrivileges']; } } } public function getName() { - return 'FieldSchema'; + return 'PrincipalPrivilegeSet'; } public function read($input) @@ -157,22 +1080,94 @@ switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + if ($ftype == TType::MAP) { + $this->userPrivileges = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) + { + $key26 = ''; + $val27 = array(); + $xfer += $input->readString($key26); + $val27 = array(); + $_size28 = 0; + $_etype31 = 0; + $xfer += $input->readListBegin($_etype31, $_size28); + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + { + $elem33 = null; + $elem33 = new metastore_PrivilegeGrantInfo(); + $xfer += $elem33->read($input); + $val27 []= $elem33; + } + $xfer += $input->readListEnd(); + $this->userPrivileges[$key26] = $val27; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); + if ($ftype == TType::MAP) { + $this->groupPrivileges = array(); + $_size34 = 0; + $_ktype35 = 0; + $_vtype36 = 0; + $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34); + for ($_i38 = 0; $_i38 < $_size34; ++$_i38) + { + $key39 = ''; + $val40 = array(); + $xfer += $input->readString($key39); + $val40 = array(); + $_size41 = 0; + $_etype44 = 0; + $xfer += $input->readListBegin($_etype44, $_size41); + for ($_i45 = 0; $_i45 < $_size41; ++$_i45) + { + $elem46 = null; + $elem46 = new metastore_PrivilegeGrantInfo(); + $xfer += $elem46->read($input); + $val40 []= $elem46; + } + $xfer += $input->readListEnd(); + $this->groupPrivileges[$key39] = $val40; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->comment); + if ($ftype == TType::MAP) { + $this->rolePrivileges = array(); + $_size47 = 0; + $_ktype48 = 0; + $_vtype49 = 0; + $xfer += $input->readMapBegin($_ktype48, $_vtype49, $_size47); + for ($_i51 = 0; $_i51 < $_size47; ++$_i51) + { + $key52 = ''; + $val53 = array(); + $xfer += $input->readString($key52); + $val53 = array(); + $_size54 = 0; + $_etype57 = 0; + $xfer += $input->readListBegin($_etype57, $_size54); + for ($_i58 = 0; $_i58 < $_size54; ++$_i58) + { + $elem59 = null; + $elem59 = new metastore_PrivilegeGrantInfo(); + $xfer += $elem59->read($input); + $val53 []= $elem59; + } + $xfer += $input->readListEnd(); + $this->rolePrivileges[$key52] = $val53; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -189,20 +1184,86 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('FieldSchema'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $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::LST, count($this->userPrivileges)); + { + foreach ($this->userPrivileges as $kiter60 => $viter61) + { + $xfer += $output->writeString($kiter60); + { + $output->writeListBegin(TType::STRUCT, count($viter61)); + { + foreach ($viter61 as $iter62) + { + $xfer += $iter62->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 2); - $xfer += $output->writeString($this->type); + 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::LST, count($this->groupPrivileges)); + { + foreach ($this->groupPrivileges as $kiter63 => $viter64) + { + $xfer += $output->writeString($kiter63); + { + $output->writeListBegin(TType::STRUCT, count($viter64)); + { + foreach ($viter64 as $iter65) + { + $xfer += $iter65->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->comment !== null) { - $xfer += $output->writeFieldBegin('comment', TType::STRING, 3); - $xfer += $output->writeString($this->comment); + if ($this->rolePrivileges !== null) { + if (!is_array($this->rolePrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rolePrivileges', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::LST, count($this->rolePrivileges)); + { + foreach ($this->rolePrivileges as $kiter66 => $viter67) + { + $xfer += $output->writeString($kiter66); + { + $output->writeListBegin(TType::STRUCT, count($viter67)); + { + foreach ($viter67 as $iter68) + { + $xfer += $iter68->write($output); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -212,58 +1273,45 @@ } -class metastore_Type { +class metastore_Role { static $_TSPEC; - public $name = null; - public $type1 = null; - public $type2 = null; - public $fields = null; + public $roleName = null; + public $createTime = null; + public $ownerName = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'roleName', 'type' => TType::STRING, ), 2 => array( - 'var' => 'type1', - 'type' => TType::STRING, + 'var' => 'createTime', + 'type' => TType::I32, ), 3 => array( - 'var' => 'type2', + 'var' => 'ownerName', 'type' => TType::STRING, ), - 4 => array( - 'var' => 'fields', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), - ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['type1'])) { - $this->type1 = $vals['type1']; + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; } - if (isset($vals['type2'])) { - $this->type2 = $vals['type2']; + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; } - if (isset($vals['fields'])) { - $this->fields = $vals['fields']; + if (isset($vals['ownerName'])) { + $this->ownerName = $vals['ownerName']; } } } public function getName() { - return 'Type'; + return 'Role'; } public function read($input) @@ -283,39 +1331,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->roleName); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type1); + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type2); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->fields = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) - { - $elem5 = null; - $elem5 = new metastore_FieldSchema(); - $xfer += $elem5->read($input); - $this->fields []= $elem5; - } - $xfer += $input->readListEnd(); + $xfer += $input->readString($this->ownerName); } else { $xfer += $input->skip($ftype); } @@ -332,37 +1362,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Type'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->type1 !== null) { - $xfer += $output->writeFieldBegin('type1', TType::STRING, 2); - $xfer += $output->writeString($this->type1); + $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->type2 !== null) { - $xfer += $output->writeFieldBegin('type2', TType::STRING, 3); - $xfer += $output->writeString($this->type2); + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); + $xfer += $output->writeI32($this->createTime); $xfer += $output->writeFieldEnd(); } - if ($this->fields !== null) { - if (!is_array($this->fields)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fields', TType::LST, 4); - { - $output->writeListBegin(TType::STRUCT, count($this->fields)); - { - foreach ($this->fields as $iter6) - { - $xfer += $iter6->write($output); - } - } - $output->writeListEnd(); - } + if ($this->ownerName !== null) { + $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 3); + $xfer += $output->writeString($this->ownerName); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -379,6 +1392,7 @@ public $description = null; public $locationUri = null; public $parameters = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -407,6 +1421,11 @@ 'type' => TType::STRING, ), ), + 5 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -422,6 +1441,9 @@ if (isset($vals['parameters'])) { $this->parameters = $vals['parameters']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -468,23 +1490,31 @@ 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) + $_size69 = 0; + $_ktype70 = 0; + $_vtype71 = 0; + $xfer += $input->readMapBegin($_ktype70, $_vtype71, $_size69); + for ($_i73 = 0; $_i73 < $_size69; ++$_i73) { - $key12 = ''; - $val13 = ''; - $xfer += $input->readString($key12); - $xfer += $input->readString($val13); - $this->parameters[$key12] = $val13; + $key74 = ''; + $val75 = ''; + $xfer += $input->readString($key74); + $xfer += $input->readString($val75); + $this->parameters[$key74] = $val75; } $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; @@ -521,16 +1551,24 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter14 => $viter15) + foreach ($this->parameters as $kiter76 => $viter77) { - $xfer += $output->writeString($kiter14); - $xfer += $output->writeString($viter15); + $xfer += $output->writeString($kiter76); + $xfer += $output->writeString($viter77); } } $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; @@ -619,17 +1657,17 @@ case 3: 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) + $_size78 = 0; + $_ktype79 = 0; + $_vtype80 = 0; + $xfer += $input->readMapBegin($_ktype79, $_vtype80, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) { - $key21 = ''; - $val22 = ''; - $xfer += $input->readString($key21); - $xfer += $input->readString($val22); - $this->parameters[$key21] = $val22; + $key83 = ''; + $val84 = ''; + $xfer += $input->readString($key83); + $xfer += $input->readString($val84); + $this->parameters[$key83] = $val84; } $xfer += $input->readMapEnd(); } else { @@ -667,10 +1705,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter23 => $viter24) + foreach ($this->parameters as $kiter85 => $viter86) { - $xfer += $output->writeString($kiter23); - $xfer += $output->writeString($viter24); + $xfer += $output->writeString($kiter85); + $xfer += $output->writeString($viter86); } } $output->writeMapEnd(); @@ -914,15 +1952,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) + $_size87 = 0; + $_etype90 = 0; + $xfer += $input->readListBegin($_etype90, $_size87); + for ($_i91 = 0; $_i91 < $_size87; ++$_i91) { - $elem30 = null; - $elem30 = new metastore_FieldSchema(); - $xfer += $elem30->read($input); - $this->cols []= $elem30; + $elem92 = null; + $elem92 = new metastore_FieldSchema(); + $xfer += $elem92->read($input); + $this->cols []= $elem92; } $xfer += $input->readListEnd(); } else { @@ -975,14 +2013,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) + $_size93 = 0; + $_etype96 = 0; + $xfer += $input->readListBegin($_etype96, $_size93); + for ($_i97 = 0; $_i97 < $_size93; ++$_i97) { - $elem36 = null; - $xfer += $input->readString($elem36); - $this->bucketCols []= $elem36; + $elem98 = null; + $xfer += $input->readString($elem98); + $this->bucketCols []= $elem98; } $xfer += $input->readListEnd(); } else { @@ -992,15 +2030,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) + $_size99 = 0; + $_etype102 = 0; + $xfer += $input->readListBegin($_etype102, $_size99); + for ($_i103 = 0; $_i103 < $_size99; ++$_i103) { - $elem42 = null; - $elem42 = new metastore_Order(); - $xfer += $elem42->read($input); - $this->sortCols []= $elem42; + $elem104 = null; + $elem104 = new metastore_Order(); + $xfer += $elem104->read($input); + $this->sortCols []= $elem104; } $xfer += $input->readListEnd(); } else { @@ -1010,17 +2048,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) + $_size105 = 0; + $_ktype106 = 0; + $_vtype107 = 0; + $xfer += $input->readMapBegin($_ktype106, $_vtype107, $_size105); + for ($_i109 = 0; $_i109 < $_size105; ++$_i109) { - $key48 = ''; - $val49 = ''; - $xfer += $input->readString($key48); - $xfer += $input->readString($val49); - $this->parameters[$key48] = $val49; + $key110 = ''; + $val111 = ''; + $xfer += $input->readString($key110); + $xfer += $input->readString($val111); + $this->parameters[$key110] = $val111; } $xfer += $input->readMapEnd(); } else { @@ -1048,9 +2086,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->cols)); { - foreach ($this->cols as $iter50) + foreach ($this->cols as $iter112) { - $xfer += $iter50->write($output); + $xfer += $iter112->write($output); } } $output->writeListEnd(); @@ -1098,9 +2136,9 @@ { $output->writeListBegin(TType::STRING, count($this->bucketCols)); { - foreach ($this->bucketCols as $iter51) + foreach ($this->bucketCols as $iter113) { - $xfer += $output->writeString($iter51); + $xfer += $output->writeString($iter113); } } $output->writeListEnd(); @@ -1115,9 +2153,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->sortCols)); { - foreach ($this->sortCols as $iter52) + foreach ($this->sortCols as $iter114) { - $xfer += $iter52->write($output); + $xfer += $iter114->write($output); } } $output->writeListEnd(); @@ -1132,10 +2170,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter53 => $viter54) + foreach ($this->parameters as $kiter115 => $viter116) { - $xfer += $output->writeString($kiter53); - $xfer += $output->writeString($viter54); + $xfer += $output->writeString($kiter115); + $xfer += $output->writeString($viter116); } } $output->writeMapEnd(); @@ -1164,6 +2202,7 @@ public $viewOriginalText = null; public $viewExpandedText = null; public $tableType = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1230,6 +2269,11 @@ 'var' => 'tableType', 'type' => TType::STRING, ), + 13 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -1269,6 +2313,9 @@ if (isset($vals['tableType'])) { $this->tableType = $vals['tableType']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -1344,15 +2391,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) + $_size117 = 0; + $_etype120 = 0; + $xfer += $input->readListBegin($_etype120, $_size117); + for ($_i121 = 0; $_i121 < $_size117; ++$_i121) { - $elem60 = null; - $elem60 = new metastore_FieldSchema(); - $xfer += $elem60->read($input); - $this->partitionKeys []= $elem60; + $elem122 = null; + $elem122 = new metastore_FieldSchema(); + $xfer += $elem122->read($input); + $this->partitionKeys []= $elem122; } $xfer += $input->readListEnd(); } else { @@ -1362,17 +2409,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) + $_size123 = 0; + $_ktype124 = 0; + $_vtype125 = 0; + $xfer += $input->readMapBegin($_ktype124, $_vtype125, $_size123); + for ($_i127 = 0; $_i127 < $_size123; ++$_i127) { - $key66 = ''; - $val67 = ''; - $xfer += $input->readString($key66); - $xfer += $input->readString($val67); - $this->parameters[$key66] = $val67; + $key128 = ''; + $val129 = ''; + $xfer += $input->readString($key128); + $xfer += $input->readString($val129); + $this->parameters[$key128] = $val129; } $xfer += $input->readMapEnd(); } else { @@ -1400,6 +2447,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 +2514,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->partitionKeys)); { - foreach ($this->partitionKeys as $iter68) + foreach ($this->partitionKeys as $iter130) { - $xfer += $iter68->write($output); + $xfer += $iter130->write($output); } } $output->writeListEnd(); @@ -1476,10 +2531,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter69 => $viter70) + foreach ($this->parameters as $kiter131 => $viter132) { - $xfer += $output->writeString($kiter69); - $xfer += $output->writeString($viter70); + $xfer += $output->writeString($kiter131); + $xfer += $output->writeString($viter132); } } $output->writeMapEnd(); @@ -1501,6 +2556,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 +2581,7 @@ public $lastAccessTime = null; public $sd = null; public $parameters = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1563,6 +2627,11 @@ 'type' => TType::STRING, ), ), + 8 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -1587,6 +2656,9 @@ if (isset($vals['parameters'])) { $this->parameters = $vals['parameters']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -1612,14 +2684,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) + $_size133 = 0; + $_etype136 = 0; + $xfer += $input->readListBegin($_etype136, $_size133); + for ($_i137 = 0; $_i137 < $_size133; ++$_i137) { - $elem76 = null; - $xfer += $input->readString($elem76); - $this->values []= $elem76; + $elem138 = null; + $xfer += $input->readString($elem138); + $this->values []= $elem138; } $xfer += $input->readListEnd(); } else { @@ -1665,23 +2737,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) + $_size139 = 0; + $_ktype140 = 0; + $_vtype141 = 0; + $xfer += $input->readMapBegin($_ktype140, $_vtype141, $_size139); + for ($_i143 = 0; $_i143 < $_size139; ++$_i143) { - $key82 = ''; - $val83 = ''; - $xfer += $input->readString($key82); - $xfer += $input->readString($val83); - $this->parameters[$key82] = $val83; + $key144 = ''; + $val145 = ''; + $xfer += $input->readString($key144); + $xfer += $input->readString($val145); + $this->parameters[$key144] = $val145; } $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 +2783,9 @@ { $output->writeListBegin(TType::STRING, count($this->values)); { - foreach ($this->values as $iter84) + foreach ($this->values as $iter146) { - $xfer += $output->writeString($iter84); + $xfer += $output->writeString($iter146); } } $output->writeListEnd(); @@ -1748,16 +2828,24 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter85 => $viter86) + foreach ($this->parameters as $kiter147 => $viter148) { - $xfer += $output->writeString($kiter85); - $xfer += $output->writeString($viter86); + $xfer += $output->writeString($kiter147); + $xfer += $output->writeString($viter148); } } $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; @@ -1946,17 +3034,17 @@ 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) + $_size149 = 0; + $_ktype150 = 0; + $_vtype151 = 0; + $xfer += $input->readMapBegin($_ktype150, $_vtype151, $_size149); + for ($_i153 = 0; $_i153 < $_size149; ++$_i153) { - $key92 = ''; - $val93 = ''; - $xfer += $input->readString($key92); - $xfer += $input->readString($val93); - $this->parameters[$key92] = $val93; + $key154 = ''; + $val155 = ''; + $xfer += $input->readString($key154); + $xfer += $input->readString($val155); + $this->parameters[$key154] = $val155; } $xfer += $input->readMapEnd(); } else { @@ -2034,10 +3122,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter94 => $viter95) + foreach ($this->parameters as $kiter156 => $viter157) { - $xfer += $output->writeString($kiter94); - $xfer += $output->writeString($viter95); + $xfer += $output->writeString($kiter156); + $xfer += $output->writeString($viter157); } } $output->writeMapEnd(); @@ -2120,15 +3208,15 @@ case 1: if ($ftype == TType::LST) { $this->fieldSchemas = array(); - $_size96 = 0; - $_etype99 = 0; - $xfer += $input->readListBegin($_etype99, $_size96); - for ($_i100 = 0; $_i100 < $_size96; ++$_i100) + $_size158 = 0; + $_etype161 = 0; + $xfer += $input->readListBegin($_etype161, $_size158); + for ($_i162 = 0; $_i162 < $_size158; ++$_i162) { - $elem101 = null; - $elem101 = new metastore_FieldSchema(); - $xfer += $elem101->read($input); - $this->fieldSchemas []= $elem101; + $elem163 = null; + $elem163 = new metastore_FieldSchema(); + $xfer += $elem163->read($input); + $this->fieldSchemas []= $elem163; } $xfer += $input->readListEnd(); } else { @@ -2138,17 +3226,17 @@ 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) + $_size164 = 0; + $_ktype165 = 0; + $_vtype166 = 0; + $xfer += $input->readMapBegin($_ktype165, $_vtype166, $_size164); + for ($_i168 = 0; $_i168 < $_size164; ++$_i168) { - $key107 = ''; - $val108 = ''; - $xfer += $input->readString($key107); - $xfer += $input->readString($val108); - $this->properties[$key107] = $val108; + $key169 = ''; + $val170 = ''; + $xfer += $input->readString($key169); + $xfer += $input->readString($val170); + $this->properties[$key169] = $val170; } $xfer += $input->readMapEnd(); } else { @@ -2176,9 +3264,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); { - foreach ($this->fieldSchemas as $iter109) + foreach ($this->fieldSchemas as $iter171) { - $xfer += $iter109->write($output); + $xfer += $iter171->write($output); } } $output->writeListEnd(); @@ -2193,10 +3281,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); { - foreach ($this->properties as $kiter110 => $viter111) + foreach ($this->properties as $kiter172 => $viter173) { - $xfer += $output->writeString($kiter110); - $xfer += $output->writeString($viter111); + $xfer += $output->writeString($kiter172); + $xfer += $output->writeString($viter173); } } $output->writeMapEnd(); Index: metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote =================================================================== --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (revision 1057802) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -45,10 +45,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)' @@ -61,6 +64,15 @@ 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 ' bool create_role(Role role)' + print ' bool drop_role(string role_name)' + print ' bool grant_role(string role_name, string principal_name, PrincipalType principal_type, string grantor, PrincipalType grantorType, bool grant_option)' + print ' bool revoke_role(string role_name, string principal_name, PrincipalType principal_type)' + print ' list_roles(string principal_name, PrincipalType principal_type)' + print ' PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, string user_name, group_names)' + print ' list_privileges(string principal_name, PrincipalType principal_type, HiveObjectRef hiveObject)' + print ' bool grant_privileges(PrivilegeBag privileges)' + print ' bool revoke_privileges(PrivilegeBag privileges)' print '' sys.exit(0) @@ -255,6 +267,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' @@ -267,6 +285,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' @@ -279,6 +303,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' @@ -351,6 +381,60 @@ sys.exit(1) pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) +elif cmd == 'create_role': + if len(args) != 1: + print 'create_role requires 1 args' + sys.exit(1) + pp.pprint(client.create_role(eval(args[0]),)) + +elif cmd == 'drop_role': + if len(args) != 1: + print 'drop_role requires 1 args' + sys.exit(1) + pp.pprint(client.drop_role(args[0],)) + +elif cmd == 'grant_role': + if len(args) != 6: + print 'grant_role requires 6 args' + sys.exit(1) + pp.pprint(client.grant_role(args[0],args[1],eval(args[2]),args[3],eval(args[4]),eval(args[5]),)) + +elif cmd == 'revoke_role': + if len(args) != 3: + print 'revoke_role requires 3 args' + sys.exit(1) + pp.pprint(client.revoke_role(args[0],args[1],eval(args[2]),)) + +elif cmd == 'list_roles': + if len(args) != 2: + print 'list_roles requires 2 args' + sys.exit(1) + pp.pprint(client.list_roles(args[0],eval(args[1]),)) + +elif cmd == 'get_privilege_set': + if len(args) != 3: + print 'get_privilege_set requires 3 args' + sys.exit(1) + pp.pprint(client.get_privilege_set(eval(args[0]),args[1],eval(args[2]),)) + +elif cmd == 'list_privileges': + if len(args) != 3: + print 'list_privileges requires 3 args' + sys.exit(1) + pp.pprint(client.list_privileges(args[0],eval(args[1]),eval(args[2]),)) + +elif cmd == 'grant_privileges': + if len(args) != 1: + print 'grant_privileges requires 1 args' + sys.exit(1) + pp.pprint(client.grant_privileges(eval(args[0]),)) + +elif cmd == 'revoke_privileges': + if len(args) != 1: + print 'revoke_privileges requires 1 args' + sys.exit(1) + pp.pprint(client.revoke_privileges(eval(args[0]),)) + 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 1057802) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -206,6 +206,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: @@ -224,6 +235,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: @@ -243,6 +265,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: @@ -349,6 +383,81 @@ """ pass + def create_role(self, role): + """ + Parameters: + - role + """ + pass + + def drop_role(self, role_name): + """ + Parameters: + - role_name + """ + pass + + def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + """ + Parameters: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + """ + pass + + def revoke_role(self, role_name, principal_name, principal_type): + """ + Parameters: + - role_name + - principal_name + - principal_type + """ + pass + + def list_roles(self, principal_name, principal_type): + """ + Parameters: + - principal_name + - principal_type + """ + pass + + def get_privilege_set(self, hiveObject, user_name, group_names): + """ + Parameters: + - hiveObject + - user_name + - group_names + """ + pass + + def list_privileges(self, principal_name, principal_type, hiveObject): + """ + Parameters: + - principal_name + - principal_type + - hiveObject + """ + pass + + def grant_privileges(self, privileges): + """ + Parameters: + - privileges + """ + pass + + def revoke_privileges(self, privileges): + """ + Parameters: + - privileges + """ + pass + class Client(fb303.FacebookService.Client, Iface): """ @@ -1210,6 +1319,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: @@ -1286,6 +1437,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: @@ -1360,6 +1553,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: @@ -1800,83 +2037,407 @@ raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); + def create_role(self, role): + """ + Parameters: + - role + """ + self.send_create_role(role) + return self.recv_create_role() -class Processor(fb303.FacebookService.Processor, Iface, TProcessor): - def __init__(self, handler): - fb303.FacebookService.Processor.__init__(self, handler) - self._processMap["create_database"] = Processor.process_create_database - self._processMap["get_database"] = Processor.process_get_database - self._processMap["drop_database"] = Processor.process_drop_database - self._processMap["get_databases"] = Processor.process_get_databases - self._processMap["get_all_databases"] = Processor.process_get_all_databases - self._processMap["alter_database"] = Processor.process_alter_database - self._processMap["get_type"] = Processor.process_get_type - self._processMap["create_type"] = Processor.process_create_type - self._processMap["drop_type"] = Processor.process_drop_type - self._processMap["get_type_all"] = Processor.process_get_type_all - self._processMap["get_fields"] = Processor.process_get_fields - self._processMap["get_schema"] = Processor.process_get_schema - self._processMap["create_table"] = Processor.process_create_table - self._processMap["drop_table"] = Processor.process_drop_table - self._processMap["get_tables"] = Processor.process_get_tables - self._processMap["get_all_tables"] = Processor.process_get_all_tables - self._processMap["get_table"] = Processor.process_get_table - self._processMap["alter_table"] = Processor.process_alter_table - self._processMap["add_partition"] = Processor.process_add_partition - self._processMap["append_partition"] = Processor.process_append_partition - self._processMap["append_partition_by_name"] = Processor.process_append_partition_by_name - 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_by_name"] = Processor.process_get_partition_by_name - self._processMap["get_partitions"] = Processor.process_get_partitions - self._processMap["get_partition_names"] = Processor.process_get_partition_names - self._processMap["get_partitions_ps"] = Processor.process_get_partitions_ps - 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 - self._processMap["get_config_value"] = Processor.process_get_config_value - self._processMap["partition_name_to_vals"] = Processor.process_partition_name_to_vals - self._processMap["partition_name_to_spec"] = Processor.process_partition_name_to_spec - self._processMap["add_index"] = Processor.process_add_index - self._processMap["alter_index"] = Processor.process_alter_index - self._processMap["drop_index_by_name"] = Processor.process_drop_index_by_name - 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 + def send_create_role(self, role): + self._oprot.writeMessageBegin('create_role', TMessageType.CALL, self._seqid) + args = create_role_args() + args.role = role + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - 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 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 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 drop_role(self, role_name): + """ + Parameters: + - role_name + """ + self.send_drop_role(role_name) + return self.recv_drop_role() + + def send_drop_role(self, role_name): + self._oprot.writeMessageBegin('drop_role', TMessageType.CALL, self._seqid) + args = drop_role_args() + args.role_name = role_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 grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + """ + Parameters: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + """ + self.send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + return self.recv_grant_role() + + def send_grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option): + self._oprot.writeMessageBegin('grant_role', TMessageType.CALL, self._seqid) + args = grant_role_args() + args.role_name = role_name + args.principal_name = principal_name + args.principal_type = principal_type + args.grantor = grantor + args.grantorType = grantorType + args.grant_option = grant_option + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_role(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = grant_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, "grant_role failed: unknown result"); + + def revoke_role(self, role_name, principal_name, principal_type): + """ + Parameters: + - role_name + - principal_name + - principal_type + """ + self.send_revoke_role(role_name, principal_name, principal_type) + return self.recv_revoke_role() + + def send_revoke_role(self, role_name, principal_name, principal_type): + self._oprot.writeMessageBegin('revoke_role', TMessageType.CALL, self._seqid) + args = revoke_role_args() + args.role_name = role_name + args.principal_name = principal_name + args.principal_type = principal_type + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_revoke_role(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = revoke_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, "revoke_role failed: unknown result"); + + def list_roles(self, principal_name, principal_type): + """ + Parameters: + - principal_name + - principal_type + """ + self.send_list_roles(principal_name, principal_type) + return self.recv_list_roles() + + def send_list_roles(self, principal_name, principal_type): + self._oprot.writeMessageBegin('list_roles', TMessageType.CALL, self._seqid) + args = list_roles_args() + args.principal_name = principal_name + args.principal_type = principal_type + 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 get_privilege_set(self, hiveObject, user_name, group_names): + """ + Parameters: + - hiveObject + - user_name + - group_names + """ + self.send_get_privilege_set(hiveObject, user_name, group_names) + return self.recv_get_privilege_set() + + def send_get_privilege_set(self, hiveObject, user_name, group_names): + self._oprot.writeMessageBegin('get_privilege_set', TMessageType.CALL, self._seqid) + args = get_privilege_set_args() + args.hiveObject = hiveObject + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_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_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_privilege_set failed: unknown result"); + + def list_privileges(self, principal_name, principal_type, hiveObject): + """ + Parameters: + - principal_name + - principal_type + - hiveObject + """ + self.send_list_privileges(principal_name, principal_type, hiveObject) + return self.recv_list_privileges() + + def send_list_privileges(self, principal_name, principal_type, hiveObject): + self._oprot.writeMessageBegin('list_privileges', TMessageType.CALL, self._seqid) + args = list_privileges_args() + args.principal_name = principal_name + args.principal_type = principal_type + args.hiveObject = hiveObject + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_privileges(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_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, "list_privileges failed: unknown result"); + + def grant_privileges(self, privileges): + """ + Parameters: + - privileges + """ + self.send_grant_privileges(privileges) + return self.recv_grant_privileges() + + def send_grant_privileges(self, privileges): + self._oprot.writeMessageBegin('grant_privileges', TMessageType.CALL, self._seqid) + args = grant_privileges_args() + args.privileges = privileges + 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, privileges): + """ + Parameters: + - privileges + """ + self.send_revoke_privileges(privileges) + return self.recv_revoke_privileges() + + def send_revoke_privileges(self, privileges): + self._oprot.writeMessageBegin('revoke_privileges', TMessageType.CALL, self._seqid) + args = revoke_privileges_args() + 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"); + + +class Processor(fb303.FacebookService.Processor, Iface, TProcessor): + def __init__(self, handler): + fb303.FacebookService.Processor.__init__(self, handler) + self._processMap["create_database"] = Processor.process_create_database + self._processMap["get_database"] = Processor.process_get_database + self._processMap["drop_database"] = Processor.process_drop_database + self._processMap["get_databases"] = Processor.process_get_databases + self._processMap["get_all_databases"] = Processor.process_get_all_databases + self._processMap["alter_database"] = Processor.process_alter_database + self._processMap["get_type"] = Processor.process_get_type + self._processMap["create_type"] = Processor.process_create_type + self._processMap["drop_type"] = Processor.process_drop_type + self._processMap["get_type_all"] = Processor.process_get_type_all + self._processMap["get_fields"] = Processor.process_get_fields + self._processMap["get_schema"] = Processor.process_get_schema + self._processMap["create_table"] = Processor.process_create_table + self._processMap["drop_table"] = Processor.process_drop_table + self._processMap["get_tables"] = Processor.process_get_tables + self._processMap["get_all_tables"] = Processor.process_get_all_tables + self._processMap["get_table"] = Processor.process_get_table + self._processMap["alter_table"] = Processor.process_alter_table + self._processMap["add_partition"] = Processor.process_add_partition + self._processMap["append_partition"] = Processor.process_append_partition + self._processMap["append_partition_by_name"] = Processor.process_append_partition_by_name + 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 + self._processMap["get_config_value"] = Processor.process_get_config_value + self._processMap["partition_name_to_vals"] = Processor.process_partition_name_to_vals + self._processMap["partition_name_to_spec"] = Processor.process_partition_name_to_spec + self._processMap["add_index"] = Processor.process_add_index + self._processMap["alter_index"] = Processor.process_alter_index + self._processMap["drop_index_by_name"] = Processor.process_drop_index_by_name + 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["create_role"] = Processor.process_create_role + self._processMap["drop_role"] = Processor.process_drop_role + self._processMap["grant_role"] = Processor.process_grant_role + self._processMap["revoke_role"] = Processor.process_revoke_role + self._processMap["list_roles"] = Processor.process_list_roles + self._processMap["get_privilege_set"] = Processor.process_get_privilege_set + self._processMap["list_privileges"] = Processor.process_list_privileges + self._processMap["grant_privileges"] = Processor.process_grant_privileges + self._processMap["revoke_privileges"] = Processor.process_revoke_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() @@ -2254,6 +2815,22 @@ 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) @@ -2286,11 +2863,27 @@ oprot.writeMessageEnd() oprot.trans.flush() - def process_get_partition_names(self, seqid, iprot, oprot): - args = get_partition_names_args() + def process_get_partitions_with_auth(self, seqid, iprot, oprot): + args = get_partitions_with_auth_args() args.read(iprot) iprot.readMessageEnd() - result = get_partition_names_result() + 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: @@ -2314,6 +2907,22 @@ 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) @@ -2498,6 +3107,132 @@ 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) + 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) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_role(self, seqid, iprot, oprot): + args = grant_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_role_result() + try: + result.success = self._handler.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("grant_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_role(self, seqid, iprot, oprot): + args = revoke_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_role_result() + try: + result.success = self._handler.revoke_role(args.role_name, args.principal_name, args.principal_type) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("revoke_role", 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.principal_type) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_roles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_privilege_set(self, seqid, iprot, oprot): + args = get_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_privilege_set_result() + try: + result.success = self._handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_privileges(self, seqid, iprot, oprot): + args = list_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_privileges_result() + try: + result.success = self._handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_privileges", 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.privileges) + 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.privileges) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("revoke_privileges", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + # HELPER FUNCTIONS AND STRUCTURES @@ -3035,10 +3770,10 @@ 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) + (_etype177, _size174) = iprot.readListBegin() + for _i178 in xrange(_size174): + _elem179 = iprot.readString(); + self.success.append(_elem179) iprot.readListEnd() else: iprot.skip(ftype) @@ -3061,8 +3796,8 @@ 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) + for iter180 in self.success: + oprot.writeString(iter180) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -3155,10 +3890,10 @@ 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) + (_etype184, _size181) = iprot.readListBegin() + for _i185 in xrange(_size181): + _elem186 = iprot.readString(); + self.success.append(_elem186) iprot.readListEnd() else: iprot.skip(ftype) @@ -3181,8 +3916,8 @@ 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) + for iter187 in self.success: + oprot.writeString(iter187) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -3882,12 +4617,12 @@ 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 + (_ktype189, _vtype190, _size188 ) = iprot.readMapBegin() + for _i192 in xrange(_size188): + _key193 = iprot.readString(); + _val194 = Type() + _val194.read(iprot) + self.success[_key193] = _val194 iprot.readMapEnd() else: iprot.skip(ftype) @@ -3910,9 +4645,9 @@ 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) + for kiter195,viter196 in self.success.items(): + oprot.writeString(kiter195) + viter196.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.o2 != None: @@ -4041,11 +4776,11 @@ 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) + (_etype200, _size197) = iprot.readListBegin() + for _i201 in xrange(_size197): + _elem202 = FieldSchema() + _elem202.read(iprot) + self.success.append(_elem202) iprot.readListEnd() else: iprot.skip(ftype) @@ -4080,8 +4815,8 @@ 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) + for iter203 in self.success: + iter203.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -4218,11 +4953,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) + (_etype207, _size204) = iprot.readListBegin() + for _i208 in xrange(_size204): + _elem209 = FieldSchema() + _elem209.read(iprot) + self.success.append(_elem209) iprot.readListEnd() else: iprot.skip(ftype) @@ -4257,8 +4992,8 @@ 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 iter210 in self.success: + iter210.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -4704,10 +5439,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) + (_etype214, _size211) = iprot.readListBegin() + for _i215 in xrange(_size211): + _elem216 = iprot.readString(); + self.success.append(_elem216) iprot.readListEnd() else: iprot.skip(ftype) @@ -4730,8 +5465,8 @@ 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 iter217 in self.success: + oprot.writeString(iter217) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -4842,10 +5577,10 @@ 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) + (_etype221, _size218) = iprot.readListBegin() + for _i222 in xrange(_size218): + _elem223 = iprot.readString(); + self.success.append(_elem223) iprot.readListEnd() else: iprot.skip(ftype) @@ -4868,8 +5603,8 @@ 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) + for iter224 in self.success: + oprot.writeString(iter224) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -5406,10 +6141,10 @@ 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) + (_etype228, _size225) = iprot.readListBegin() + for _i229 in xrange(_size225): + _elem230 = iprot.readString(); + self.part_vals.append(_elem230) iprot.readListEnd() else: iprot.skip(ftype) @@ -5434,8 +6169,8 @@ 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) + for iter231 in self.part_vals: + oprot.writeString(iter231) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5779,10 +6514,10 @@ 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) + (_etype235, _size232) = iprot.readListBegin() + for _i236 in xrange(_size232): + _elem237 = iprot.readString(); + self.part_vals.append(_elem237) iprot.readListEnd() else: iprot.skip(ftype) @@ -5812,8 +6547,8 @@ 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) + for iter238 in self.part_vals: + oprot.writeString(iter238) oprot.writeListEnd() oprot.writeFieldEnd() if self.deleteData != None: @@ -6142,10 +6877,10 @@ 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) + (_etype242, _size239) = iprot.readListBegin() + for _i243 in xrange(_size239): + _elem244 = iprot.readString(); + self.part_vals.append(_elem244) iprot.readListEnd() else: iprot.skip(ftype) @@ -6170,8 +6905,8 @@ 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) + for iter245 in self.part_vals: + oprot.writeString(iter245) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -6276,25 +7011,31 @@ def __ne__(self, other): return not (self == other) -class get_partition_by_name_args: +class get_partition_with_auth_args: """ Attributes: - db_name - tbl_name - - part_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.STRING, 'part_name', None, None, ), # 3 + (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, db_name=None, tbl_name=None, part_name=None,): + 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_name = part_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: @@ -6316,8 +7057,28 @@ else: iprot.skip(ftype) elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype249, _size246) = iprot.readListBegin() + for _i250 in xrange(_size246): + _elem251 = iprot.readString(); + self.part_vals.append(_elem251) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype255, _size252) = iprot.readListBegin() + for _i256 in xrange(_size252): + _elem257 = iprot.readString(); + self.group_names.append(_elem257) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -6329,7 +7090,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_args') + oprot.writeStructBegin('get_partition_with_auth_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -6338,9 +7099,23 @@ 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.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter258 in self.part_vals: + oprot.writeString(iter258) + 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.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter259 in self.group_names: + oprot.writeString(iter259) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6359,7 +7134,7 @@ def __ne__(self, other): return not (self == other) -class get_partition_by_name_result: +class get_partition_with_auth_result: """ Attributes: - success @@ -6414,7 +7189,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_partition_with_auth_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -6444,25 +7219,25 @@ def __ne__(self, other): return not (self == other) -class get_partitions_args: +class get_partition_by_name_args: """ Attributes: - db_name - tbl_name - - max_parts + - part_name """ 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 + (3, TType.STRING, 'part_name', None, None, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + def __init__(self, db_name=None, tbl_name=None, part_name=None,): self.db_name = db_name self.tbl_name = tbl_name - self.max_parts = max_parts + 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: @@ -6484,8 +7259,8 @@ 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) else: @@ -6497,7 +7272,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_partitions_args') + oprot.writeStructBegin('get_partition_by_name_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -6506,9 +7281,9 @@ 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) + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6527,7 +7302,7 @@ def __ne__(self, other): return not (self == other) -class get_partitions_result: +class get_partition_by_name_result: """ Attributes: - success @@ -6536,9 +7311,9 @@ """ 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', (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,): @@ -6556,25 +7331,20 @@ 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 = 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) @@ -6587,13 +7357,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_result') + oprot.writeStructBegin('get_partition_by_name_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) @@ -6620,7 +7387,7 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_args: +class get_partitions_args: """ Attributes: - db_name @@ -6673,7 +7440,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_names_args') + oprot.writeStructBegin('get_partitions_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -6703,20 +7470,23 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_result: +class get_partitions_result: """ Attributes: - success + - o1 - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), 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): @@ -6731,15 +7501,22 @@ 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) + (_etype263, _size260) = iprot.readListBegin() + for _i264 in xrange(_size260): + _elem265 = Partition() + _elem265.read(iprot) + self.success.append(_elem265) 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: @@ -6753,16 +7530,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_names_result') + oprot.writeStructBegin('get_partitions_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.writeListBegin(TType.STRUCT, len(self.success)) + for iter266 in self.success: + iter266.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() @@ -6782,13 +7563,794 @@ def __ne__(self, other): return not (self == other) -class get_partitions_ps_args: +class get_partitions_with_auth_args: """ Attributes: - db_name - tbl_name - - part_vals - max_parts + - 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 + (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], 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: + 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.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 = [] + (_etype270, _size267) = iprot.readListBegin() + for _i271 in xrange(_size267): + _elem272 = iprot.readString(); + self.group_names.append(_elem272) + iprot.readListEnd() + 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_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 iter273 in self.group_names: + oprot.writeString(iter273) + 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 get_partitions_with_auth_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 + ) + + 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.LIST: + self.success = [] + (_etype277, _size274) = iprot.readListBegin() + for _i278 in xrange(_size274): + _elem279 = Partition() + _elem279.read(iprot) + self.success.append(_elem279) + 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: + 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_partitions_with_auth_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter280 in self.success: + iter280.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): + 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_partition_names_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)) + 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.I16: + self.max_parts = iprot.readI16(); + 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_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() + 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_partition_names_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), 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.LIST: + self.success = [] + (_etype284, _size281) = iprot.readListBegin() + for _i285 in xrange(_size281): + _elem286 = iprot.readString(); + self.success.append(_elem286) + iprot.readListEnd() + 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_partition_names_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter287 in self.success: + oprot.writeString(iter287) + oprot.writeListEnd() + 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_partitions_ps_args: + """ + Attributes: + - 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 + ) + + 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: + 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 = [] + (_etype291, _size288) = iprot.readListBegin() + for _i292 in xrange(_size288): + _elem293 = iprot.readString(); + self.part_vals.append(_elem293) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + 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_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 iter294 in self.part_vals: + oprot.writeString(iter294) + 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): + 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_partitions_ps_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype298, _size295) = iprot.readListBegin() + for _i299 in xrange(_size295): + _elem300 = Partition() + _elem300.read(iprot) + self.success.append(_elem300) + 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_partitions_ps_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter301 in self.success: + iter301.write(oprot) + 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_partitions_ps_with_auth_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts + - 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 + (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, 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: + 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 = [] + (_etype305, _size302) = iprot.readListBegin() + for _i306 in xrange(_size302): + _elem307 = iprot.readString(); + self.part_vals.append(_elem307) + 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 = [] + (_etype311, _size308) = iprot.readListBegin() + for _i312 in xrange(_size308): + _elem313 = iprot.readString(); + self.group_names.append(_elem313) + iprot.readListEnd() + 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_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 iter314 in self.part_vals: + oprot.writeString(iter314) + 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 iter315 in self.group_names: + oprot.writeString(iter315) + 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 get_partitions_ps_with_auth_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 + ) + + 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.LIST: + self.success = [] + (_etype319, _size316) = iprot.readListBegin() + for _i320 in xrange(_size316): + _elem321 = Partition() + _elem321.read(iprot) + self.success.append(_elem321) + 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: + 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_partitions_ps_with_auth_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter322 in self.success: + iter322.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): + 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_partition_names_ps_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - max_parts """ thrift_spec = ( @@ -6799,11 +8361,1298 @@ (4, TType.I16, 'max_parts', None, -1, ), # 4 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + 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: + 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 = [] + (_etype326, _size323) = iprot.readListBegin() + for _i327 in xrange(_size323): + _elem328 = iprot.readString(); + self.part_vals.append(_elem328) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + 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_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.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 iter329 in self.part_vals: + oprot.writeString(iter329) + 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): + 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_partition_names_ps_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 = [] + (_etype333, _size330) = iprot.readListBegin() + for _i334 in xrange(_size330): + _elem335 = iprot.readString(); + self.success.append(_elem335) + 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_partition_names_ps_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter336 in self.success: + oprot.writeString(iter336) + 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_partitions_by_filter_args: + """ + Attributes: + - 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 + ) + + def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): + 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: + 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.filter = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + 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_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.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() + 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_partitions_by_filter_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (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,): + 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.LIST: + self.success = [] + (_etype340, _size337) = iprot.readListBegin() + for _i341 in xrange(_size337): + _elem342 = Partition() + _elem342.read(iprot) + self.success.append(_elem342) + 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 = 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_partitions_by_filter_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter343 in self.success: + iter343.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): + 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_partition_args: + """ + Attributes: + - 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 + ) + + 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: + 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.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('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() + 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_partition_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_partition_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 get_config_value_args: + """ + Attributes: + - name + - defaultValue + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'defaultValue', None, None, ), # 2 + ) + + def __init__(self, name=None, defaultValue=None,): + self.name = name + 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: + 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.STRING: + self.defaultValue = 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_config_value_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.defaultValue != None: + oprot.writeFieldBegin('defaultValue', TType.STRING, 2) + oprot.writeString(self.defaultValue) + 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_config_value_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.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.STRING: + self.success = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = ConfigValSecurityException() + 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_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() + 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 partition_name_to_vals_args: + """ + Attributes: + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'part_name', None, None, ), # 1 + ) + + 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: + 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.part_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('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() + 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 partition_name_to_vals_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 = [] + (_etype347, _size344) = iprot.readListBegin() + for _i348 in xrange(_size344): + _elem349 = iprot.readString(); + self.success.append(_elem349) + 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('partition_name_to_vals_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter350 in self.success: + oprot.writeString(iter350) + 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 partition_name_to_spec_args: + """ + Attributes: + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'part_name', None, None, ), # 1 + ) + + 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: + 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.part_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('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() + 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 partition_name_to_spec_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,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.MAP: + self.success = {} + (_ktype352, _vtype353, _size351 ) = iprot.readMapBegin() + for _i355 in xrange(_size351): + _key356 = iprot.readString(); + _val357 = iprot.readString(); + self.success[_key356] = _val357 + iprot.readMapEnd() + 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('partition_name_to_spec_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) + for kiter358,viter359 in self.success.items(): + oprot.writeString(kiter358) + oprot.writeString(viter359) + oprot.writeMapEnd() + 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 add_index_args: + """ + Attributes: + - new_index + - index_table + """ + + 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 + ) + + 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: + 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_index = Index() + self.new_index.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.index_table = Table() + self.index_table.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_index_args') + if self.new_index != None: + oprot.writeFieldBegin('new_index', TType.STRUCT, 1) + self.new_index.write(oprot) + oprot.writeFieldEnd() + if self.index_table != None: + oprot.writeFieldBegin('index_table', TType.STRUCT, 2) + self.index_table.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_index_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 + ) + + 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 = Index() + 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_index_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 alter_index_args: + """ + Attributes: + - dbname + - base_tbl_name + - idx_name + - new_idx + """ + + 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 + ) + + 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 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.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_idx = Index() + self.new_idx.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_index_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.base_tbl_name != None: + oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) + oprot.writeString(self.base_tbl_name) + oprot.writeFieldEnd() + 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() + 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_index_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_index_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 drop_index_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - index_name + - deleteData + """ + + 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 + ) + + 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.part_vals = part_vals - self.max_parts = max_parts + 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: @@ -6825,18 +9674,13 @@ 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() + if ftype == TType.STRING: + self.index_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); else: iprot.skip(ftype) else: @@ -6848,7 +9692,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_partitions_ps_args') + oprot.writeStructBegin('drop_index_by_name_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -6857,16 +9701,13 @@ 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 iter204 in self.part_vals: - oprot.writeString(iter204) - oprot.writeListEnd() + if self.index_name != None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6885,21 +9726,24 @@ def __ne__(self, other): return not (self == other) -class get_partitions_ps_result: +class drop_index_by_name_result: """ Attributes: - success - o1 + - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (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,): + 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: @@ -6911,22 +9755,22 @@ 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: 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() @@ -6936,18 +9780,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_partitions_ps_result') + oprot.writeStructBegin('drop_index_by_name_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) 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): @@ -6965,28 +9810,25 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_ps_args: +class get_index_by_name_args: """ Attributes: - db_name - tbl_name - - part_vals - - max_parts + - 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 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (3, TType.STRING, 'index_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, 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.max_parts = max_parts + 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: @@ -7008,18 +9850,8 @@ 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(); + if ftype == TType.STRING: + self.index_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7031,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_partition_names_ps_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) @@ -7040,16 +9872,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 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) + if self.index_name != None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7068,21 +9893,24 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_ps_result: +class get_index_by_name_result: """ Attributes: - success - o1 + - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (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,): + 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: @@ -7094,13 +9922,9 @@ 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.STRUCT: + self.success = Index() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: @@ -7109,6 +9933,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() @@ -7118,18 +9948,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_partition_names_ps_result') + oprot.writeStructBegin('get_index_by_name_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.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): @@ -7147,28 +9978,25 @@ def __ne__(self, other): return not (self == other) -class get_partitions_by_filter_args: +class get_indexes_args: """ Attributes: - db_name - tbl_name - - filter - - max_parts + - 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, 'filter', None, None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][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.filter = filter - self.max_parts = max_parts + 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: @@ -7190,13 +10018,8 @@ 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(); + self.max_indexes = iprot.readI16(); else: iprot.skip(ftype) else: @@ -7208,7 +10031,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_partitions_by_filter_args') + oprot.writeStructBegin('get_indexes_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -7217,13 +10040,9 @@ 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) + if self.max_indexes != None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7242,7 +10061,7 @@ def __ne__(self, other): return not (self == other) -class get_partitions_by_filter_result: +class get_indexes_result: """ Attributes: - success @@ -7251,9 +10070,9 @@ """ thrift_spec = ( - (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 + (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,): @@ -7273,23 +10092,23 @@ 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) + (_etype363, _size360) = iprot.readListBegin() + for _i364 in xrange(_size360): + _elem365 = Index() + _elem365.read(iprot) + self.success.append(_elem365) 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) @@ -7302,12 +10121,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_partitions_by_filter_result') + oprot.writeStructBegin('get_indexes_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) + for iter366 in self.success: + iter366.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -7335,25 +10154,25 @@ def __ne__(self, other): return not (self == other) -class alter_partition_args: +class get_index_names_args: """ Attributes: - db_name - tbl_name - - new_part + - max_indexes """ 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 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, new_part=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.new_part = new_part + 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: @@ -7375,9 +10194,8 @@ else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) + if ftype == TType.I16: + self.max_indexes = iprot.readI16(); else: iprot.skip(ftype) else: @@ -7389,7 +10207,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_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) @@ -7398,9 +10216,9 @@ 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) + if self.max_indexes != None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7419,21 +10237,20 @@ def __ne__(self, other): return not (self == other) -class alter_partition_result: +class get_index_names_result: """ Attributes: - - o1 + - success - 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.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, o1=None, o2=None,): - self.o1 = o1 + def __init__(self, success=None, o2=None,): + self.success = success self.o2 = o2 def read(self, iprot): @@ -7445,13 +10262,17 @@ (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 = [] + (_etype370, _size367) = iprot.readListBegin() + for _i371 in xrange(_size367): + _elem372 = iprot.readString(); + self.success.append(_elem372) + iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 2: + elif fid == 1: if ftype == TType.STRUCT: self.o2 = MetaException() self.o2.read(iprot) @@ -7466,13 +10287,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('alter_partition_result') - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) + oprot.writeStructBegin('get_index_names_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter373 in self.success: + oprot.writeString(iter373) + 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() @@ -7492,22 +10316,19 @@ def __ne__(self, other): return not (self == other) -class get_config_value_args: +class create_role_args: """ Attributes: - - name - - defaultValue + - role """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'defaultValue', None, None, ), # 2 + (1, TType.STRUCT, 'role', (Role, Role.thrift_spec), None, ), # 1 ) - def __init__(self, name=None, defaultValue=None,): - self.name = name - self.defaultValue = defaultValue + def __init__(self, role=None,): + self.role = role 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: @@ -7516,16 +10337,12 @@ 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.STRING: - self.defaultValue = iprot.readString(); + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.role = Role() + self.role.read(iprot) else: iprot.skip(ftype) else: @@ -7537,14 +10354,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_config_value_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.defaultValue != None: - oprot.writeFieldBegin('defaultValue', TType.STRING, 2) - oprot.writeString(self.defaultValue) + oprot.writeStructBegin('create_role_args') + if self.role != None: + oprot.writeFieldBegin('role', TType.STRUCT, 1) + self.role.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7563,7 +10376,7 @@ def __ne__(self, other): return not (self == other) -class get_config_value_result: +class create_role_result: """ Attributes: - success @@ -7571,8 +10384,8 @@ """ thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.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, o1=None,): @@ -7589,13 +10402,13 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString(); + if ftype == TType.BOOL: + self.success = iprot.readBool(); 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) @@ -7608,10 +10421,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_config_value_result') + oprot.writeStructBegin('create_role_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7634,19 +10447,19 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_vals_args: +class drop_role_args: """ Attributes: - - part_name + - role_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 + (1, TType.STRING, 'role_name', None, None, ), # 1 ) - def __init__(self, part_name=None,): - self.part_name = part_name + def __init__(self, role_name=None,): + self.role_name = role_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: @@ -7659,7 +10472,7 @@ break if fid == 1: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7671,10 +10484,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('partition_name_to_vals_args') - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) + oprot.writeStructBegin('drop_role_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7693,7 +10506,7 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_vals_result: +class drop_role_result: """ Attributes: - success @@ -7701,7 +10514,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 ) @@ -7719,13 +10532,8 @@ if ftype == TType.STOP: break 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) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -7743,13 +10551,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('partition_name_to_vals_result') + oprot.writeStructBegin('drop_role_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.writeListEnd() + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7772,19 +10577,34 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_spec_args: +class grant_role_args: """ Attributes: - - part_name + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'principal_name', None, None, ), # 2 + (3, TType.I32, 'principal_type', None, None, ), # 3 + (4, TType.STRING, 'grantor', None, None, ), # 4 + (5, TType.I32, 'grantorType', None, None, ), # 5 + (6, TType.BOOL, 'grant_option', None, None, ), # 6 ) - def __init__(self, part_name=None,): - self.part_name = part_name + def __init__(self, role_name=None, principal_name=None, principal_type=None, grantor=None, grantorType=None, grant_option=None,): + self.role_name = role_name + self.principal_name = principal_name + self.principal_type = principal_type + self.grantor = grantor + self.grantorType = grantorType + self.grant_option = grant_option 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: @@ -7797,7 +10617,32 @@ break if fid == 1: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.role_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principal_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principal_type = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.grantorType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.grant_option = iprot.readBool(); else: iprot.skip(ftype) else: @@ -7809,10 +10654,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('partition_name_to_spec_args') - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) + oprot.writeStructBegin('grant_role_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) + oprot.writeFieldEnd() + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 2) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.principal_type != None: + oprot.writeFieldBegin('principal_type', TType.I32, 3) + oprot.writeI32(self.principal_type) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 4) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.grantorType != None: + oprot.writeFieldBegin('grantorType', TType.I32, 5) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grant_option != None: + oprot.writeFieldBegin('grant_option', TType.BOOL, 6) + oprot.writeBool(self.grant_option) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7831,7 +10696,7 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_spec_result: +class grant_role_result: """ Attributes: - success @@ -7839,7 +10704,7 @@ """ thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -7857,14 +10722,8 @@ 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 ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -7882,14 +10741,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('partition_name_to_spec_result') + oprot.writeStructBegin('grant_role_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.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7912,22 +10767,25 @@ def __ne__(self, other): return not (self == other) -class add_index_args: +class revoke_role_args: """ Attributes: - - new_index - - index_table + - role_name + - principal_name + - principal_type """ 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, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'principal_name', None, None, ), # 2 + (3, TType.I32, 'principal_type', None, None, ), # 3 ) - def __init__(self, new_index=None, index_table=None,): - self.new_index = new_index - self.index_table = index_table + def __init__(self, role_name=None, principal_name=None, principal_type=None,): + self.role_name = role_name + self.principal_name = principal_name + self.principal_type = principal_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: @@ -7939,15 +10797,18 @@ 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.role_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.STRING: + self.principal_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principal_type = iprot.readI32(); else: iprot.skip(ftype) else: @@ -7959,14 +10820,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_args') - if self.new_index != None: - oprot.writeFieldBegin('new_index', TType.STRUCT, 1) - self.new_index.write(oprot) + oprot.writeStructBegin('revoke_role_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() - if self.index_table != None: - oprot.writeFieldBegin('index_table', TType.STRUCT, 2) - self.index_table.write(oprot) + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 2) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.principal_type != None: + oprot.writeFieldBegin('principal_type', TType.I32, 3) + oprot.writeI32(self.principal_type) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7985,27 +10850,21 @@ def __ne__(self, other): return not (self == other) -class add_index_result: +class revoke_role_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.BOOL, 'success', None, 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: @@ -8017,29 +10876,16 @@ 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: 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() @@ -8049,23 +10895,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('add_index_result') + oprot.writeStructBegin('revoke_role_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() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): @@ -8083,28 +10921,22 @@ def __ne__(self, other): return not (self == other) -class alter_index_args: +class list_roles_args: """ Attributes: - - dbname - - base_tbl_name - - idx_name - - new_idx + - principal_name + - principal_type """ 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.I32, 'principal_type', None, None, ), # 2 ) - 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, principal_type=None,): + self.principal_name = principal_name + self.principal_type = principal_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: @@ -8117,23 +10949,12 @@ 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(); - 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_idx = Index() - self.new_idx.read(iprot) + if ftype == TType.I32: + self.principal_type = iprot.readI32(); else: iprot.skip(ftype) else: @@ -8145,22 +10966,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('alter_index_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() - if self.base_tbl_name != None: - oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) - oprot.writeString(self.base_tbl_name) - oprot.writeFieldEnd() - if self.idx_name != None: - oprot.writeFieldBegin('idx_name', TType.STRING, 3) - oprot.writeString(self.idx_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.new_idx != None: - oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) - self.new_idx.write(oprot) + if self.principal_type != None: + oprot.writeFieldBegin('principal_type', TType.I32, 2) + oprot.writeI32(self.principal_type) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8179,22 +10992,21 @@ def __ne__(self, other): return not (self == other) -class alter_index_result: +class list_roles_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,(Role, Role.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: @@ -8205,16 +11017,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 = [] + (_etype377, _size374) = iprot.readListBegin() + for _i378 in xrange(_size374): + _elem379 = Role() + _elem379.read(iprot) + self.success.append(_elem379) + 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: @@ -8226,15 +11043,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_roles_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter380 in self.success: + iter380.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): @@ -8252,28 +11072,25 @@ def __ne__(self, other): return not (self == other) -class drop_index_by_name_args: +class get_privilege_set_args: """ Attributes: - - db_name - - tbl_name - - index_name - - deleteData + - hiveObject + - 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, 'index_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1 + (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, index_name=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name - self.deleteData = deleteData + def __init__(self, hiveObject=None, user_name=None, group_names=None,): + self.hiveObject = hiveObject + 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: @@ -8285,23 +11102,24 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRING: - self.db_name = iprot.readString(); + if ftype == TType.STRUCT: + self.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) 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.index_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 = [] + (_etype384, _size381) = iprot.readListBegin() + for _i385 in xrange(_size381): + _elem386 = iprot.readString(); + self.group_names.append(_elem386) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -8313,22 +11131,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('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.writeStructBegin('get_privilege_set_args') + if self.hiveObject != None: + oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1) + self.hiveObject.write(oprot) oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 2) + 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, 3) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter387 in self.group_names: + oprot.writeString(iter387) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8347,24 +11164,21 @@ def __ne__(self, other): return not (self == other) -class drop_index_by_name_result: +class get_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: @@ -8376,22 +11190,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() @@ -8401,19 +11210,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_index_by_name_result') + oprot.writeStructBegin('get_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): @@ -8431,25 +11236,25 @@ def __ne__(self, other): return not (self == other) -class get_index_by_name_args: +class list_privileges_args: """ Attributes: - - db_name - - tbl_name - - index_name + - principal_name + - principal_type + - hiveObject """ 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, 'principal_name', None, None, ), # 1 + (2, TType.I32, 'principal_type', None, None, ), # 2 + (3, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 3 ) - 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, principal_name=None, principal_type=None, hiveObject=None,): + self.principal_name = principal_name + self.principal_type = principal_type + self.hiveObject = hiveObject 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: @@ -8462,17 +11267,18 @@ 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.I32: + self.principal_type = iprot.readI32(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.index_name = iprot.readString(); + if ftype == TType.STRUCT: + self.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) else: iprot.skip(ftype) else: @@ -8484,18 +11290,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_index_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('list_privileges_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.principal_type != None: + oprot.writeFieldBegin('principal_type', TType.I32, 2) + oprot.writeI32(self.principal_type) oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) + if self.hiveObject != None: + oprot.writeFieldBegin('hiveObject', TType.STRUCT, 3) + self.hiveObject.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8514,24 +11320,21 @@ def __ne__(self, other): return not (self == other) -class get_index_by_name_result: +class list_privileges_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.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: @@ -8543,9 +11346,14 @@ 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 = [] + (_etype391, _size388) = iprot.readListBegin() + for _i392 in xrange(_size388): + _elem393 = HiveObjectPrivilege() + _elem393.read(iprot) + self.success.append(_elem393) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -8554,12 +11362,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() @@ -8569,19 +11371,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_index_by_name_result') + oprot.writeStructBegin('list_privileges_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 iter394 in self.success: + iter394.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): @@ -8599,25 +11400,19 @@ def __ne__(self, other): return not (self == other) -class get_indexes_args: +class grant_privileges_args: """ Attributes: - - db_name - - tbl_name - - max_indexes + - 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.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 1 ) - 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, privileges=None,): + 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: @@ -8629,18 +11424,9 @@ 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_indexes = iprot.readI16(); + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) else: iprot.skip(ftype) else: @@ -8652,18 +11438,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_indexes_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_indexes != None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) + oprot.writeStructBegin('grant_privileges_args') + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 1) + self.privileges.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8682,24 +11460,21 @@ def __ne__(self, other): return not (self == other) -class get_indexes_result: +class grant_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: @@ -8711,28 +11486,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() @@ -8742,22 +11505,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('grant_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): @@ -8775,25 +11531,19 @@ def __ne__(self, other): return not (self == other) -class get_index_names_args: +class revoke_privileges_args: """ Attributes: - - db_name - - tbl_name - - max_indexes + - 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.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 1 ) - 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, privileges=None,): + 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: @@ -8805,18 +11555,9 @@ 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_indexes = iprot.readI16(); + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) else: iprot.skip(ftype) else: @@ -8828,18 +11569,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_index_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_indexes != None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) + oprot.writeStructBegin('revoke_privileges_args') + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 1) + self.privileges.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8858,21 +11591,21 @@ def __ne__(self, other): return not (self == other) -class get_index_names_result: +class revoke_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: @@ -8884,19 +11617,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: @@ -8908,17 +11636,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_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 1057802) +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (working copy) @@ -16,6 +16,46 @@ fastbinary = None +class HiveObjectType: + GLOBAL = 1 + DATABASE = 2 + TABLE = 3 + PARTITION = 4 + COLUMN = 5 + + _VALUES_TO_NAMES = { + 1: "GLOBAL", + 2: "DATABASE", + 3: "TABLE", + 4: "PARTITION", + 5: "COLUMN", + } + + _NAMES_TO_VALUES = { + "GLOBAL": 1, + "DATABASE": 2, + "TABLE": 3, + "PARTITION": 4, + "COLUMN": 5, + } + +class PrincipalType: + USER = 1 + ROLE = 2 + GROUP = 3 + + _VALUES_TO_NAMES = { + 1: "USER", + 2: "ROLE", + 3: "GROUP", + } + + _NAMES_TO_VALUES = { + "USER": 1, + "ROLE": 2, + "GROUP": 3, + } + class Version: """ @@ -275,6 +315,616 @@ def __ne__(self, other): return not (self == other) +class HiveObjectRef: + """ + Attributes: + - objectType + - dbName + - objectName + - partValues + - columnName + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'objectType', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'objectName', None, None, ), # 3 + (4, TType.LIST, 'partValues', (TType.STRING,None), None, ), # 4 + (5, TType.STRING, 'columnName', None, None, ), # 5 + ) + + def __init__(self, objectType=None, dbName=None, objectName=None, partValues=None, columnName=None,): + self.objectType = objectType + self.dbName = dbName + self.objectName = objectName + self.partValues = partValues + self.columnName = columnName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.objectType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.objectName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.partValues = [] + (_etype10, _size7) = iprot.readListBegin() + for _i11 in xrange(_size7): + _elem12 = iprot.readString(); + self.partValues.append(_elem12) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.columnName = 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('HiveObjectRef') + if self.objectType != None: + oprot.writeFieldBegin('objectType', TType.I32, 1) + oprot.writeI32(self.objectType) + oprot.writeFieldEnd() + if self.dbName != None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.objectName != None: + oprot.writeFieldBegin('objectName', TType.STRING, 3) + oprot.writeString(self.objectName) + oprot.writeFieldEnd() + if self.partValues != None: + oprot.writeFieldBegin('partValues', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.partValues)) + for iter13 in self.partValues: + oprot.writeString(iter13) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columnName != None: + oprot.writeFieldBegin('columnName', TType.STRING, 5) + oprot.writeString(self.columnName) + 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 PrivilegeGrantInfo: + """ + Attributes: + - privilege + - createTime + - grantor + - grantorType + - grantOption + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'privilege', None, None, ), # 1 + (2, TType.I32, 'createTime', None, None, ), # 2 + (3, TType.STRING, 'grantor', None, None, ), # 3 + (4, TType.I32, 'grantorType', None, None, ), # 4 + (5, TType.BOOL, 'grantOption', None, None, ), # 5 + ) + + def __init__(self, privilege=None, createTime=None, grantor=None, grantorType=None, grantOption=None,): + self.privilege = privilege + self.createTime = createTime + self.grantor = grantor + self.grantorType = grantorType + self.grantOption = grantOption + + 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.privilege = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.grantorType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.grantOption = 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('PrivilegeGrantInfo') + if self.privilege != None: + oprot.writeFieldBegin('privilege', TType.STRING, 1) + oprot.writeString(self.privilege) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 3) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.grantorType != None: + oprot.writeFieldBegin('grantorType', TType.I32, 4) + oprot.writeI32(self.grantorType) + oprot.writeFieldEnd() + if self.grantOption != None: + oprot.writeFieldBegin('grantOption', TType.BOOL, 5) + oprot.writeBool(self.grantOption) + 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 HiveObjectPrivilege: + """ + Attributes: + - hiveObject + - principalName + - principalType + - grantInfo + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1 + (2, TType.STRING, 'principalName', None, None, ), # 2 + (3, TType.I32, 'principalType', None, None, ), # 3 + (4, TType.STRUCT, 'grantInfo', (PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec), None, ), # 4 + ) + + def __init__(self, hiveObject=None, principalName=None, principalType=None, grantInfo=None,): + self.hiveObject = hiveObject + self.principalName = principalName + self.principalType = principalType + self.grantInfo = grantInfo + + 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.hiveObject = HiveObjectRef() + self.hiveObject.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.principalType = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.grantInfo = PrivilegeGrantInfo() + self.grantInfo.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('HiveObjectPrivilege') + if self.hiveObject != None: + oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1) + self.hiveObject.write(oprot) + oprot.writeFieldEnd() + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 2) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.principalType != None: + oprot.writeFieldBegin('principalType', TType.I32, 3) + oprot.writeI32(self.principalType) + oprot.writeFieldEnd() + if self.grantInfo != None: + oprot.writeFieldBegin('grantInfo', TType.STRUCT, 4) + self.grantInfo.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 PrivilegeBag: + """ + Attributes: + - privileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'privileges', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 1 + ) + + def __init__(self, privileges=None,): + 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: + 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.LIST: + self.privileges = [] + (_etype17, _size14) = iprot.readListBegin() + for _i18 in xrange(_size14): + _elem19 = HiveObjectPrivilege() + _elem19.read(iprot) + self.privileges.append(_elem19) + iprot.readListEnd() + 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('PrivilegeBag') + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.privileges)) + for iter20 in self.privileges: + iter20.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 PrincipalPrivilegeSet: + """ + Attributes: + - userPrivileges + - groupPrivileges + - rolePrivileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 1 + (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 2 + (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), 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 = {} + (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() + for _i25 in xrange(_size21): + _key26 = iprot.readString(); + _val27 = [] + (_etype31, _size28) = iprot.readListBegin() + for _i32 in xrange(_size28): + _elem33 = PrivilegeGrantInfo() + _elem33.read(iprot) + _val27.append(_elem33) + iprot.readListEnd() + self.userPrivileges[_key26] = _val27 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.groupPrivileges = {} + (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() + for _i38 in xrange(_size34): + _key39 = iprot.readString(); + _val40 = [] + (_etype44, _size41) = iprot.readListBegin() + for _i45 in xrange(_size41): + _elem46 = PrivilegeGrantInfo() + _elem46.read(iprot) + _val40.append(_elem46) + iprot.readListEnd() + self.groupPrivileges[_key39] = _val40 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.rolePrivileges = {} + (_ktype48, _vtype49, _size47 ) = iprot.readMapBegin() + for _i51 in xrange(_size47): + _key52 = iprot.readString(); + _val53 = [] + (_etype57, _size54) = iprot.readListBegin() + for _i58 in xrange(_size54): + _elem59 = PrivilegeGrantInfo() + _elem59.read(iprot) + _val53.append(_elem59) + iprot.readListEnd() + self.rolePrivileges[_key52] = _val53 + 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.LIST, len(self.userPrivileges)) + for kiter60,viter61 in self.userPrivileges.items(): + oprot.writeString(kiter60) + oprot.writeListBegin(TType.STRUCT, len(viter61)) + for iter62 in viter61: + iter62.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.groupPrivileges != None: + oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.groupPrivileges)) + for kiter63,viter64 in self.groupPrivileges.items(): + oprot.writeString(kiter63) + oprot.writeListBegin(TType.STRUCT, len(viter64)) + for iter65 in viter64: + iter65.write(oprot) + oprot.writeListEnd() + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.rolePrivileges != None: + oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.rolePrivileges)) + for kiter66,viter67 in self.rolePrivileges.items(): + oprot.writeString(kiter66) + oprot.writeListBegin(TType.STRUCT, len(viter67)) + for iter68 in viter67: + iter68.write(oprot) + oprot.writeListEnd() + 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 Role: + """ + Attributes: + - roleName + - createTime + - ownerName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + (2, TType.I32, 'createTime', None, None, ), # 2 + (3, TType.STRING, 'ownerName', None, None, ), # 3 + ) + + def __init__(self, roleName=None, createTime=None, ownerName=None,): + self.roleName = roleName + self.createTime = createTime + self.ownerName = ownerName + + 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.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ownerName = 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('Role') + if self.roleName != None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.ownerName != None: + oprot.writeFieldBegin('ownerName', TType.STRING, 3) + oprot.writeString(self.ownerName) + 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 +932,7 @@ - description - locationUri - parameters + - privileges """ thrift_spec = ( @@ -290,13 +941,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 +978,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 + (_ktype70, _vtype71, _size69 ) = iprot.readMapBegin() + for _i73 in xrange(_size69): + _key74 = iprot.readString(); + _val75 = iprot.readString(); + self.parameters[_key74] = _val75 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,11 +1017,15 @@ 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 kiter76,viter77 in self.parameters.items(): + oprot.writeString(kiter76) + oprot.writeString(viter77) 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): @@ -422,11 +1085,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 + (_ktype79, _vtype80, _size78 ) = iprot.readMapBegin() + for _i82 in xrange(_size78): + _key83 = iprot.readString(); + _val84 = iprot.readString(); + self.parameters[_key83] = _val84 iprot.readMapEnd() else: iprot.skip(ftype) @@ -451,9 +1114,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 kiter85,viter86 in self.parameters.items(): + oprot.writeString(kiter85) + oprot.writeString(viter86) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -597,11 +1260,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) + (_etype90, _size87) = iprot.readListBegin() + for _i91 in xrange(_size87): + _elem92 = FieldSchema() + _elem92.read(iprot) + self.cols.append(_elem92) iprot.readListEnd() else: iprot.skip(ftype) @@ -639,32 +1302,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) + (_etype96, _size93) = iprot.readListBegin() + for _i97 in xrange(_size93): + _elem98 = iprot.readString(); + self.bucketCols.append(_elem98) 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) + (_etype102, _size99) = iprot.readListBegin() + for _i103 in xrange(_size99): + _elem104 = Order() + _elem104.read(iprot) + self.sortCols.append(_elem104) 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 + (_ktype106, _vtype107, _size105 ) = iprot.readMapBegin() + for _i109 in xrange(_size105): + _key110 = iprot.readString(); + _val111 = iprot.readString(); + self.parameters[_key110] = _val111 iprot.readMapEnd() else: iprot.skip(ftype) @@ -681,8 +1344,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 iter112 in self.cols: + iter112.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.location != None: @@ -712,23 +1375,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 iter113 in self.bucketCols: + oprot.writeString(iter113) 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 iter114 in self.sortCols: + iter114.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 kiter115,viter116 in self.parameters.items(): + oprot.writeString(kiter115) + oprot.writeString(viter116) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -763,6 +1426,7 @@ - viewOriginalText - viewExpandedText - tableType + - privileges """ thrift_spec = ( @@ -779,9 +1443,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 +1459,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 +1509,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) + (_etype120, _size117) = iprot.readListBegin() + for _i121 in xrange(_size117): + _elem122 = FieldSchema() + _elem122.read(iprot) + self.partitionKeys.append(_elem122) 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 + (_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) @@ -877,6 +1543,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 +1590,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 iter130 in self.partitionKeys: + iter130.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 kiter131,viter132 in self.parameters.items(): + oprot.writeString(kiter131) + oprot.writeString(viter132) oprot.writeMapEnd() oprot.writeFieldEnd() if self.viewOriginalText != None: @@ -942,6 +1614,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 +1645,7 @@ - lastAccessTime - sd - parameters + - privileges """ thrift_spec = ( @@ -980,9 +1657,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 +1668,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 +1682,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) + (_etype136, _size133) = iprot.readListBegin() + for _i137 in xrange(_size133): + _elem138 = iprot.readString(); + self.values.append(_elem138) iprot.readListEnd() else: iprot.skip(ftype) @@ -1039,14 +1718,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 + (_ktype140, _vtype141, _size139 ) = iprot.readMapBegin() + for _i143 in xrange(_size139): + _key144 = iprot.readString(); + _val145 = iprot.readString(); + self.parameters[_key144] = _val145 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 +1745,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 iter146 in self.values: + oprot.writeString(iter146) oprot.writeListEnd() oprot.writeFieldEnd() if self.dbName != None: @@ -1087,11 +1772,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 kiter147,viter148 in self.parameters.items(): + oprot.writeString(kiter147) + oprot.writeString(viter148) 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 +1892,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 + (_ktype150, _vtype151, _size149 ) = iprot.readMapBegin() + for _i153 in xrange(_size149): + _key154 = iprot.readString(); + _val155 = iprot.readString(); + self.parameters[_key154] = _val155 iprot.readMapEnd() else: iprot.skip(ftype) @@ -1261,9 +1950,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 kiter156,viter157 in self.parameters.items(): + oprot.writeString(kiter156) + oprot.writeString(viter157) oprot.writeMapEnd() oprot.writeFieldEnd() if self.deferredRebuild != None: @@ -1316,22 +2005,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) + (_etype161, _size158) = iprot.readListBegin() + for _i162 in xrange(_size158): + _elem163 = FieldSchema() + _elem163.read(iprot) + self.fieldSchemas.append(_elem163) 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 + (_ktype165, _vtype166, _size164 ) = iprot.readMapBegin() + for _i168 in xrange(_size164): + _key169 = iprot.readString(); + _val170 = iprot.readString(); + self.properties[_key169] = _val170 iprot.readMapEnd() else: iprot.skip(ftype) @@ -1348,16 +2037,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 iter171 in self.fieldSchemas: + iter171.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 kiter172,viter173 in self.properties.items(): + oprot.writeString(kiter172) + oprot.writeString(viter173) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() Index: metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (revision 1057802) +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (working copy) @@ -7,6 +7,24 @@ require 'fb303_types' +module HiveObjectType + GLOBAL = 1 + DATABASE = 2 + TABLE = 3 + PARTITION = 4 + COLUMN = 5 + VALUE_MAP = {1 => "GLOBAL", 2 => "DATABASE", 3 => "TABLE", 4 => "PARTITION", 5 => "COLUMN"} + VALID_VALUES = Set.new([GLOBAL, DATABASE, TABLE, PARTITION, COLUMN]).freeze +end + +module PrincipalType + USER = 1 + ROLE = 2 + GROUP = 3 + VALUE_MAP = {1 => "USER", 2 => "ROLE", 3 => "GROUP"} + VALID_VALUES = Set.new([USER, ROLE, GROUP]).freeze +end + class Version include ::Thrift::Struct, ::Thrift::Struct_Union VERSION = 1 @@ -67,18 +85,155 @@ ::Thrift::Struct.generate_accessors self end +class HiveObjectRef + include ::Thrift::Struct, ::Thrift::Struct_Union + OBJECTTYPE = 1 + DBNAME = 2 + OBJECTNAME = 3 + PARTVALUES = 4 + COLUMNNAME = 5 + + FIELDS = { + OBJECTTYPE => {:type => ::Thrift::Types::I32, :name => 'objectType', :enum_class => HiveObjectType}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + OBJECTNAME => {:type => ::Thrift::Types::STRING, :name => 'objectName'}, + PARTVALUES => {:type => ::Thrift::Types::LIST, :name => 'partValues', :element => {:type => ::Thrift::Types::STRING}}, + COLUMNNAME => {:type => ::Thrift::Types::STRING, :name => 'columnName'} + } + + def struct_fields; FIELDS; end + + def validate + unless @objectType.nil? || HiveObjectType::VALID_VALUES.include?(@objectType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field objectType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class PrivilegeGrantInfo + include ::Thrift::Struct, ::Thrift::Struct_Union + PRIVILEGE = 1 + CREATETIME = 2 + GRANTOR = 3 + GRANTORTYPE = 4 + GRANTOPTION = 5 + + FIELDS = { + PRIVILEGE => {:type => ::Thrift::Types::STRING, :name => 'privilege'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, + GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => PrincipalType}, + GRANTOPTION => {:type => ::Thrift::Types::BOOL, :name => 'grantOption'} + } + + def struct_fields; FIELDS; end + + def validate + unless @grantorType.nil? || PrincipalType::VALID_VALUES.include?(@grantorType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class HiveObjectPrivilege + include ::Thrift::Struct, ::Thrift::Struct_Union + HIVEOBJECT = 1 + PRINCIPALNAME = 2 + PRINCIPALTYPE = 3 + GRANTINFO = 4 + + FIELDS = { + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef}, + PRINCIPALNAME => {:type => ::Thrift::Types::STRING, :name => 'principalName'}, + PRINCIPALTYPE => {:type => ::Thrift::Types::I32, :name => 'principalType', :enum_class => PrincipalType}, + GRANTINFO => {:type => ::Thrift::Types::STRUCT, :name => 'grantInfo', :class => PrivilegeGrantInfo} + } + + def struct_fields; FIELDS; end + + def validate + unless @principalType.nil? || PrincipalType::VALID_VALUES.include?(@principalType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principalType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class PrivilegeBag + include ::Thrift::Struct, ::Thrift::Struct_Union + PRIVILEGES = 1 + + FIELDS = { + PRIVILEGES => {:type => ::Thrift::Types::LIST, :name => 'privileges', :element => {:type => ::Thrift::Types::STRUCT, :class => HiveObjectPrivilege}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::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::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}}, + GROUPPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'groupPrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}}, + ROLEPRIVILEGES => {:type => ::Thrift::Types::MAP, :name => 'rolePrivileges', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => PrivilegeGrantInfo}}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Role + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLENAME = 1 + CREATETIME = 2 + OWNERNAME = 3 + + FIELDS = { + ROLENAME => {:type => ::Thrift::Types::STRING, :name => 'roleName'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + OWNERNAME => {:type => ::Thrift::Types::STRING, :name => 'ownerName'} + } + + 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}} + 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 @@ -175,6 +330,7 @@ VIEWORIGINALTEXT = 10 VIEWEXPANDEDTEXT = 11 TABLETYPE = 12 + PRIVILEGES = 13 FIELDS = { TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, @@ -188,7 +344,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 +365,7 @@ LASTACCESSTIME = 5 SD = 6 PARAMETERS = 7 + PRIVILEGES = 8 FIELDS = { VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}}, @@ -216,7 +374,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 Index: metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb =================================================================== --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (revision 1057802) +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (working copy) @@ -419,6 +419,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() @@ -453,6 +470,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() @@ -485,6 +519,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() @@ -683,6 +734,150 @@ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result') end + def create_role(role) + send_create_role(role) + return recv_create_role() + end + + def send_create_role(role) + send_message('create_role', Create_role_args, :role => role) + 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) + send_drop_role(role_name) + return recv_drop_role() + end + + def send_drop_role(role_name) + send_message('drop_role', Drop_role_args, :role_name => role_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 grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + return recv_grant_role() + end + + def send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option) + send_message('grant_role', Grant_role_args, :role_name => role_name, :principal_name => principal_name, :principal_type => principal_type, :grantor => grantor, :grantorType => grantorType, :grant_option => grant_option) + end + + def recv_grant_role() + result = receive_message(Grant_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'grant_role failed: unknown result') + end + + def revoke_role(role_name, principal_name, principal_type) + send_revoke_role(role_name, principal_name, principal_type) + return recv_revoke_role() + end + + def send_revoke_role(role_name, principal_name, principal_type) + send_message('revoke_role', Revoke_role_args, :role_name => role_name, :principal_name => principal_name, :principal_type => principal_type) + end + + def recv_revoke_role() + result = receive_message(Revoke_role_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'revoke_role failed: unknown result') + end + + def list_roles(principal_name, principal_type) + send_list_roles(principal_name, principal_type) + return recv_list_roles() + end + + def send_list_roles(principal_name, principal_type) + send_message('list_roles', List_roles_args, :principal_name => principal_name, :principal_type => principal_type) + 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 get_privilege_set(hiveObject, user_name, group_names) + send_get_privilege_set(hiveObject, user_name, group_names) + return recv_get_privilege_set() + end + + def send_get_privilege_set(hiveObject, user_name, group_names) + send_message('get_privilege_set', Get_privilege_set_args, :hiveObject => hiveObject, :user_name => user_name, :group_names => group_names) + end + + def recv_get_privilege_set() + result = receive_message(Get_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_privilege_set failed: unknown result') + end + + def list_privileges(principal_name, principal_type, hiveObject) + send_list_privileges(principal_name, principal_type, hiveObject) + return recv_list_privileges() + end + + def send_list_privileges(principal_name, principal_type, hiveObject) + send_message('list_privileges', List_privileges_args, :principal_name => principal_name, :principal_type => principal_type, :hiveObject => hiveObject) + end + + def recv_list_privileges() + result = receive_message(List_privileges_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'list_privileges failed: unknown result') + end + + def grant_privileges(privileges) + send_grant_privileges(privileges) + return recv_grant_privileges() + end + + def send_grant_privileges(privileges) + send_message('grant_privileges', Grant_privileges_args, :privileges => privileges) + 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(privileges) + send_revoke_privileges(privileges) + return recv_revoke_privileges() + end + + def send_revoke_privileges(privileges) + send_message('revoke_privileges', Revoke_privileges_args, :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 + end class Processor < FacebookService::Processor @@ -1010,6 +1205,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() @@ -1036,6 +1244,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() @@ -1058,6 +1279,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() @@ -1206,6 +1440,105 @@ write_result(result, oprot, 'get_index_names', seqid) end + 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) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'create_role', seqid) + 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) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'drop_role', seqid) + end + + def process_grant_role(seqid, iprot, oprot) + args = read_args(iprot, Grant_role_args) + result = Grant_role_result.new() + begin + result.success = @handler.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'grant_role', seqid) + end + + def process_revoke_role(seqid, iprot, oprot) + args = read_args(iprot, Revoke_role_args) + result = Revoke_role_result.new() + begin + result.success = @handler.revoke_role(args.role_name, args.principal_name, args.principal_type) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'revoke_role', 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.principal_type) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_roles', seqid) + end + + def process_get_privilege_set(seqid, iprot, oprot) + args = read_args(iprot, Get_privilege_set_args) + result = Get_privilege_set_result.new() + begin + result.success = @handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_privilege_set', seqid) + end + + def process_list_privileges(seqid, iprot, oprot) + args = read_args(iprot, List_privileges_args) + result = List_privileges_result.new() + begin + result.success = @handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'list_privileges', 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.privileges) + 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.privileges) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'revoke_privileges', seqid) + end + end # HELPER FUNCTIONS AND STRUCTURES @@ -2115,16 +2448,20 @@ ::Thrift::Struct.generate_accessors self end - class Get_partition_by_name_args + class Get_partition_with_auth_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 TBL_NAME = 2 - PART_NAME = 3 + 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_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_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 @@ -2135,7 +2472,7 @@ ::Thrift::Struct.generate_accessors self end - class Get_partition_by_name_result + class Get_partition_with_auth_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 O1 = 1 @@ -2155,16 +2492,16 @@ ::Thrift::Struct.generate_accessors self end - class Get_partitions_args + class Get_partition_by_name_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 TBL_NAME = 2 - MAX_PARTS = 3 + PART_NAME = 3 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} + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} } def struct_fields; FIELDS; end @@ -2175,16 +2512,16 @@ ::Thrift::Struct.generate_accessors self end - class Get_partitions_result + class Get_partition_by_name_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} + 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 @@ -2195,7 +2532,7 @@ ::Thrift::Struct.generate_accessors self end - class Get_partition_names_args + class Get_partitions_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 TBL_NAME = 2 @@ -2215,13 +2552,15 @@ ::Thrift::Struct.generate_accessors self end - class Get_partition_names_result + class Get_partitions_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 - O2 = 1 + O1 = 1 + O2 = 2 FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + 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} } @@ -2233,18 +2572,20 @@ ::Thrift::Struct.generate_accessors self end - class Get_partitions_ps_args + class Get_partitions_with_auth_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 TBL_NAME = 2 - PART_VALS = 3 - MAX_PARTS = 4 + 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'}, - 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} + 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 @@ -2255,14 +2596,16 @@ ::Thrift::Struct.generate_accessors self end - class Get_partitions_ps_result + 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 => MetaException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} } def struct_fields; FIELDS; end @@ -2273,17 +2616,15 @@ ::Thrift::Struct.generate_accessors self end - class Get_partition_names_ps_args + class Get_partition_names_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 TBL_NAME = 2 - PART_VALS = 3 - MAX_PARTS = 4 + MAX_PARTS = 3 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} } @@ -2295,14 +2636,14 @@ ::Thrift::Struct.generate_accessors self end - class Get_partition_names_ps_result + class Get_partition_names_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 - O1 = 1 + O2 = 1 FIELDS = { SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} } def struct_fields; FIELDS; end @@ -2313,17 +2654,17 @@ ::Thrift::Struct.generate_accessors self end - class Get_partitions_by_filter_args + class Get_partitions_ps_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 TBL_NAME = 2 - FILTER = 3 + PART_VALS = 3 MAX_PARTS = 4 FIELDS = { DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, - FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, + 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} } @@ -2335,16 +2676,14 @@ ::Thrift::Struct.generate_accessors self end - class Get_partitions_by_filter_result + class Get_partitions_ps_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 => MetaException}, - O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} } def struct_fields; FIELDS; end @@ -2355,16 +2694,22 @@ ::Thrift::Struct.generate_accessors self end - class Alter_partition_args + class Get_partitions_ps_with_auth_args include ::Thrift::Struct, ::Thrift::Struct_Union DB_NAME = 1 TBL_NAME = 2 - NEW_PART = 3 + 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'}, - NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + 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 @@ -2375,13 +2720,15 @@ ::Thrift::Struct.generate_accessors self end - class Alter_partition_result + class Get_partitions_ps_with_auth_result include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 O1 = 1 O2 = 2 FIELDS = { - O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, + 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} } @@ -2393,7 +2740,127 @@ ::Thrift::Struct.generate_accessors self end - class Get_config_value_args + class Get_partition_names_ps_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_ps_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + 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_partitions_by_filter_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + FILTER = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_filter_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 => 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 Alter_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + NEW_PART = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, + 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_config_value_args include ::Thrift::Struct, ::Thrift::Struct_Union NAME = 1 DEFAULTVALUE = 2 @@ -2737,5 +3204,350 @@ ::Thrift::Struct.generate_accessors self end + class Create_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE = 1 + + FIELDS = { + ROLE => {:type => ::Thrift::Types::STRUCT, :name => 'role', :class => Role} + } + + 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 + + FIELDS = { + ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_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 Grant_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + PRINCIPAL_NAME = 2 + PRINCIPAL_TYPE = 3 + GRANTOR = 4 + GRANTORTYPE = 5 + GRANT_OPTION = 6 + + FIELDS = { + ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType}, + GRANTOR => {:type => ::Thrift::Types::STRING, :name => 'grantor'}, + GRANTORTYPE => {:type => ::Thrift::Types::I32, :name => 'grantorType', :enum_class => PrincipalType}, + GRANT_OPTION => {:type => ::Thrift::Types::BOOL, :name => 'grant_option'} + } + + def struct_fields; FIELDS; end + + def validate + unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') + end + unless @grantorType.nil? || PrincipalType::VALID_VALUES.include?(@grantorType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field grantorType!') + end + end + + ::Thrift::Struct.generate_accessors self + end + + class Grant_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 Revoke_role_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROLE_NAME = 1 + PRINCIPAL_NAME = 2 + PRINCIPAL_TYPE = 3 + + FIELDS = { + ROLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'role_name'}, + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType} + } + + def struct_fields; FIELDS; end + + def validate + unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') + end + end + + ::Thrift::Struct.generate_accessors self + end + + class Revoke_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 List_roles_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + PRINCIPAL_TYPE = 2 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType} + } + + def struct_fields; FIELDS; end + + def validate + unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') + end + 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 Get_privilege_set_args + include ::Thrift::Struct, ::Thrift::Struct_Union + HIVEOBJECT = 1 + USER_NAME = 2 + GROUP_NAMES = 3 + + FIELDS = { + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef}, + 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_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 List_privileges_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PRINCIPAL_NAME = 1 + PRINCIPAL_TYPE = 2 + HIVEOBJECT = 3 + + FIELDS = { + PRINCIPAL_NAME => {:type => ::Thrift::Types::STRING, :name => 'principal_name'}, + PRINCIPAL_TYPE => {:type => ::Thrift::Types::I32, :name => 'principal_type', :enum_class => PrincipalType}, + HIVEOBJECT => {:type => ::Thrift::Types::STRUCT, :name => 'hiveObject', :class => HiveObjectRef} + } + + def struct_fields; FIELDS; end + + def validate + unless @principal_type.nil? || PrincipalType::VALID_VALUES.include?(@principal_type) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!') + end + end + + ::Thrift::Struct.generate_accessors self + end + + class List_privileges_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 => HiveObjectPrivilege}}, + 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 + PRIVILEGES = 1 + + FIELDS = { + PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => PrivilegeBag} + } + + 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 + PRIVILEGES = 1 + + FIELDS = { + 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 + end Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 1057802) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -41,6 +41,9 @@ import org.apache.hadoop.hive.metastore.api.Constants; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; +import org.apache.hadoop.hive.metastore.api.HiveObjectRef; +import org.apache.hadoop.hive.metastore.api.HiveObjectType; import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.metastore.api.IndexAlreadyExistsException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; @@ -48,12 +51,25 @@ 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.PrincipalType; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo; +import org.apache.hadoop.hive.metastore.api.Role; 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.MDBPrivilege; +import org.apache.hadoop.hive.metastore.model.MPartitionColumnPrivilege; +import org.apache.hadoop.hive.metastore.model.MPartitionPrivilege; +import org.apache.hadoop.hive.metastore.model.MRole; +import org.apache.hadoop.hive.metastore.model.MGlobalPrivilege; +import org.apache.hadoop.hive.metastore.model.MRoleMap; +import org.apache.hadoop.hive.metastore.model.MTableColumnPrivilege; +import org.apache.hadoop.hive.metastore.model.MTablePrivilege; import org.apache.hadoop.hive.serde2.Deserializer; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeUtils; @@ -1338,6 +1354,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 { @@ -1363,6 +1408,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 { @@ -1800,10 +1874,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); List parts = null; List matchingParts = new ArrayList(); @@ -2157,8 +2245,575 @@ return ret; } - } + @Override + public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, + String userName, List groupNames) throws MetaException, + TException { + if (hiveObject.getObjectType() == HiveObjectType.COLUMN) { + String partName = getPartName(hiveObject); + return this.get_column_privilege_set(hiveObject.getDbName(), hiveObject + .getObjectName(), partName, hiveObject.getColumnName(), userName, + groupNames); + } else if (hiveObject.getObjectType() == HiveObjectType.PARTITION) { + String partName = getPartName(hiveObject); + return this.get_partition_privilege_set(hiveObject.getDbName(), + hiveObject.getObjectName(), partName, userName, groupNames); + } else if (hiveObject.getObjectType() == HiveObjectType.DATABASE) { + return this.get_db_privilege_set(hiveObject.getDbName(), userName, + groupNames); + } else if (hiveObject.getObjectType() == HiveObjectType.TABLE) { + return this.get_table_privilege_set(hiveObject.getDbName(), hiveObject + .getObjectName(), userName, groupNames); + } + return null; + } + + private String getPartName(HiveObjectRef hiveObject) throws MetaException { + String partName = null; + List partValue = hiveObject.getPartValues(); + if (partValue != null && partValue.size() > 0) { + try { + Table table = get_table(hiveObject.getDbName(), hiveObject + .getObjectName()); + partName = Warehouse + .makePartName(table.getPartitionKeys(), partValue); + } catch (NoSuchObjectException e) { + throw new MetaException(e.getMessage()); + } + } + return partName; + } + + 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; + } + + 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; + } + + 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; + } + + 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 grant_role(final String roleName, + final String userName, final PrincipalType principalType, + final String grantor, final PrincipalType grantorType, final boolean grantOption) + 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); + return ms.grantRole(role, userName, principalType, grantor, grantorType, grantOption); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + public List list_roles(final String principalName, + final PrincipalType principalType) 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,principalType); + if (roleMap!=null) { + for (MRoleMap role : roleMap) { + MRole r = role.getRole(); + result.add(new Role(r.getRoleName(), r + .getCreateTime(), r.getOwnerName())); + } + } + return result; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean create_role(final Role role) + throws MetaException, TException { + incrementCounter("create_role"); + + Boolean ret = null; + try { + + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.addRole(role.getRoleName(), role.getOwnerName()); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean drop_role(final String roleName) + 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); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean grant_privileges(final PrivilegeBag privileges) throws MetaException, + TException { + incrementCounter("grant_privileges"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.grantPrivileges(privileges); + } + }); + } catch (MetaException e) { + e.printStackTrace(); + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean revoke_role(final String roleName, final String userName, + final PrincipalType principalType) 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); + return ms.revokeRole(mRole, userName, principalType); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean revoke_privileges(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(privileges); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + 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; + } + + public PrincipalType getPrincipalType (String principalType) { + return PrincipalType.valueOf(principalType); + } + + @Override + public List list_privileges(String principalName, + PrincipalType principalType, HiveObjectRef hiveObject) + throws MetaException, TException { + if (hiveObject.getObjectType() == HiveObjectType.GLOBAL) { + return this.list_global_privileges(principalName, principalType); + } else if (hiveObject.getObjectType() == HiveObjectType.DATABASE) { + return this.list_db_privileges(principalName, principalType, hiveObject + .getDbName()); + } else if (hiveObject.getObjectType() == HiveObjectType.TABLE) { + return this.list_table_privileges(principalName, principalType, + hiveObject.getDbName(), hiveObject.getObjectName()); + } else if (hiveObject.getObjectType() == HiveObjectType.PARTITION) { + return this.list_partition_privileges(principalName, principalType, + hiveObject.getDbName(), hiveObject.getObjectName(), hiveObject + .getPartValues()); + } else if (hiveObject.getObjectType() == HiveObjectType.COLUMN) { + return this.list_column_privileges(principalName, principalType, + hiveObject.getDbName(), hiveObject.getObjectName(), hiveObject + .getPartValues(), hiveObject.getColumnName()); + } + return null; + } + + public List list_column_privileges( + final String principalName, final PrincipalType principalType, + final String dbName, final String tableName, final List partValues, + 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 { + String partName = null; + if (partValues != null && partValues.size()>0) { + Table tbl = get_table(dbName, tableName); + partName = Warehouse.makePartName(tbl.getPartitionKeys(), partValues); + } + + List result = null; + + if (partName != null) { + Partition part = null; + part = get_partition_by_name(dbName, tableName, partName); + List mPartitionCols = ms.listPrincipalPartitionColumnGrants(principalName, + principalType, dbName, tableName, partName, columnName); + if (mPartitionCols.size() > 0) { + result = new ArrayList(); + for (int i = 0; i < mPartitionCols.size(); i++) { + MPartitionColumnPrivilege sCol = mPartitionCols.get(i); + HiveObjectRef objectRef = new HiveObjectRef( + HiveObjectType.COLUMN, dbName, tableName, + part == null ? null : part.getValues(), sCol + .getColumnName()); + HiveObjectPrivilege secObj = new HiveObjectPrivilege(objectRef, + sCol.getPrincipalName(), principalType, + new PrivilegeGrantInfo(sCol.getPrivilege(), sCol + .getCreateTime(), sCol.getGrantor(), PrincipalType + .valueOf(sCol.getGrantorType()), sCol.getGrantOption())); + result.add(secObj); + } + } + } else { + List mTableCols = ms + .listPrincipalTableColumnGrants(principalName, principalType, + dbName, tableName, columnName); + if (mTableCols.size() > 0) { + result = new ArrayList(); + for (int i = 0; i < mTableCols.size(); i++) { + MTableColumnPrivilege sCol = mTableCols.get(i); + HiveObjectRef objectRef = new HiveObjectRef( + HiveObjectType.COLUMN, dbName, tableName, null, sCol + .getColumnName()); + HiveObjectPrivilege secObj = new HiveObjectPrivilege( + objectRef, sCol.getPrincipalName(), principalType, + new PrivilegeGrantInfo(sCol.getPrivilege(), sCol + .getCreateTime(), sCol.getGrantor(), PrincipalType + .valueOf(sCol.getGrantorType()), sCol + .getGrantOption())); + result.add(secObj); + } + } + } + + return result; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + public List list_db_privileges(final String principalName, + final PrincipalType principalType, 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.listPrincipalDBGrants( + principalName, principalType, dbName); + if (mDbs.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mDbs.size(); i++) { + MDBPrivilege sDB = mDbs.get(i); + HiveObjectRef objectRef = new HiveObjectRef( + HiveObjectType.DATABASE, dbName, null, null, null); + HiveObjectPrivilege secObj = new HiveObjectPrivilege(objectRef, + sDB.getPrincipalName(), principalType, + new PrivilegeGrantInfo(sDB.getPrivilege(), sDB + .getCreateTime(), sDB.getGrantor(), PrincipalType + .valueOf(sDB.getGrantorType()), sDB.getGrantOption())); + result.add(secObj); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + public List list_partition_privileges( + final String principalName, final PrincipalType principalType, + final String dbName, final String tableName, final List partValues) + throws MetaException, TException { + incrementCounter("list_security_partition_grant"); + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + Table tbl = get_table(dbName, tableName); + String partName = Warehouse.makePartName(tbl.getPartitionKeys(), partValues); + List mParts = ms + .listPrincipalPartitionGrants(principalName, principalType, dbName, tableName, partName); + if (mParts.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mParts.size(); i++) { + MPartitionPrivilege sPart = mParts.get(i); + HiveObjectRef objectRef = new HiveObjectRef( + HiveObjectType.PARTITION, dbName, tableName, partValues, + null); + HiveObjectPrivilege secObj = new HiveObjectPrivilege(objectRef, + sPart.getPrincipalName(), principalType, + new PrivilegeGrantInfo(sPart.getPrivilege(), sPart + .getCreateTime(), sPart.getGrantor(), PrincipalType + .valueOf(sPart.getGrantorType()), sPart + .getGrantOption())); + + result.add(secObj); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + public List list_table_privileges( + final String principalName, final PrincipalType principalType, + 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 + .listAllTableGrants(principalName, principalType, dbName, tableName); + if (mTbls.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mTbls.size(); i++) { + MTablePrivilege sTbl = mTbls.get(i); + HiveObjectRef objectRef = new HiveObjectRef( + HiveObjectType.TABLE, dbName, tableName, null,null); + HiveObjectPrivilege secObj = new HiveObjectPrivilege(objectRef, + sTbl.getPrincipalName(), principalType, + new PrivilegeGrantInfo(sTbl.getPrivilege(), sTbl.getCreateTime(), sTbl + .getGrantor(), PrincipalType.valueOf(sTbl + .getGrantorType()), sTbl.getGrantOption())); + result.add(secObj); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + public List list_global_privileges( + final String principalName, final PrincipalType principalType) + 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.listPrincipalGlobalGrants( + principalName, principalType); + if (mUsers.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mUsers.size(); i++) { + MGlobalPrivilege sUsr = mUsers.get(i); + HiveObjectRef objectRef = new HiveObjectRef( + HiveObjectType.GLOBAL, null, null, null, null); + HiveObjectPrivilege secUser = new HiveObjectPrivilege( + objectRef, sUsr.getPrincipalName(), principalType, + new PrivilegeGrantInfo(sUsr.getPrivilege(), sUsr + .getCreateTime(), sUsr.getGrantor(), PrincipalType + .valueOf(sUsr.getGrantorType()), sUsr.getGrantOption())); + result.add(secUser); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + } + /** * @param args */ Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (revision 1057802) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (working copy) @@ -40,12 +40,19 @@ import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; +import org.apache.hadoop.hive.metastore.api.HiveObjectRef; 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.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrincipalType; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo; +import org.apache.hadoop.hive.metastore.api.Role; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore; import org.apache.hadoop.hive.metastore.api.Type; @@ -552,6 +559,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 @@ -601,6 +625,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 @@ -932,6 +964,63 @@ return client.drop_index_by_name(dbName, tblName, name, deleteData); } + @Override + public boolean grant_role(String roleName, String userName, + PrincipalType principalType, String grantor, PrincipalType grantorType, + boolean grantOption) throws MetaException, TException { + return client.grant_role(roleName, userName, principalType, grantor, + grantorType, grantOption); + } + + @Override + public boolean create_role(Role role) + throws MetaException, TException { + return client.create_role(role); + } + + @Override + public boolean drop_role(String roleName) throws MetaException, TException { + return client.drop_role(roleName); + } + + @Override + public List list_roles(String principalName, + PrincipalType principalType) throws MetaException, TException { + return client.list_roles(principalName, principalType); + } + + @Override + public boolean grant_privileges(PrivilegeBag privileges) + throws MetaException, TException { + return client.grant_privileges(privileges); + } + + @Override + public boolean revoke_role(String roleName, String userName, + PrincipalType principalType) throws MetaException, TException { + return client.revoke_role(roleName, userName, principalType); + } + + @Override + public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, + TException { + return client.revoke_privileges(privileges); + } + + @Override + public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, + String userName, List groupNames) throws MetaException, + TException { + return client.get_privilege_set(hiveObject, userName, groupNames); + } + + @Override + public List list_privileges(String principalName, + PrincipalType principalType, HiveObjectRef hiveObject) + throws MetaException, TException { + return client.list_privileges(principalName, principalType, hiveObject); + } + /** * Creates a synchronized wrapper for any {@link IMetaStoreClient}. * This may be used by multi-threaded applications until we have Index: metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (revision 1057802) +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (working copy) @@ -25,12 +25,18 @@ import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; +import org.apache.hadoop.hive.metastore.api.HiveObjectRef; 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.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrincipalType; +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.UnknownDBException; import org.apache.hadoop.hive.metastore.api.UnknownTableException; @@ -263,6 +269,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 +308,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 @@ -481,4 +531,110 @@ public boolean dropIndex(String db_name, String tbl_name, String name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; + + /** + * @param Role + * role object + * @return + * @throws MetaException + * @throws TException + */ + public boolean create_role(Role role) + throws MetaException, TException; + + /** + * @param role_name + * role name + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean drop_role(String role_name) throws MetaException, TException; + + /** + * + * @param role_name + * @param user_name + * @param principalType + * @param grantor + * @param grantorType + * @param grantOption + * @return + * @throws MetaException + * @throws TException + */ + public boolean grant_role(String role_name, String user_name, + PrincipalType principalType, String grantor, PrincipalType grantorType, + boolean grantOption) throws MetaException, TException; + + /** + * @param role_name + * role name + * @param user_name + * user name + * @param principalType + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean revoke_role(String role_name, String user_name, + PrincipalType principalType) throws MetaException, TException; + + /** + * + * @param principalName + * @param principalType + * @return + * @throws MetaException + * @throws TException + */ + public List list_roles(String principalName, PrincipalType principalType) + throws MetaException, TException; + + /** + * @param hiveObject + * @param user_name + * @param group_names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, + String user_name, List group_names) throws MetaException, + TException; + + /** + * @param principal_name + * @param principal_type + * @param hiveObject + * @return + * @throws MetaException + * @throws TException + */ + public List list_privileges(String principal_name, + PrincipalType principal_type, HiveObjectRef hiveObject) + throws MetaException, TException; + + /** + * @param privileges + * @return + * @throws MetaException + * @throws TException + */ + public boolean grant_privileges(PrivilegeBag privileges) + throws MetaException, TException; + + /** + * @param privileges + * @return + * @throws MetaException + * @throws TException + */ + public boolean revoke_privileges(PrivilegeBag privileges) + 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 1057802) +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (working copy) @@ -21,9 +21,11 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.Map.Entry; import java.util.Properties; import java.util.concurrent.locks.Lock; @@ -44,15 +46,24 @@ 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.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; +import org.apache.hadoop.hive.metastore.api.HiveObjectRef; +import org.apache.hadoop.hive.metastore.api.HiveObjectType; import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; 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.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrincipalType; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo; +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,13 +73,21 @@ 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.MDBPrivilege; +import org.apache.hadoop.hive.metastore.model.MPartitionColumnPrivilege; +import org.apache.hadoop.hive.metastore.model.MPartitionPrivilege; +import org.apache.hadoop.hive.metastore.model.MRole; +import org.apache.hadoop.hive.metastore.model.MTableColumnPrivilege; +import org.apache.hadoop.hive.metastore.model.MGlobalPrivilege; +import org.apache.hadoop.hive.metastore.model.MRoleMap; import org.apache.hadoop.hive.metastore.model.MSerDeInfo; import org.apache.hadoop.hive.metastore.model.MStorageDescriptor; import org.apache.hadoop.hive.metastore.model.MTable; +import org.apache.hadoop.hive.metastore.model.MTablePrivilege; import org.apache.hadoop.hive.metastore.model.MType; -import org.apache.hadoop.hive.metastore.parser.ExpressionTree.ANTLRNoCaseStringStream; import org.apache.hadoop.hive.metastore.parser.FilterLexer; import org.apache.hadoop.hive.metastore.parser.FilterParser; +import org.apache.hadoop.hive.metastore.parser.ExpressionTree.ANTLRNoCaseStringStream; import org.apache.hadoop.util.StringUtils; /** @@ -361,7 +380,7 @@ db.setParameters(mdb.getParameters()); return db; } - + /** * Alter the database object in metastore. Currently only the parameters * of the database can be changed. @@ -556,6 +575,21 @@ 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(); + putPersistentPrivObjects(mtbl, toPersistPrivObjs, now, userPrivs, PrincipalType.USER); + + Map> groupPrivs = principalPrivs.getGroupPrivileges(); + putPersistentPrivObjects(mtbl, toPersistPrivObjs, now, groupPrivs, PrincipalType.GROUP); + + Map> rolePrivs = principalPrivs.getRolePrivileges(); + putPersistentPrivObjects(mtbl, toPersistPrivObjs, now, rolePrivs, PrincipalType.ROLE); + } + pm.makePersistentAll(toPersistPrivObjs); commited = commitTransaction(); } finally { if (!commited) { @@ -564,6 +598,39 @@ } } + /** + * Convert PrivilegeGrantInfo from privMap to MTablePrivilege, and add all of + * them to the toPersistPrivObjs. These privilege objects will be persisted as + * part of createTable. + * + * @param mtbl + * @param toPersistPrivObjs + * @param now + * @param privMap + * @param type + */ + private void putPersistentPrivObjects(MTable mtbl, List toPersistPrivObjs, + int now, Map> privMap, PrincipalType type) { + if (privMap != null) { + for (Map.Entry> entry : privMap + .entrySet()) { + String principalName = entry.getKey(); + List privs = entry.getValue(); + for (int i = 0; i < privs.size(); i++) { + PrivilegeGrantInfo priv = privs.get(i); + if (priv == null) { + continue; + } + MTablePrivilege mTblSec = new MTablePrivilege( + principalName, type.toString(), mtbl, priv.getPrivilege(), + now, priv.getGrantor(), priv.getGrantorType().toString(), priv + .isGrantOption()); + toPersistPrivObjs.add(mTblSec); + } + } + } + } + public boolean dropTable(String dbName, String tableName) throws MetaException { boolean success = false; try { @@ -572,9 +639,29 @@ pm.retrieve(tbl); if (tbl != null) { // first remove all the partitions + List tabGrants = listAllTableGrants(dbName, tableName); + if (tabGrants != null && tabGrants.size() > 0) { + pm.deletePersistentAll(tabGrants); + } + List tblColGrants = listTableAllColumnGrants(dbName, + tableName); + if (tblColGrants != null && tblColGrants.size() > 0) { + pm.deletePersistentAll(tblColGrants); + } + + List partGrants = this.listTableAllPartitionGrants(dbName, tableName); + if (partGrants != null && partGrants.size() > 0) { + pm.deletePersistentAll(partGrants); + } + + List partColGrants = listTableAllPartitionColumnGrants(dbName, + tableName); + if (partColGrants != null && partColGrants.size() > 0) { + pm.deletePersistentAll(partColGrants); + } pm.deletePersistentAll(listMPartitions(dbName, tableName, -1)); // then remove the table - pm.deletePersistent(tbl); + pm.deletePersistentAll(tbl); } success = commitTransaction(); } finally { @@ -584,7 +671,7 @@ } return success; } - + public Table getTable(String dbName, String tableName) throws MetaException { boolean commited = false; Table tbl = null; @@ -820,9 +907,45 @@ boolean success = false; boolean commited = false; try { + MTable table = this.getMTable(part.getDbName(), part.getTableName()); + List tabGrants = null; + List tabColumnGrants = null; + if ("TRUE".equalsIgnoreCase(table.getParameters().get("PARTITION_LEVEL_PRIVILEGE"))) { + tabGrants = this.listAllTableGrants(part + .getDbName(), part.getTableName()); + tabColumnGrants = this.listTableAllColumnGrants( + part.getDbName(), part.getTableName()); + } openTransaction(); MPartition mpart = convertToMPart(part); pm.makePersistent(mpart); + + int now = (int)(System.currentTimeMillis()/1000); + List toPersist = new ArrayList(); + if (tabGrants != null) { + for (MTablePrivilege tab: tabGrants) { + MPartitionPrivilege partGrant = new MPartitionPrivilege(tab + .getPrincipalName(), tab.getPrincipalType(), + mpart, tab.getPrivilege(), now, tab.getGrantor(), tab + .getGrantorType(), tab.getGrantOption()); + toPersist.add(partGrant); + } + } + + if (tabColumnGrants != null) { + for (MTableColumnPrivilege col : tabColumnGrants) { + MPartitionColumnPrivilege partColumn = new MPartitionColumnPrivilege(col + .getPrincipalName(), col.getPrincipalType(), mpart, col + .getColumnName(), col.getPrivilege(), now, col.getGrantor(), col + .getGrantorType(), col.getGrantOption()); + toPersist.add(partColumn); + } + + if (toPersist.size() > 0) { + pm.makePersistentAll(toPersist); + } + } + commited = commitTransaction(); success = true; } finally { @@ -839,11 +962,12 @@ 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; } - + private MPartition getMPartition(String dbName, String tableName, List part_vals) throws MetaException { MPartition mpart = null; @@ -909,6 +1033,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 = listPartitionGrants( + dbName, tableName, partName); + + if (partGrants != null && partGrants.size() > 0) { + pm.deletePersistentAll(partGrants); + } + + List partColumnGrants = listPartitionAllColumnGrants( + dbName, tableName, partName); + if (partColumnGrants != null && partColumnGrants.size() > 0) { + pm.deletePersistentAll(partColumnGrants); + } + pm.deletePersistent(part); } success = commitTransaction(); @@ -929,6 +1073,73 @@ return parts; } + @Override + public List getPartitionsWithAuth(String dbName, String tblName, + short maxParts, String userName, List groupNames) + throws MetaException, NoSuchObjectException, InvalidObjectException { + boolean success = false; + try { + 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); + parts.add(part); + + if ("TRUE".equalsIgnoreCase(mtbl.getParameters().get("PARTITION_LEVEL_PRIVILEGE"))) { + String partName = Warehouse.makePartName(this.convertToFieldSchemas(mtbl + .getPartitionKeys()), part.getValues()); + PrincipalPrivilegeSet partAuth = this.getPartitionPrivilegeSet(dbName, + tblName, partName, userName, groupNames); + part.setPrivileges(partAuth); + } + } + } + success = commitTransaction(); + return parts; + } finally { + if (!success) { + rollbackTransaction(); + } + } + } + + @Override + public Partition getPartitionWithAuth(String dbName, String tblName, + List partVals, String user_name, List group_names) + throws NoSuchObjectException, MetaException, InvalidObjectException { + boolean success = false; + try { + 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); + if ("TRUE".equalsIgnoreCase(mtbl.getParameters().get("PARTITION_LEVEL_PRIVILEGE"))) { + String partName = Warehouse.makePartName(this.convertToFieldSchemas(mtbl + .getPartitionKeys()), partVals); + PrincipalPrivilegeSet partAuth = this.getPartitionPrivilegeSet(dbName, + tblName, partName, user_name, group_names); + part.setPrivileges(partAuth); + } + + success = commitTransaction(); + return part; + } finally { + if (!success) { + rollbackTransaction(); + } + } + } + + private List convertToParts(List mparts) throws MetaException { List parts = new ArrayList(mparts.size()); @@ -1418,4 +1629,1539 @@ } return pns; } + + @Override + public boolean addRole(String roleName, String ownerName) + throws InvalidObjectException, MetaException, NoSuchObjectException { + boolean success = false; + boolean commited = false; + try { + openTransaction(); + MRole nameCheck = this.getMRole(roleName); + if (nameCheck != null) { + throw new InvalidObjectException("Role " + roleName + " already exists."); + } + int now = (int)(System.currentTimeMillis()/1000); + MRole mRole = new MRole(roleName, now, + ownerName); + pm.makePersistent(mRole); + commited = commitTransaction(); + success = true; + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return success; + } + + @Override + public boolean grantRole(Role role, String userName, + PrincipalType principalType, String grantor, PrincipalType grantorType, + boolean grantOption) throws MetaException, NoSuchObjectException,InvalidObjectException { + boolean success = false; + boolean commited = false; + try { + MRoleMap roleMap = null; + try { + roleMap = this.getMSecurityUserRoleMap(userName, principalType, role + .getRoleName()); + } catch (Exception e) { + } + if (roleMap != null) { + throw new InvalidObjectException("Principal " + userName + + " already has the role " + role.getRoleName()); + } + openTransaction(); + MRole mRole = getMRole(role.getRoleName()); + long now = System.currentTimeMillis()/1000; + MRoleMap roleMember = new MRoleMap(userName, principalType.toString(), + mRole, (int) now, grantor, grantorType.toString(), grantOption); + pm.makePersistent(roleMember); + commited = commitTransaction(); + success = true; + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return success; + } + + @Override + public boolean revokeRole(Role role, String userName, PrincipalType principalType) throws MetaException, NoSuchObjectException { + boolean success = false; + try { + openTransaction(); + MRoleMap roleMember = getMSecurityUserRoleMap(userName, principalType, + role.getRoleName()); + pm.deletePersistent(roleMember); + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return success; + } + + private MRoleMap getMSecurityUserRoleMap(String userName, + PrincipalType principalType, String roleName) { + MRoleMap mRoleMember = null; + boolean commited = false; + try { + openTransaction(); + Query query = pm.newQuery(MRoleMap.class, "principalName == t1 && principalType == t2 && role.roleName == t3"); + query.declareParameters("java.lang.String t1, java.lang.String t2, java.lang.String t3"); + query.setUnique(true); + mRoleMember = (MRoleMap) query.executeWithArray(userName, principalType.toString(), roleName); + pm.retrieve(mRoleMember); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return mRoleMember; + } + + @Override + public boolean removeRole(String roleName) throws MetaException, + NoSuchObjectException { + boolean success = false; + try { + openTransaction(); + MRole mRol = getMRole(roleName); + pm.retrieve(mRol); + if (mRol != null) { + // first remove all the membership, the membership that this role has + // been granted + List roleMap = listRoleMembers(mRol); + if (roleMap.size() > 0) { + pm.deletePersistentAll(roleMap); + } + List roleMember = listMSecurityPrincipalMembershipRole(mRol + .getRoleName(), PrincipalType.ROLE); + if (roleMember.size() > 0) { + pm.deletePersistentAll(roleMember); + } + // then remove all the grants + List userGrants = listPrincipalGlobalGrants( + mRol.getRoleName(), PrincipalType.ROLE); + if (userGrants.size() > 0) { + pm.deletePersistentAll(userGrants); + } + List dbGrants = listPrincipalAllDBGrant(mRol + .getRoleName(), PrincipalType.ROLE); + if (dbGrants.size() > 0) { + pm.deletePersistentAll(dbGrants); + } + List tabPartGrants = listPrincipalAllTableGrants( + mRol.getRoleName(), PrincipalType.ROLE); + if (tabPartGrants.size() > 0) { + pm.deletePersistentAll(tabPartGrants); + } + List partGrants = listPrincipalAllPartitionGrants( + mRol.getRoleName(), PrincipalType.ROLE); + if (partGrants.size() > 0) { + pm.deletePersistentAll(partGrants); + } + List tblColumnGrants = listPrincipalAllTableColumnGrants( + mRol.getRoleName(), PrincipalType.ROLE); + if (tblColumnGrants.size() > 0) { + pm.deletePersistentAll(tblColumnGrants); + } + List partColumnGrants = listPrincipalAllPartitionColumnGrants( + mRol.getRoleName(), PrincipalType.ROLE); + if (tblColumnGrants.size() > 0) { + pm.deletePersistentAll(partColumnGrants); + } + // finally remove the role + pm.deletePersistent(mRol); + } + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return success; + } + + private List listRoles(String userName, + List groupNames) { + List ret = new ArrayList(); + if(userName != null) { + ret.addAll(listRoles(userName, PrincipalType.USER)); + } + if (groupNames != null) { + for (String groupName: groupNames) { + ret.addAll(listRoles(groupName, PrincipalType.GROUP)); + } + } + return ret; + } + + @SuppressWarnings("unchecked") + @Override + public List listRoles(String principalName, + PrincipalType principalType) { + boolean success = false; + List mRoleMember = null; + try { + openTransaction(); + LOG.debug("Executing listRoles"); + Query query = pm + .newQuery( + MRoleMap.class, + "principalName == t1 && principalType == t2"); + query + .declareParameters("java.lang.String t1, java.lang.String t2"); + query.setUnique(false); + mRoleMember = (List) query.executeWithArray( + principalName, principalType.toString()); + 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 PrincipalType principalType) { + boolean success = false; + List mRoleMemebership = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalMembershipRole"); + Query query = pm.newQuery(MRoleMap.class, + "principalName == t1 && principalType == t2"); + query + .declareParameters("java.lang.String t1, java.lang.String t2"); + mRoleMemebership = (List) query.execute(roleName, principalType.toString()); + 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) throws NoSuchObjectException { + MRole mRole = this.getMRole(roleName); + if (mRole == null) { + throw new NoSuchObjectException(roleName + " role can not be found."); + } + Role ret = new Role(mRole.getRoleName(), mRole.getCreateTime(), mRole + .getOwnerName()); + return ret; + } + + private MRole getMRole(String roleName) { + MRole mrole = null; + boolean commited = false; + try { + openTransaction(); + Query query = pm.newQuery(MRole.class, "roleName == t1"); + query.declareParameters("java.lang.String t1"); + query.setUnique(true); + mrole = (MRole) query.execute(roleName); + 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.listPrincipalGlobalGrants(userName, PrincipalType.USER); + if(user.size()>0) { + Map> userPriv = new HashMap>(); + List grantInfos = new ArrayList(user.size()); + for (int i = 0; i < user.size(); i++) { + MGlobalPrivilege item = user.get(i); + grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item + .getCreateTime(), item.getGrantor(), getPrincipalTypeFromStr(item + .getGrantorType()), item.getGrantOption())); + } + userPriv.put(userName, grantInfos); + ret.setUserPrivileges(userPriv); + } + } + if (groupNames != null && groupNames.size() > 0) { + Map> groupPriv = new HashMap>(); + for(String groupName: groupNames) { + List group = this.listPrincipalGlobalGrants(groupName, PrincipalType.GROUP); + if(group.size()>0) { + List grantInfos = new ArrayList(group.size()); + for (int i = 0; i < group.size(); i++) { + MGlobalPrivilege item = group.get(i); + grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item + .getCreateTime(), item.getGrantor(), getPrincipalTypeFromStr(item + .getGrantorType()), item.getGrantOption())); + } + groupPriv.put(groupName, grantInfos); + } + } + ret.setGroupPrivileges(groupPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + public List getDBPrivilege(String dbName, + String principalName, PrincipalType principalType) + throws InvalidObjectException, MetaException { + dbName = dbName.toLowerCase().trim(); + + if (principalName != null) { + List userNameDbPriv = this.listPrincipalDBGrants( + principalName, principalType, dbName); + if (userNameDbPriv != null && userNameDbPriv.size() > 0) { + List grantInfos = new ArrayList( + userNameDbPriv.size()); + for (int i = 0; i < userNameDbPriv.size(); i++) { + MDBPrivilege item = userNameDbPriv.get(i); + grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item + .getCreateTime(), item.getGrantor(), getPrincipalTypeFromStr(item + .getGrantorType()), item.getGrantOption())); + } + return grantInfos; + } + } + return new ArrayList(0); + } + + + @Override + public PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, + String userName, List groupNames) throws InvalidObjectException, + MetaException { + boolean commited = false; + dbName = dbName.toLowerCase().trim(); + + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map> dbUserPriv = new HashMap>(); + dbUserPriv.put(userName, getDBPrivilege(dbName, userName, + PrincipalType.USER)); + ret.setUserPrivileges(dbUserPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map> dbGroupPriv = new HashMap>(); + for (String groupName : groupNames) { + dbGroupPriv.put(groupName, getDBPrivilege(dbName, groupName, + PrincipalType.GROUP)); + } + ret.setGroupPrivileges(dbGroupPriv); + } + List roles = listRoles(userName, groupNames); + if (roles != null && roles.size() > 0) { + Map> dbRolePriv = new HashMap>(); + for (MRoleMap role : roles) { + String name = role.getRole().getRoleName(); + dbRolePriv + .put(name, getDBPrivilege(dbName, name, PrincipalType.ROLE)); + } + ret.setRolePrivileges(dbRolePriv); + } + 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(); + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + try { + openTransaction(); + if (userName != null) { + Map> partUserPriv = new HashMap>(); + partUserPriv.put(userName, getPartitionPrivilege(dbName, + tableName, partition, userName, PrincipalType.USER)); + ret.setUserPrivileges(partUserPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map> partGroupPriv = new HashMap>(); + for (String groupName : groupNames) { + partGroupPriv.put(groupName, getPartitionPrivilege(dbName, tableName, + partition, groupName, PrincipalType.GROUP)); + } + ret.setGroupPrivileges(partGroupPriv); + } + List roles = listRoles(userName, groupNames); + if (roles != null && roles.size() > 0) { + Map> partRolePriv = new HashMap>(); + for (MRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + partRolePriv.put(roleName, getPartitionPrivilege(dbName, tableName, + partition, roleName, PrincipalType.ROLE)); + } + ret.setRolePrivileges(partRolePriv); + } + 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(); + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + try { + openTransaction(); + if (userName != null) { + Map> tableUserPriv = new HashMap>(); + tableUserPriv.put(userName, getTablePrivilege(dbName, + tableName, userName, PrincipalType.USER)); + ret.setUserPrivileges(tableUserPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map> tableGroupPriv = new HashMap>(); + for (String groupName : groupNames) { + tableGroupPriv.put(groupName, getTablePrivilege(dbName, tableName, + groupName, PrincipalType.GROUP)); + } + ret.setGroupPrivileges(tableGroupPriv); + } + List roles = listRoles(userName, groupNames); + if (roles != null && roles.size() > 0) { + Map> tableRolePriv = new HashMap>(); + for (MRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + tableRolePriv.put(roleName, getTablePrivilege(dbName, tableName, + roleName, PrincipalType.ROLE)); + } + ret.setRolePrivileges(tableRolePriv); + } + 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 { + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + columnName = columnName.toLowerCase().trim(); + + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map> columnUserPriv = new HashMap>(); + columnUserPriv.put(userName, getColumnPrivilege(dbName, tableName, + columnName, partitionName, userName, PrincipalType.USER)); + ret.setUserPrivileges(columnUserPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map> columnGroupPriv = new HashMap>(); + for (String groupName : groupNames) { + columnGroupPriv.put(groupName, getColumnPrivilege(dbName, tableName, + columnName, partitionName, groupName, PrincipalType.GROUP)); + } + ret.setGroupPrivileges(columnGroupPriv); + } + List roles = listRoles(userName, groupNames); + if (roles != null && roles.size() > 0) { + Map> columnRolePriv = new HashMap>(); + for (MRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + columnRolePriv.put(roleName, getColumnPrivilege(dbName, tableName, + columnName, partitionName, roleName, PrincipalType.ROLE)); + } + ret.setRolePrivileges(columnRolePriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + private List getPartitionPrivilege(String dbName, + String tableName, String partName, String principalName, + PrincipalType principalType) { + + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + if (principalName != null) { + List userNameTabPartPriv = this + .listPrincipalPartitionGrants(principalName, principalType, + dbName, tableName, partName); + if (userNameTabPartPriv != null && userNameTabPartPriv.size() > 0) { + List grantInfos = new ArrayList( + userNameTabPartPriv.size()); + for (int i = 0; i < userNameTabPartPriv.size(); i++) { + MPartitionPrivilege item = userNameTabPartPriv.get(i); + grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item + .getCreateTime(), item.getGrantor(), + getPrincipalTypeFromStr(item.getGrantorType()), item.getGrantOption())); + + } + return grantInfos; + } + } + return new ArrayList(0); + } + + private PrincipalType getPrincipalTypeFromStr(String str) { + return str == null ? null : PrincipalType.valueOf(str); + } + + private List getTablePrivilege(String dbName, + String tableName, String principalName, PrincipalType principalType) { + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + if (principalName != null) { + List userNameTabPartPriv = this + .listAllTableGrants(principalName, principalType, + dbName, tableName); + if (userNameTabPartPriv != null && userNameTabPartPriv.size() > 0) { + List grantInfos = new ArrayList( + userNameTabPartPriv.size()); + for (int i = 0; i < userNameTabPartPriv.size(); i++) { + MTablePrivilege item = userNameTabPartPriv.get(i); + grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item + .getCreateTime(), item.getGrantor(), getPrincipalTypeFromStr(item + .getGrantorType()), item.getGrantOption())); + } + return grantInfos; + } + } + return new ArrayList(0); + } + + private List getColumnPrivilege(String dbName, + String tableName, String columnName, String partitionName, + String principalName, PrincipalType principalType) { + + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + columnName = columnName.toLowerCase().trim(); + + if (partitionName == null) { + List userNameColumnPriv = this + .listPrincipalTableColumnGrants(principalName, principalType, + dbName, tableName, columnName); + if (userNameColumnPriv != null && userNameColumnPriv.size() > 0) { + List grantInfos = new ArrayList( + userNameColumnPriv.size()); + for (int i = 0; i < userNameColumnPriv.size(); i++) { + MTableColumnPrivilege item = userNameColumnPriv.get(i); + grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item + .getCreateTime(), item.getGrantor(), getPrincipalTypeFromStr(item + .getGrantorType()), item.getGrantOption())); + } + return grantInfos; + } + } else { + List userNameColumnPriv = this + .listPrincipalPartitionColumnGrants(principalName, + principalType, dbName, tableName, partitionName, columnName); + if (userNameColumnPriv != null && userNameColumnPriv.size() > 0) { + List grantInfos = new ArrayList( + userNameColumnPriv.size()); + for (int i = 0; i < userNameColumnPriv.size(); i++) { + MPartitionColumnPrivilege item = userNameColumnPriv.get(i); + grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item + .getCreateTime(), item.getGrantor(), getPrincipalTypeFromStr(item + .getGrantorType()), item.getGrantOption())); + } + return grantInfos; + } + } + return new ArrayList(0); + } + + @Override + public boolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectException, + MetaException, NoSuchObjectException { + boolean committed = false; + int now = (int) (System.currentTimeMillis() / 1000); + try { + openTransaction(); + List persistentObjs = new ArrayList(); + + List privilegeList = privileges.getPrivileges(); + + if (privilegeList != null && privilegeList.size() > 0) { + Iterator privIter = privilegeList.iterator(); + Set privSet = new HashSet(); + while (privIter.hasNext()) { + HiveObjectPrivilege privDef = privIter.next(); + HiveObjectRef hiveObject = privDef.getHiveObject(); + String privilegeStr = privDef.getGrantInfo().getPrivilege(); + String[] privs = privilegeStr.split(","); + String userName = privDef.getPrincipalName(); + PrincipalType principalType = privDef.getPrincipalType(); + String grantor = privDef.getGrantInfo().getGrantor(); + String grantorType = privDef.getGrantInfo().getGrantorType().toString(); + boolean grantOption = privDef.getGrantInfo().isGrantOption(); + privSet.clear(); + + if (hiveObject.getObjectType() == HiveObjectType.GLOBAL) { + List globalPrivs = this + .listPrincipalGlobalGrants(userName, principalType); + if (globalPrivs != null) { + for (MGlobalPrivilege priv : globalPrivs) { + if (priv.getGrantor().equalsIgnoreCase(grantor)) { + privSet.add(priv.getPrivilege()); + } + } + } + for (String privilege : privs) { + if (privSet.contains(privilege)) { + throw new InvalidObjectException(privilege + + " is already granted by " + grantor); + } + MGlobalPrivilege mGlobalPrivs = new MGlobalPrivilege(userName, + principalType.toString(), privilege, now, grantor, grantorType, grantOption); + persistentObjs.add(mGlobalPrivs); + } + } else if (hiveObject.getObjectType() == HiveObjectType.DATABASE) { + MDatabase dbObj = getMDatabase(hiveObject.getDbName()); + if (dbObj != null) { + List dbPrivs = this.listPrincipalDBGrants( + userName, principalType, hiveObject.getDbName()); + if (dbPrivs != null) { + for (MDBPrivilege priv : dbPrivs) { + if (priv.getGrantor().equalsIgnoreCase(grantor)) { + privSet.add(priv.getPrivilege()); + } + } + } + for (String privilege : privs) { + if (privSet.contains(privilege)) { + throw new InvalidObjectException(privilege + + " is already granted on database " + + hiveObject.getDbName() + " by " + grantor); + } + MDBPrivilege mDb = new MDBPrivilege(userName, principalType + .toString(), dbObj, privilege, now, grantor, grantorType, grantOption); + persistentObjs.add(mDb); + } + } + } else if (hiveObject.getObjectType() == HiveObjectType.TABLE) { + MTable tblObj = getMTable(hiveObject.getDbName(), hiveObject + .getObjectName()); + if (tblObj != null) { + List tablePrivs = this + .listAllTableGrants(userName, principalType, + hiveObject.getDbName(), hiveObject.getObjectName()); + if (tablePrivs != null) { + for (MTablePrivilege priv : tablePrivs) { + if (priv.getGrantor() != null + && priv.getGrantor().equalsIgnoreCase(grantor)) { + privSet.add(priv.getPrivilege()); + } + } + } + for (String privilege : privs) { + if (privSet.contains(privilege)) { + throw new InvalidObjectException(privilege + + " is already granted on table [" + + hiveObject.getDbName() + "," + + hiveObject.getObjectName() + "] by " + grantor); + } + MTablePrivilege mTab = new MTablePrivilege( + userName, principalType.toString(), tblObj, + privilege, now, grantor, grantorType, grantOption); + persistentObjs.add(mTab); + } + } + } else if (hiveObject.getObjectType() == HiveObjectType.PARTITION) { + MPartition partObj = this.getMPartition(hiveObject.getDbName(), + hiveObject.getObjectName(), hiveObject.getPartValues()); + String partName = null; + if (partObj != null) { + partName = partObj.getPartitionName(); + List partPrivs = this + .listPrincipalPartitionGrants(userName, + principalType, hiveObject.getDbName(), hiveObject + .getObjectName(), partObj.getPartitionName()); + if (partPrivs != null) { + for (MPartitionPrivilege priv : partPrivs) { + if (priv.getGrantor().equalsIgnoreCase(grantor)) { + privSet.add(priv.getPrivilege()); + } + } + } + for (String privilege : privs) { + if (privSet.contains(privilege)) { + throw new InvalidObjectException(privilege + + " is already granted on partition [" + + hiveObject.getDbName() + "," + + hiveObject.getObjectName() + "," + + partName + "] by " + grantor); + } + MPartitionPrivilege mTab = new MPartitionPrivilege(userName, + principalType.toString(), partObj, privilege, now, grantor, + grantorType, grantOption); + persistentObjs.add(mTab); + } + } + } else if (hiveObject.getObjectType() == HiveObjectType.COLUMN) { + MTable tblObj = getMTable(hiveObject.getDbName(), hiveObject + .getObjectName()); + if (tblObj != null) { + if (hiveObject.getPartValues() != null) { + MPartition partObj = null; + List colPrivs = null; + partObj = this.getMPartition(hiveObject.getDbName(), hiveObject + .getObjectName(), hiveObject.getPartValues()); + if (partObj == null) { + continue; + } + colPrivs = this.listPrincipalPartitionColumnGrants( + userName, principalType, hiveObject.getDbName(), hiveObject + .getObjectName(), partObj.getPartitionName(), + hiveObject.getColumnName()); + + if (colPrivs != null) { + for (MPartitionColumnPrivilege priv : colPrivs) { + if (priv.getGrantor().equalsIgnoreCase(grantor)) { + privSet.add(priv.getPrivilege()); + } + } + } + for (String privilege : privs) { + if (privSet.contains(privilege)) { + throw new InvalidObjectException(privilege + + " is already granted on column " + + hiveObject.getColumnName() + " [" + + hiveObject.getDbName() + "," + + hiveObject.getObjectName() + "," + + partObj.getPartitionName() + "] by " + grantor); + } + MPartitionColumnPrivilege mCol = new MPartitionColumnPrivilege(userName, + principalType.toString(), partObj, hiveObject + .getColumnName(), privilege, now, grantor, grantorType, + grantOption); + persistentObjs.add(mCol); + } + + } else { + List colPrivs = null; + colPrivs = this.listPrincipalTableColumnGrants( + userName, principalType, hiveObject.getDbName(), hiveObject + .getObjectName(), hiveObject.getColumnName()); + + if (colPrivs != null) { + for (MTableColumnPrivilege priv : colPrivs) { + if (priv.getGrantor().equalsIgnoreCase(grantor)) { + privSet.add(priv.getPrivilege()); + } + } + } + for (String privilege : privs) { + if (privSet.contains(privilege)) { + throw new InvalidObjectException(privilege + + " is already granted on column " + + hiveObject.getColumnName() + " [" + + hiveObject.getDbName() + "," + + hiveObject.getObjectName() + "] by " + grantor); + } + MTableColumnPrivilege mCol = new MTableColumnPrivilege(userName, + principalType.toString(), tblObj, hiveObject + .getColumnName(), privilege, now, grantor, grantorType, + grantOption); + persistentObjs.add(mCol); + } + } + } + } + } + } + if (persistentObjs.size() > 0) { + pm.makePersistentAll(persistentObjs); + } + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + return committed; + } + + @Override + public boolean revokePrivileges(PrivilegeBag privileges) + throws InvalidObjectException, MetaException, NoSuchObjectException { + boolean committed = false; + try { + openTransaction(); + List persistentObjs = new ArrayList(); + + List privilegeList = privileges.getPrivileges(); + + + if (privilegeList != null && privilegeList.size() > 0) { + Iterator privIter = privilegeList.iterator(); + + while (privIter.hasNext()) { + HiveObjectPrivilege privDef = privIter.next(); + HiveObjectRef hiveObject = privDef.getHiveObject(); + String privilegeStr = privDef.getGrantInfo().getPrivilege(); + if (privilegeStr == null || privilegeStr.trim().equals("")) { + continue; + } + String[] privs = privilegeStr.split(","); + String userName = privDef.getPrincipalName(); + PrincipalType principalType = privDef.getPrincipalType(); + + if (hiveObject.getObjectType() == HiveObjectType.GLOBAL) { + List mSecUser = this.listPrincipalGlobalGrants( + userName, principalType); + boolean found = false; + if (mSecUser != null) { + for (String privilege : privs) { + for (MGlobalPrivilege userGrant : mSecUser) { + String userGrantPrivs = userGrant.getPrivilege(); + if (privilege.equals(userGrantPrivs)) { + found = true; + persistentObjs.add(userGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException( + "No user grant found for privileges " + privilege); + } + } + } + + } else if (hiveObject.getObjectType() == HiveObjectType.DATABASE) { + MDatabase dbObj = getMDatabase(hiveObject.getDbName()); + if (dbObj != null) { + String db = hiveObject.getDbName(); + boolean found = false; + List dbGrants = this.listPrincipalDBGrants( + userName, principalType, db); + for (String privilege : privs) { + for (MDBPrivilege dbGrant : dbGrants) { + String dbGrantPriv = dbGrant.getPrivilege(); + if (privilege.equals(dbGrantPriv)) { + found = true; + persistentObjs.add(dbGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException( + "No database grant found for privileges " + privilege + + " on database " + db); + } + } + } + } else if (hiveObject.getObjectType() == HiveObjectType.TABLE) { + boolean found = false; + List tableGrants = this + .listAllTableGrants(userName, principalType, + hiveObject.getDbName(), hiveObject.getObjectName()); + for (String privilege : privs) { + for (MTablePrivilege tabGrant : tableGrants) { + String tableGrantPriv = tabGrant.getPrivilege(); + if (privilege.equalsIgnoreCase(tableGrantPriv)) { + found = true; + persistentObjs.add(tabGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + privilege + + ") found " + " on table " + hiveObject.getObjectName() + + ", database is " + hiveObject.getDbName()); + } + } + } else if (hiveObject.getObjectType() == HiveObjectType.PARTITION) { + + boolean found = false; + Table tabObj = this.getTable(hiveObject.getDbName(), hiveObject.getObjectName()); + String partName = null; + if (hiveObject.getPartValues() != null) { + partName = Warehouse.makePartName(tabObj.getPartitionKeys(), hiveObject.getPartValues()); + } + List partitionGrants = this + .listPrincipalPartitionGrants(userName, principalType, + hiveObject.getDbName(), hiveObject.getObjectName(), partName); + for (String privilege : privs) { + for (MPartitionPrivilege partGrant : partitionGrants) { + String partPriv = partGrant.getPrivilege(); + if (partPriv.equalsIgnoreCase(privilege)) { + found = true; + persistentObjs.add(partGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + privilege + + ") found " + " on table " + tabObj.getTableName() + + ", partition is " + partName + ", database is " + tabObj.getDbName()); + } + } + } else if (hiveObject.getObjectType() == HiveObjectType.COLUMN) { + + Table tabObj = this.getTable(hiveObject.getDbName(), hiveObject + .getObjectName()); + String partName = null; + if (hiveObject.getPartValues() != null) { + partName = Warehouse.makePartName(tabObj.getPartitionKeys(), + hiveObject.getPartValues()); + } + + if (partName != null) { + List mSecCol = listPrincipalPartitionColumnGrants( + userName, principalType, hiveObject.getDbName(), hiveObject + .getObjectName(), partName, hiveObject.getColumnName()); + boolean found = false; + if (mSecCol != null) { + for (String privilege : privs) { + for (MPartitionColumnPrivilege col : mSecCol) { + String colPriv = col.getPrivilege(); + if (colPriv.equalsIgnoreCase(privilege)) { + found = true; + persistentObjs.add(col); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + privilege + + ") found " + " on table " + tabObj.getTableName() + + ", partition is " + partName + ", column name = " + + hiveObject.getColumnName() + ", database is " + + tabObj.getDbName()); + } + } + } + } else { + List mSecCol = listPrincipalTableColumnGrants( + userName, principalType, hiveObject.getDbName(), hiveObject + .getObjectName(), hiveObject.getColumnName()); + boolean found = false; + if (mSecCol != null) { + for (String privilege : privs) { + for (MTableColumnPrivilege col : mSecCol) { + String colPriv = col.getPrivilege(); + if (colPriv.equalsIgnoreCase(privilege)) { + found = true; + persistentObjs.add(col); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + privilege + + ") found " + " on table " + tabObj.getTableName() + + ", column name = " + + hiveObject.getColumnName() + ", database is " + + tabObj.getDbName()); + } + } + } + } + + } + } + } + + if (persistentObjs.size() > 0) { + pm.deletePersistentAll(persistentObjs); + } + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + return committed; + } + + @SuppressWarnings("unchecked") + private List listRoleMembers( + MRole mRol) { + boolean success = false; + List mRoleMemeberList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityUserRoleMember"); + Query query = pm.newQuery(MRoleMap.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") + @Override + public List listPrincipalGlobalGrants(String principalName, PrincipalType principalType) { + boolean commited = false; + List userNameDbPriv = null; + try { + openTransaction(); + if (principalName != null) { + Query query = pm.newQuery(MGlobalPrivilege.class, + "principalName == t1 && principalType == t2 "); + query.declareParameters( + "java.lang.String t1, java.lang.String t2"); + userNameDbPriv = (List) query + .executeWithArray(principalName, principalType.toString()); + pm.retrieveAll(userNameDbPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return userNameDbPriv; + } + + @SuppressWarnings("unchecked") + @Override + public List listPrincipalDBGrants(String principalName, + PrincipalType principalType, String dbName) { + boolean success = false; + List mSecurityDBList = null; + dbName = dbName.toLowerCase().trim(); + + try { + openTransaction(); + LOG.debug("Executing listPrincipalDBGrants"); + Query query = pm.newQuery(MDBPrivilege.class, + "principalName == t1 && principalType == t2 && database.name == t3"); + query + .declareParameters("java.lang.String t1, java.lang.String t2, java.lang.String t3"); + mSecurityDBList = (List) query.executeWithArray(principalName, principalType.toString(), dbName); + LOG.debug("Done executing query for listPrincipalDBGrants"); + pm.retrieveAll(mSecurityDBList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listPrincipalDBGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityDBList; + } + + @SuppressWarnings("unchecked") + private List listPrincipalAllDBGrant( + String principalName, PrincipalType principalType) { + boolean success = false; + List mSecurityDBList = null; + try { + openTransaction(); + LOG.debug("Executing listPrincipalAllDBGrant"); + Query query = pm.newQuery(MDBPrivilege.class, + "principalName == t1 && principalType == t2"); + query + .declareParameters("java.lang.String t1, java.lang.String t2"); + mSecurityDBList = (List) query.execute(principalName, principalType.toString()); + LOG.debug("Done executing query for listPrincipalAllDBGrant"); + pm.retrieveAll(mSecurityDBList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listPrincipalAllDBGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityDBList; + } + + @SuppressWarnings("unchecked") + public List listAllTableGrants(String dbName, + String tableName) { + boolean success = false; + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + List mSecurityTabList = null; + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + try { + openTransaction(); + LOG.debug("Executing listAllTableGrants"); + String queryStr = "table.tableName == t1 && table.database.name == t2"; + Query query = pm.newQuery( + MTablePrivilege.class, queryStr); + query.declareParameters( + "java.lang.String t1, java.lang.String t2"); + mSecurityTabList = (List) query + .executeWithArray(tableName, dbName); + LOG.debug("Done executing query for listAllTableGrants"); + pm.retrieveAll(mSecurityTabList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listAllTableGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabList; + } + + @SuppressWarnings("unchecked") + public List listTableAllPartitionGrants(String dbName, + String tableName) { + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listTableAllPartitionGrants"); + String queryStr = "partition.table.tableName == t1 && partition.table.database.name == t2"; + Query query = pm.newQuery( + MPartitionPrivilege.class, queryStr); + query.declareParameters( + "java.lang.String t1, java.lang.String t2"); + mSecurityTabPartList = (List) query + .executeWithArray(tableName, dbName); + LOG.debug("Done executing query for listTableAllPartitionGrants"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listTableAllPartitionGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + public List listTableAllColumnGrants(String dbName, + String tableName) { + boolean success = false; + List mTblColPrivilegeList = null; + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + try { + openTransaction(); + LOG.debug("Executing listTableAllColumnGrants"); + String queryStr = "table.tableName == t1 && table.database.name == t2"; + Query query = pm.newQuery(MTableColumnPrivilege.class, queryStr); + query.declareParameters("java.lang.String t1, java.lang.String t2"); + mTblColPrivilegeList = (List) query + .executeWithArray(tableName, dbName); + LOG.debug("Done executing query for listTableAllColumnGrants"); + pm.retrieveAll(mTblColPrivilegeList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listTableAllColumnGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mTblColPrivilegeList; + } + + @SuppressWarnings("unchecked") + public List listTableAllPartitionColumnGrants(String dbName, + String tableName) { + boolean success = false; + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listTableAllPartitionColumnGrants"); + String queryStr = "partition.table.tableName == t1 && partition.table.database.name == t2"; + Query query = pm.newQuery(MPartitionColumnPrivilege.class, queryStr); + query.declareParameters("java.lang.String t1, java.lang.String t2"); + mSecurityColList = (List) query + .executeWithArray(tableName, dbName); + LOG.debug("Done executing query for listTableAllPartitionColumnGrants"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listTableAllPartitionColumnGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + public List listPartitionAllColumnGrants(String dbName, + String tableName, String partName) { + boolean success = false; + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listPartitionAllColumnGrants"); + String queryStr = "partition.table.tableName == t1 && partition.table.database.name == t2 && partition.partitionName == t3"; + Query query = pm.newQuery(MPartitionColumnPrivilege.class, queryStr); + 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 listPartitionAllColumnGrants"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listPartitionAllColumnGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + + @SuppressWarnings("unchecked") + private List listPartitionGrants(String dbName, String tableName, + String partName) { + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listPartitionGrants"); + Query query = pm.newQuery(MPartitionPrivilege.class, + "partition.table.tableName == t1 && partition.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 listPartitionGrants"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listPartitionGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + public List listAllTableGrants( + String principalName, PrincipalType principalType, String dbName, + String tableName) { + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listAllTableGrants"); + Query query = pm.newQuery( + MTablePrivilege.class, + "principalName == t1 && principalType == t2 && table.tableName == t3 && table.database.name == t4"); + query.declareParameters( + "java.lang.String t1, java.lang.String t2, java.lang.String t3, java.lang.String t4"); + mSecurityTabPartList = (List) query + .executeWithArray(principalName, principalType.toString(), tableName, dbName); + LOG.debug("Done executing query for listAllTableGrants"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listAllTableGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + @Override + public List listPrincipalPartitionGrants( + String principalName, PrincipalType principalType, String dbName, + String tableName, String partName) { + boolean success = false; + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalPartitionGrant"); + Query query = pm.newQuery( + MPartitionPrivilege.class, + "principalName == t1 && principalType == t2 && partition.table.tableName == t3 " + + "&& partition.table.database.name == t4 && partition.partitionName == t5"); + query.declareParameters( + "java.lang.String t1, java.lang.String t2, java.lang.String t3, java.lang.String t4, " + + "java.lang.String t5"); + mSecurityTabPartList = (List) query + .executeWithArray(principalName, principalType.toString(), 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") + @Override + public List listPrincipalTableColumnGrants( + String principalName, PrincipalType principalType, String dbName, + String tableName, String columnName) { + boolean success = false; + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + columnName = columnName.toLowerCase().trim(); + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listPrincipalTableColumnGrants"); + String queryStr = "principalName == t1 && principalType == t2 && " + + "table.tableName == t3 && table.database.name == t4 && columnName == t5 "; + Query query = pm.newQuery(MTableColumnPrivilege.class, queryStr); + query + .declareParameters("java.lang.String t1, java.lang.String t2, java.lang.String t3, " + + "java.lang.String t4, java.lang.String t5"); + mSecurityColList = (List) query.executeWithArray( + principalName, principalType.toString(), tableName, dbName, columnName); + LOG.debug("Done executing query for listPrincipalTableColumnGrants"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listPrincipalTableColumnGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + public List listPrincipalPartitionColumnGrants( + String principalName, PrincipalType principalType, String dbName, + String tableName, String partitionName, String columnName) { + boolean success = false; + tableName = tableName.toLowerCase().trim(); + dbName = dbName.toLowerCase().trim(); + columnName = columnName.toLowerCase().trim(); + + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listPrincipalPartitionColumnGrants"); + Query query = pm + .newQuery( + MPartitionColumnPrivilege.class, + "principalName == t1 && principalType == t2 && partition.table.tableName == t3 " + + "&& partition.table.database.name == t4 && partition.partitionName == t5 && columnName == t6"); + query + .declareParameters("java.lang.String t1, java.lang.String t2, java.lang.String t3, " + + "java.lang.String t4, java.lang.String t5, java.lang.String t6"); + + mSecurityColList = (List) query + .executeWithArray(principalName, principalType.toString(), tableName, + dbName, partitionName, columnName); + LOG.debug("Done executing query for listPrincipalPartitionColumnGrants"); + pm.retrieveAll(mSecurityColList); + + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listPrincipalPartitionColumnGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + private List listPrincipalAllTableGrants( + String principalName, PrincipalType principalType) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listPrincipalAllTableGrants"); + Query query = pm.newQuery(MTablePrivilege.class, + "principalName == t1 && principalType == t2"); + query.declareParameters("java.lang.String t1, java.lang.String t2"); + mSecurityTabPartList = (List) query.execute( + principalName, principalType.toString()); + LOG + .debug("Done executing query for listPrincipalAllTableGrants"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listPrincipalAllTableGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + private List listPrincipalAllPartitionGrants( + String principalName, PrincipalType principalType) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listPrincipalAllPartitionGrants"); + Query query = pm.newQuery(MPartitionPrivilege.class, + "principalName == t1 && principalType == t2"); + query.declareParameters("java.lang.String t1, java.lang.String t2"); + mSecurityTabPartList = (List) query.execute( + principalName, principalType.toString()); + LOG + .debug("Done executing query for listPrincipalAllPartitionGrants"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listPrincipalAllPartitionGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + private List listPrincipalAllTableColumnGrants( + String principalName, PrincipalType principalType) { + boolean success = false; + List mSecurityColumnList = null; + try { + openTransaction(); + LOG.debug("Executing listPrincipalAllTableColumnGrants"); + Query query = pm.newQuery(MTableColumnPrivilege.class, + "principalName == t1 && principalType == t2"); + query + .declareParameters("java.lang.String t1, java.lang.String t2"); + mSecurityColumnList = (List) query.execute( + principalName, principalType.toString()); + LOG.debug("Done executing query for listPrincipalAllTableColumnGrants"); + pm.retrieveAll(mSecurityColumnList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listPrincipalAllTableColumnGrants"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColumnList; + } + + @SuppressWarnings("unchecked") + private List listPrincipalAllPartitionColumnGrants( + String principalName, PrincipalType principalType) { + boolean success = false; + List mSecurityColumnList = null; + try { + openTransaction(); + LOG.debug("Executing listPrincipalAllTableColumnGrants"); + Query query = pm.newQuery(MPartitionColumnPrivilege.class, + "principalName == t1 && principalType == t2"); + query + .declareParameters("java.lang.String t1, java.lang.String t2"); + mSecurityColumnList = (List) query.execute( + principalName, principalType.toString()); + LOG.debug("Done executing query for listPrincipalAllTableColumnGrants"); + pm.retrieveAll(mSecurityColumnList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listPrincipalAllTableColumnGrants"); + } 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 1057802) +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (working copy) @@ -27,8 +27,19 @@ 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.PrincipalType; +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.MDBPrivilege; +import org.apache.hadoop.hive.metastore.model.MGlobalPrivilege; +import org.apache.hadoop.hive.metastore.model.MPartitionColumnPrivilege; +import org.apache.hadoop.hive.metastore.model.MPartitionPrivilege; +import org.apache.hadoop.hive.metastore.model.MRoleMap; +import org.apache.hadoop.hive.metastore.model.MTableColumnPrivilege; +import org.apache.hadoop.hive.metastore.model.MTablePrivilege; public interface RawStore extends Configurable { @@ -133,5 +144,73 @@ public abstract List getPartitionsByFilter( String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException; + + public abstract boolean addRole(String rowName, String ownerName) + throws InvalidObjectException, MetaException, NoSuchObjectException; + + public abstract boolean removeRole(String roleName) throws MetaException, NoSuchObjectException; + + public abstract boolean grantRole(Role role, String userName, PrincipalType principalType, + String grantor, PrincipalType grantorType, boolean grantOption) + throws MetaException, NoSuchObjectException, InvalidObjectException; + + public abstract boolean revokeRole(Role role, String userName, PrincipalType principalType) + 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 listPrincipalGlobalGrants(String principalName, + PrincipalType principalType); + + public abstract List listPrincipalDBGrants(String principalName, + PrincipalType principalType, String dbName); + + public abstract List listAllTableGrants( + String principalName, PrincipalType principalType, String dbName, + String tableName); + + public abstract List listPrincipalPartitionGrants( + String principalName, PrincipalType principalType, String dbName, + String tableName, String partName); + + public abstract List listPrincipalTableColumnGrants( + String principalName, PrincipalType principalType, String dbName, + String tableName, String columnName); + + public abstract List listPrincipalPartitionColumnGrants( + String principalName, PrincipalType principalType, String dbName, + String tableName, String partName, String columnName); + + public abstract boolean grantPrivileges (PrivilegeBag privileges) + throws InvalidObjectException, MetaException, NoSuchObjectException; + + public abstract boolean revokePrivileges (PrivilegeBag privileges) + throws InvalidObjectException, MetaException, NoSuchObjectException; + + public abstract org.apache.hadoop.hive.metastore.api.Role getRole(String roleName) throws NoSuchObjectException; + + public List listRoles(String principalName, + PrincipalType principalType); + + 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 1057802) +++ metastore/src/model/package.jdo (working copy) @@ -357,5 +357,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java (revision 0) @@ -0,0 +1,132 @@ +/** + * 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 MDBPrivilege { + + private String principalName; + + private String principalType; + + private MDatabase database; + + private int createTime; + + private String privilege; + + private String grantor; + + private String grantorType; + + private boolean grantOption; + + public MDBPrivilege() { + } + + public MDBPrivilege(String principalName, String principalType, + MDatabase database, String dbPrivileges, int createTime, String grantor, + String grantorType, boolean grantOption) { + super(); + this.principalName = principalName; + this.principalType = principalType; + this.database = database; + this.privilege = dbPrivileges; + this.createTime = createTime; + this.grantorType = grantorType; + this.grantOption = grantOption; + 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 a set of privileges this user/role/group has + */ + public String getPrivilege() { + return privilege; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivilege(String dbPrivilege) { + this.privilege = dbPrivilege; + } + + public MDatabase getDatabase() { + return database; + } + + public void setDatabase(MDatabase database) { + this.database = database; + } + + 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; + } + + public String getGrantorType() { + return grantorType; + } + + public void setGrantorType(String grantorType) { + this.grantorType = grantorType; + } + + public boolean getGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + public String getPrincipalType() { + return principalType; + } + + public void setPrincipalType(String principalType) { + this.principalType = principalType; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java (revision 0) @@ -0,0 +1,120 @@ +/** + * 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 MGlobalPrivilege { + + //principal name, can be a user, group, or role + private String principalName; + + private String principalType; + + private String privilege; + + private int createTime; + + private String grantor; + + private String grantorType; + + private boolean grantOption; + + public MGlobalPrivilege() { + super(); + } + + public MGlobalPrivilege(String userName, String principalType, + String dbPrivilege, int createTime, String grantor, String grantorType, + boolean grantOption) { + super(); + this.principalName = userName; + this.principalType = principalType; + this.privilege = dbPrivilege; + this.createTime = createTime; + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + } + + /** + * @return a set of global privileges granted to this user + */ + public String getPrivilege() { + return privilege; + } + + /** + * @param dbPrivileges set of global privileges to user + */ + public void setPrivilege(String dbPrivilege) { + this.privilege = dbPrivilege; + } + + 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; + } + + public boolean getGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + public String getPrincipalType() { + return principalType; + } + + public void setPrincipalType(String principalType) { + this.principalType = principalType; + } + + public String getGrantorType() { + return grantorType; + } + + public void setGrantorType(String grantorType) { + this.grantorType = grantorType; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java (revision 0) @@ -0,0 +1,160 @@ +/** + * 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 MPartitionColumnPrivilege { + + private String principalName; + + private String principalType; + + private MPartition partition; + + private String columnName; + + private String privilege; + + private int createTime; + + private String grantor; + + private String grantorType; + + private boolean grantOption; + + public MPartitionColumnPrivilege() { + } + + /** + * @param principalName + * @param isRole + * @param isGroup + * @param partition + * @param columnName + * @param privileges + * @param createTime + * @param grantor + */ + public MPartitionColumnPrivilege(String principalName, String principalType, + MPartition partition, String columnName, String privileges, int createTime, + String grantor, String grantorType, boolean grantOption) { + super(); + this.principalName = principalName; + this.principalType = principalType; + this.partition = partition; + this.columnName = columnName; + this.privilege = privileges; + this.createTime = createTime; + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + } + + /** + * @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 getPrivilege() { + return privilege; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivilege(String dbPrivileges) { + this.privilege = 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 MPartition getPartition() { + return partition; + } + + public void setPartition(MPartition partition) { + this.partition = partition; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public String getGrantorType() { + return grantorType; + } + + public void setGrantorType(String grantorType) { + this.grantorType = grantorType; + } + + public boolean getGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + public String getPrincipalType() { + return principalType; + } + + public void setPrincipalType(String principalType) { + this.principalType = principalType; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java (revision 0) @@ -0,0 +1,139 @@ +/** + * 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 MPartitionPrivilege { + + private String principalName; + + private String principalType; + + private MPartition partition; + + private String privilege; + + private int createTime; + + private String grantor; + + private String grantorType; + + private boolean grantOption; + + public MPartitionPrivilege() { + } + + public MPartitionPrivilege(String principalName, String principalType, + MPartition partition, String privilege, int createTime, + String grantor, String grantorType, boolean grantOption) { + super(); + this.principalName = principalName; + this.principalType = principalType; + this.partition = partition; + this.privilege = privilege; + this.createTime = createTime; + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + + /** + * @return a set of privileges this user/role/group has + */ + public String getPrivilege() { + return privilege; + } + + /** + * @param dbPrivilege a set of privileges this user/role/group has + */ + public void setPrivilege(String dbPrivilege) { + this.privilege = dbPrivilege; + } + + /** + * @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 String getPrincipalType() { + return principalType; + } + + public void setPrincipalType(String principalType) { + this.principalType = principalType; + } + + public MPartition getPartition() { + return partition; + } + + public void setPartition(MPartition partition) { + this.partition = partition; + } + + public boolean getGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + public String getGrantorType() { + return grantorType; + } + + public void setGrantorType(String grantorType) { + this.grantorType = grantorType; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MRole.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MRole.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MRole.java (revision 0) @@ -0,0 +1,80 @@ +/** + * 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 MRole { + + private String roleName; + + private int createTime; + + private String ownerName; + + public MRole() { + } + + public MRole(String roleName, int createTime, String ownerName) { + super(); + this.roleName = roleName; + this.createTime = createTime; + this.ownerName = ownerName; + } + + /** + * @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; + } + +} + Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MRoleMap.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MRoleMap.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MRoleMap.java (revision 0) @@ -0,0 +1,120 @@ +/** + * 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 MRoleMap { + + private String principalName; + + private String principalType; + + private MRole role; + + private int addTime; + + private String grantor; + + private String grantorType; + + private boolean grantOption; + + public MRoleMap() { + } + + public MRoleMap(String principalName, String principalType, MRole role, + int addTime, String grantor, String grantorType, boolean grantOption) { + super(); + this.principalName = principalName; + this.principalType = principalType; + this.role = role; + this.addTime = addTime; + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + } + + /** + * @return principal name + */ + public String getPrincipalName() { + return principalName; + } + + /** + * @param userName principal name + */ + public void setPrincipalName(String userName) { + this.principalName = userName; + } + + public String getPrincipalType() { + return principalType; + } + + public void setPrincipalType(String principalType) { + this.principalType = principalType; + } + + /** + * @return add time + */ + public int getAddTime() { + return addTime; + } + + /** + * @param addTime + */ + public void setAddTime(int addTime) { + this.addTime = addTime; + } + + public MRole getRole() { + return role; + } + + public void setRole(MRole role) { + this.role = role; + } + + public boolean getGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public String getGrantorType() { + return grantorType; + } + + public void setGrantorType(String grantorType) { + this.grantorType = grantorType; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java (revision 0) @@ -0,0 +1,159 @@ +/** + * 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 MTableColumnPrivilege { + + private String principalName; + + private String principalType; + + private MTable table; + + private String columnName; + + private String privilege; + + private int createTime; + + private String grantor; + + private String grantorType; + + private boolean grantOption; + + public MTableColumnPrivilege() { + } + + /** + * @param principalName + * @param isRole + * @param isGroup + * @param table + * @param columnName + * @param privileges + * @param createTime + * @param grantor + */ + public MTableColumnPrivilege(String principalName, String principalType, + MTable table, String columnName, String privileges, int createTime, + String grantor, String grantorType, boolean grantOption) { + super(); + this.principalName = principalName; + this.principalType = principalType; + this.table = table; + this.columnName = columnName; + this.privilege = privileges; + this.createTime = createTime; + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + } + + /** + * @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 getPrivilege() { + return privilege; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivilege(String dbPrivileges) { + this.privilege = 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 String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public String getGrantorType() { + return grantorType; + } + + public void setGrantorType(String grantorType) { + this.grantorType = grantorType; + } + + public boolean getGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + public String getPrincipalType() { + return principalType; + } + + public void setPrincipalType(String principalType) { + this.principalType = principalType; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java (revision 0) @@ -0,0 +1,139 @@ +/** + * 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 MTablePrivilege { + + private String principalName; + + private String principalType; + + private MTable table; + + private String privilege; + + private int createTime; + + private String grantor; + + private String grantorType; + + private boolean grantOption; + + public MTablePrivilege() { + } + + public MTablePrivilege(String principalName, String principalType, + MTable table, String privilege, int createTime, + String grantor, String grantorType, boolean grantOption) { + super(); + this.principalName = principalName; + this.principalType = principalType; + this.table = table; + this.privilege = privilege; + this.createTime = createTime; + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + + /** + * @return a set of privileges this user/role/group has + */ + public String getPrivilege() { + return privilege; + } + + /** + * @param dbPrivilege a set of privileges this user/role/group has + */ + public void setPrivilege(String dbPrivilege) { + this.privilege = dbPrivilege; + } + + /** + * @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 String getPrincipalType() { + return principalType; + } + + public void setPrincipalType(String principalType) { + this.principalType = principalType; + } + + public MTable getTable() { + return table; + } + + public void setTable(MTable table) { + this.table = table; + } + + public boolean getGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + public String getGrantorType() { + return grantorType; + } + + public void setGrantorType(String grantorType) { + this.grantorType = grantorType; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/Driver.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/Driver.java (revision 1057802) +++ 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("Authorization 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,126 @@ } } + private void 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(); + if (op != null) { + if (op.equals(HiveOperation.CREATETABLE_AS_SELECT) + || op.equals(HiveOperation.CREATETABLE)) { + 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) { + ss.getAuthorizer().authorize(write.getPartition(), null, + op.getOutputRequiredPrivileges()); + continue; + } + } + + if (write.getTable() != null) { + ss.getAuthorizer().authorize(write.getTable(), null, + op.getOutputRequiredPrivileges()); + } + } + + } + } + + if (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) { + ss.getAuthorizer().authorize(read.getPartition().getTable(), + read.getPartition(), cols, op.getInputRequiredPrivileges(), + null); + } else { + 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) { + ss.getAuthorizer().authorize(read.getTable(), null, cols, + op.getInputRequiredPrivileges(), null); + } else { + ss.getAuthorizer().authorize(read.getTable(), + op.getInputRequiredPrivileges(), null); + } + } + } + + } + } + /** * @return The current query plan associated with this Driver, if any. */ @@ -755,8 +895,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 1057802) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (working copy) @@ -58,11 +58,18 @@ import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; +import org.apache.hadoop.hive.metastore.api.HiveObjectRef; +import org.apache.hadoop.hive.metastore.api.HiveObjectType; import org.apache.hadoop.hive.metastore.api.Index; 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.PrincipalType; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo; +import org.apache.hadoop.hive.metastore.api.Role; import org.apache.hadoop.hive.ql.Context; import org.apache.hadoop.hive.ql.DriverContext; import org.apache.hadoop.hive.ql.QueryPlan; @@ -100,10 +107,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; @@ -112,6 +127,8 @@ 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.ql.session.SessionState; import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.Deserializer; import org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe; @@ -122,10 +139,12 @@ 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. - * + * **/ public class DDLTask extends Task implements Serializable { private static final long serialVersionUID = 1L; @@ -302,6 +321,33 @@ 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(), grantDesc.getGrantor(), grantDesc.getGrantorType(), grantDesc.isGrantOption(), true); + } + + RevokeDesc revokeDesc = work.getRevokeDesc(); + if (revokeDesc != null) { + return grantOrRevokePrivileges(revokeDesc.getPrincipals(), revokeDesc + .getPrivileges(), revokeDesc.getPrivilegeSubjectDesc(), null, null, false, 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); @@ -325,6 +371,363 @@ 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(); + for (String roleName : roles) { + if (grantRole) { + db.grantRole(roleName, userName, principal.getType(), + grantOrRevokeRoleDDL.getGrantor(), grantOrRevokeRoleDDL + .getGrantorType(), grantOrRevokeRoleDDL.isGrantOption()); + } else { + db.revokeRole(roleName, userName, principal.getType()); + } + } + } + } catch (Exception e) { + 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(); + PrivilegeObjectDesc hiveObjectDesc = showGrantDesc.getHiveObj(); + String principalName = principalDesc.getName(); + if (hiveObjectDesc == null) { + List users = db.showPrivilegeGrant( + HiveObjectType.GLOBAL, principalName, principalDesc.getType(), + null, null, null, null); + if (users != null && users.size() > 0) { + boolean first = true; + for (HiveObjectPrivilege usr : users) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfo(outStream, principalDesc.getType(), principalName, + null, null, null, null, usr.getGrantInfo()); + + } + } + } 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; + List partValues = null; + if (hiveObjectDesc.getPartSpec() != null) { + partName = Warehouse + .makePartName(hiveObjectDesc.getPartSpec(), false); + partValues = Warehouse.getPartValuesFromPartName(partName); + } + + if (!hiveObjectDesc.getTable()) { + // show database level privileges + List dbs = db.showPrivilegeGrant(HiveObjectType.DATABASE, principalName, + principalDesc.getType(), dbName, null, null, null); + if (dbs != null && dbs.size() > 0) { + boolean first = true; + for (HiveObjectPrivilege db : dbs) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfo(outStream, principalDesc.getType(), principalName, + dbName, null, null, null, db.getGrantInfo()); + + } + } + + } else { + if (showGrantDesc.getColumns() != null) { + // show column level privileges + for (String columnName : showGrantDesc.getColumns()) { + List columnss = db.showPrivilegeGrant( + HiveObjectType.COLUMN, principalName, + principalDesc.getType(), dbName, tableName, partValues, + columnName); + if (columnss != null && columnss.size() > 0) { + boolean first = true; + for (HiveObjectPrivilege col : columnss) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfo(outStream, principalDesc.getType(), + principalName, dbName, tableName, partName, columnName, + col.getGrantInfo()); + } + } + } + } else if (hiveObjectDesc.getPartSpec() != null) { + // show partition level privileges + List parts = db.showPrivilegeGrant( + HiveObjectType.PARTITION, principalName, principalDesc + .getType(), dbName, tableName, partValues, null); + if (parts != null && parts.size() > 0) { + boolean first = true; + for (HiveObjectPrivilege part : parts) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfo(outStream, principalDesc.getType(), + principalName, dbName, tableName, partName, null, part.getGrantInfo()); + + } + } + } else { + // show table level privileges + List tbls = db.showPrivilegeGrant( + HiveObjectType.TABLE, principalName, principalDesc.getType(), + dbName, tableName, null, null); + if (tbls != null && tbls.size() > 0) { + boolean first = true; + for (HiveObjectPrivilege tbl : tbls) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfo(outStream, principalDesc.getType(), + principalName, dbName, tableName, null, null, tbl.getGrantInfo()); + + } + } + } + } + } + ((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, + String grantor, PrincipalType grantorType, boolean grantOption, boolean isGrant) { + 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 && isGrant) { + 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(); + if (privSubjectDesc == null) { + 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 privileges, column sets should be null. columns=" + + privileges.get(idx).getColumns().toString()); + } + + privBag.addToPrivileges(new HiveObjectPrivilege(new HiveObjectRef( + HiveObjectType.GLOBAL, null, null, null, null), null, null, + new PrivilegeGrantInfo(priv.getPriv(), 0, grantor, grantorType, + grantOption))); + } + } else { + org.apache.hadoop.hive.metastore.api.Partition partObj = null; + + if ((!tableObj.isPartitioned()) + && privSubjectDesc.getPartSpec() != null) { + throw new HiveException( + "Table is not partitioned, but partition name is present: partSpec=" + + privSubjectDesc.getPartSpec().toString()); + } + + + List partValues = null; + if (privSubjectDesc.getPartSpec() != null) { + partObj = db.getPartition(tableObj, privSubjectDesc.getPartSpec(), + false).getTPartition(); + partValues = 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 privileges, column sets should be null. columns=" + + columns); + } + for (int i = 0; i < columns.size(); i++) { + privBag.addToPrivileges(new HiveObjectPrivilege( + new HiveObjectRef(HiveObjectType.COLUMN, dbName, tableName, + partValues, columns.get(i)), null, null, new PrivilegeGrantInfo(priv.getPriv(), 0, grantor, grantorType, grantOption))); + } + } else { + if (privSubjectDesc.getTable()) { + if (privSubjectDesc.getPartSpec() != null) { + privBag.addToPrivileges(new HiveObjectPrivilege( + new HiveObjectRef(HiveObjectType.PARTITION, dbName, + tableName, partValues, null), null, null, new PrivilegeGrantInfo(priv.getPriv(), 0, grantor, grantorType, grantOption))); + } else { + privBag + .addToPrivileges(new HiveObjectPrivilege( + new HiveObjectRef(HiveObjectType.TABLE, dbName, + tableName, null, null), null, null, new PrivilegeGrantInfo(priv.getPriv(), 0, grantor, grantorType, grantOption))); + } + } else { + privBag.addToPrivileges(new HiveObjectPrivilege( + new HiveObjectRef(HiveObjectType.DATABASE, dbName, null, + null, null), null, null, new PrivilegeGrantInfo(priv.getPriv(), 0, grantor, grantorType, grantOption))); + } + } + } + } + + for (PrincipalDesc principal : principals) { + for (int i = 0; i < privBag.getPrivileges().size(); i++) { + HiveObjectPrivilege objPrivs = privBag.getPrivileges().get(i); + objPrivs.setPrincipalName(principal.getName()); + objPrivs.setPrincipalType(principal.getType()); + } + if (isGrant) { + db.grantPrivileges(privBag); + } else { + db.revokePrivileges(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(), roleDDLDesc.getRoleOwnerName()); + } 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 + .getPrincipalType()); + 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); + } + ((FSDataOutputStream) outStream).close(); + } + } else { + throw new HiveException("Unkown role operation " + + operation.getOperationName()); + } + } catch (HiveException e) { + 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 alterDatabase(AlterDatabaseDesc alterDbDesc) throws HiveException { String dbName = alterDbDesc.getDatabaseName(); @@ -404,6 +807,16 @@ /** * Add a partition to a table. + * + * @param db + * Database to add the partition to. + * @param addPartitionDesc + * Add this partition. + * @return Returns 0 when execution succeeds and above 0 if it fails. + * @throws HiveException + */ + /** + * Add a partition to a table. * * @param db * Database to add the partition to. @@ -482,6 +895,7 @@ } return 0; } + /** * Determines whether a partition has been archived * @@ -1627,9 +2041,9 @@ outStream.writeBytes(params.toString()); } - } else { - outStream.writeBytes("No such database: " + descDatabase.getDatabaseName()); - } + } else { + outStream.writeBytes("No such database: " + descDatabase.getDatabaseName()); + } outStream.write(terminator); @@ -1822,9 +2236,9 @@ LOG.info("DDLTask: got data for " + tbl.getTableName()); - Path resFile = new Path(descTbl.getResFile()); - FileSystem fs = resFile.getFileSystem(conf); - DataOutput outStream = fs.create(resFile); + Path resFile = new Path(descTbl.getResFile()); + FileSystem fs = resFile.getFileSystem(conf); + DataOutput outStream = fs.create(resFile); if (colPath.equals(tableName)) { if (!descTbl.isFormatted()) { @@ -1894,6 +2308,46 @@ return 0; } + public static void writeGrantInfo(DataOutput outStream, + PrincipalType principalType, String principalName, String dbName, + String tableName, String partName, String columnName, + PrivilegeGrantInfo grantInfo) throws IOException { + + String privilege = grantInfo.getPrivilege(); + int createTime = grantInfo.getCreateTime(); + String grantor = grantInfo.getGrantor(); + + 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, "principalName", principalName); + writeKeyValuePair(outStream, "principalType", "" + principalType); + writeKeyValuePair(outStream, "privilege", privilege); + 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 { long totalFileSize = 0; @@ -2521,7 +2975,6 @@ return 0; } - /** * Create a new table. * Index: ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java (revision 1057802) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java (working copy) @@ -197,7 +197,7 @@ db.loadTable(new Path(tbd.getSourceDir()), tbd.getTable() .getTableName(), tbd.getReplace(), 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()); @@ -238,7 +238,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); } @@ -270,7 +270,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/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 1057802) +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (working copy) @@ -57,14 +57,23 @@ import org.apache.hadoop.hive.metastore.api.Constants; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; +import org.apache.hadoop.hive.metastore.api.HiveObjectRef; +import org.apache.hadoop.hive.metastore.api.HiveObjectType; import org.apache.hadoop.hive.metastore.api.Index; 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.PrincipalType; +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.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 +95,7 @@ private HiveConf conf = null; private IMetaStoreClient metaStoreClient; private String currentDatabase; - + private static ThreadLocal hiveDB = new ThreadLocal() { @Override protected synchronized Object initialValue() { @@ -444,7 +453,19 @@ 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(); + if (ss != null) { + CreateTableAutomaticGrant grants = ss.getCreateTableGrants(); + if (grants != null) { + principalPrivs.setUserPrivileges(grants.getUserGrants()); + principalPrivs.setGroupPrivileges(grants.getGroupGrants()); + principalPrivs.setRolePrivileges(grants.getRoleGrants()); + tTbl.setPrivileges(principalPrivs); + } + } + getMSC().createTable(tTbl); } catch (AlreadyExistsException e) { if (!ifNotExists) { throw new HiveException(e); @@ -775,7 +796,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) { @@ -915,6 +936,36 @@ } } + public boolean grantPrivileges(PrivilegeBag privileges) + throws HiveException { + try { + return getMSC().grant_privileges(privileges); + } 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(PrivilegeBag privileges) + throws HiveException { + try { + return getMSC().revoke_privileges(privileges); + } catch (Exception e) { + throw new HiveException(e); + } + } + /** * Query metadata to see if a database with the given name already exists. * @@ -1083,7 +1134,7 @@ public void loadTable(Path loadPath, String tableName, boolean replace, boolean holdDDLTime) throws HiveException { Table tbl = getTable(tableName); - + if (replace) { tbl.replaceFiles(loadPath); } else { @@ -1191,7 +1242,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 @@ -1283,8 +1335,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); @@ -1336,8 +1388,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); } @@ -1407,6 +1459,116 @@ public void setCurrentDatabase(String currentDatabase) { this.currentDatabase = currentDatabase; } + + public void createRole(String roleName, String ownerName) + throws HiveException { + try { + getMSC().create_role(new Role(roleName, -1, ownerName)); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public void dropRole(String roleName) throws HiveException { + try { + getMSC().drop_role(roleName); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showRoleGrant(String principalName, PrincipalType principalType) throws HiveException { + try { + return getMSC().list_roles(principalName, principalType); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public boolean grantRole(String roleName, String userName, + PrincipalType principalType, String grantor, PrincipalType grantorType, + boolean grantOption) throws HiveException { + try { + return getMSC().grant_role(roleName, userName, principalType, grantor, + grantorType, grantOption); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public boolean revokeRole(String roleName, String userName, + PrincipalType principalType) throws HiveException { + try { + return getMSC().revoke_role(roleName, userName, principalType); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List listRoles(String userName, PrincipalType principalType) + throws HiveException { + try { + return getMSC().list_roles(userName, principalType); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param objectType + * hive object type + * @param db_name + * database name + * @param table_name + * table name + * @param part_values + * partition values + * @param column_name + * column name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws HiveException + */ + public PrincipalPrivilegeSet get_privilege_set(HiveObjectType objectType, + String db_name, String table_name, List part_values, + String column_name, String user_name, List group_names) + throws HiveException { + try { + HiveObjectRef hiveObj = new HiveObjectRef(objectType, db_name, + table_name, part_values, column_name); + return getMSC().get_privilege_set(hiveObj, user_name, group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param objectType + * hive object type + * @param principalName + * @param principalType + * @param dbName + * @param tableName + * @param partValues + * @param columnName + * @return + * @throws HiveException + */ + public List showPrivilegeGrant( + HiveObjectType objectType, String principalName, + PrincipalType principalType, String dbName, String tableName, + List partValues, String columnName) throws HiveException { + try { + HiveObjectRef hiveObj = new HiveObjectRef(objectType, dbName, tableName, + partValues, columnName); + return getMSC().list_privileges(principalName, principalType, hiveObj); + } catch (Exception e) { + throw new HiveException(e); + } + } static private void checkPaths(FileSystem fs, FileStatus[] srcs, Path destf, boolean replace) throws HiveException { @@ -1569,7 +1731,10 @@ if (!fs.exists(destf.getParent())) { fs.mkdirs(destf.getParent()); } - + if (fs.exists(destf)) { + fs.delete(destf, true); + } + boolean b = fs.rename(srcs[0].getPath(), destf); if (!b) { throw new HiveException("Unable to move results from " + srcs[0].getPath() @@ -1641,6 +1806,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/metadata/HiveUtils.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java (revision 1057802) +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java (working copy) @@ -25,6 +25,10 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.index.HiveIndexHandler; import org.apache.hadoop.hive.ql.parse.AbstractSemanticAnalyzerHook; +import org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator; +import org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider; +import org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider; +import org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider; import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.hive.metastore.api.FieldSchema; @@ -171,6 +175,57 @@ + e.getMessage(), e); } } + + @SuppressWarnings("unchecked") + public static HiveAuthorizationProvider getAuthorizeProviderManager( + Configuration conf, HiveAuthenticationProvider authenticator) throws HiveException { + + String clsStr = HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER); + + HiveAuthorizationProvider ret = null; + try { + Class cls = null; + if (clsStr == null || clsStr.trim().equals("")) { + cls = DefaultHiveAuthorizationProvider.class; + } else { + cls = (Class) Class.forName( + clsStr, true, JavaUtils.getClassLoader()); + } + if (cls != null) { + ret = ReflectionUtils.newInstance(cls, conf); + } + } catch (Exception e) { + throw new HiveException(e); + } + ret.setAuthenticator(authenticator); + return ret; + } + + @SuppressWarnings("unchecked") + public static HiveAuthenticationProvider getAuthenticator(Configuration conf) + throws HiveException { + + String clsStr = HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHENTICATOR_MANAGER); + + HiveAuthenticationProvider ret = null; + try { + Class cls = null; + if (clsStr == null || clsStr.trim().equals("")) { + cls = HadoopDefaultAuthenticator.class; + } else { + cls = (Class) Class.forName( + clsStr, true, JavaUtils.getClassLoader()); + } + if (cls != null) { + ret = ReflectionUtils.newInstance(cls, conf); + } + } catch (Exception e) { + throw new HiveException(e); + } + return ret; + } public static AbstractSemanticAnalyzerHook getSemanticAnalyzerHook( HiveConf conf, String hookName) 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 1057802) +++ 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 1057802) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (working copy) @@ -46,6 +46,7 @@ import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.Order; +import org.apache.hadoop.hive.metastore.api.PrincipalType; import org.apache.hadoop.hive.ql.exec.FetchTask; import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.exec.TaskFactory; @@ -69,6 +70,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; @@ -81,6 +89,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; @@ -89,6 +98,9 @@ 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.security.authorization.Privilege; +import org.apache.hadoop.hive.ql.security.authorization.PrivilegeRegistry; +import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.mapred.TextInputFormat; @@ -294,11 +306,256 @@ case HiveParser.TOK_ALTERDATABASE_PROPERTIES: analyzeAlterDatabase(ast); break; + case HiveParser.TOK_CREATEROLE: + analyzeCreateRole(ast); + break; + case HiveParser.TOK_DROPROLE: + analyzeDropRole(ast); + break; + case HiveParser.TOK_SHOW_ROLE_GRANT: + ctx.setResFile(new Path(ctx.getLocalTmpFileURI())); + analyzeShowRoleGrant(ast); + break; + case HiveParser.TOK_GRANT_ROLE: + analyzeGrantRevokeRole(true, ast); + break; + case HiveParser.TOK_REVOKE_ROLE: + analyzeGrantRevokeRole(false, ast); + break; + case HiveParser.TOK_GRANT: + analyzeGrant(ast); + break; + case HiveParser.TOK_SHOW_GRANT: + ctx.setResFile(new Path(ctx.getLocalTmpFileURI())); + analyzeShowGrant(ast); + break; + case HiveParser.TOK_REVOKE: + analyzeRevoke(ast); + break; default: throw new SemanticException("Unsupported command."); } } + private void analyzeGrantRevokeRole(boolean grant, ASTNode ast) { + List principalDesc = analyzePrincipalListDef( + (ASTNode) ast.getChild(0)); + List roles = new ArrayList(); + for (int i = 1; i < ast.getChildCount(); i++) { + roles.add(unescapeIdentifier(ast.getChild(i).getText())); + } + String roleOwnerName = ""; + if (SessionState.get() != null + && SessionState.get().getAuthenticator() != null) { + roleOwnerName = SessionState.get().getAuthenticator().getUserName(); + } + GrantRevokeRoleDDL grantRevokeRoleDDL = new GrantRevokeRoleDDL(grant, + roles, principalDesc, roleOwnerName, PrincipalType.USER, true); + 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); + PrincipalType type = PrincipalType.USER; + switch (principal.getType()) { + case HiveParser.TOK_USER: + type = PrincipalType.USER; + break; + case HiveParser.TOK_GROUP: + type = PrincipalType.GROUP; + break; + case HiveParser.TOK_ROLE: + type = PrincipalType.ROLE; + break; + } + String principalName = unescapeIdentifier(principal.getChild(0).getText()); + PrincipalDesc principalDesc = new PrincipalDesc(principalName, 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 privileges, 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 = analyzePrincipalListDef( + (ASTNode) ast.getChild(1)); + boolean grantOption = false; + PrivilegeObjectDesc privilegeObj = 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) { + privilegeObj = analyzePrivilegeObject(astChild); + } + } + } + + String userName = null; + if (SessionState.get() != null + && SessionState.get().getAuthenticator() != null) { + userName = SessionState.get().getAuthenticator().getUserName(); + } + + GrantDesc grantDesc = new GrantDesc(privilegeObj, privilegeDesc, + principalDesc, userName, PrincipalType.USER, 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 = analyzePrincipalListDef( + (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 analyzePrincipalListDef(ASTNode node) { + List principalList = new ArrayList(); + + for (int i = 0; i < node.getChildCount(); i++) { + ASTNode child = (ASTNode) node.getChild(i); + PrincipalType type = null; + switch (child.getType()) { + case HiveParser.TOK_USER: + type = PrincipalType.USER; + break; + case HiveParser.TOK_GROUP: + type = PrincipalType.GROUP; + break; + case HiveParser.TOK_ROLE: + type = PrincipalType.ROLE; + break; + } + String principalName = unescapeIdentifier(child.getChild(0).getText()); + PrincipalDesc principalDesc = new PrincipalDesc(principalName, 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); + PrincipalType principalType = PrincipalType.USER; + switch (child.getType()) { + case HiveParser.TOK_USER: + principalType = PrincipalType.USER; + break; + case HiveParser.TOK_GROUP: + principalType = PrincipalType.GROUP; + break; + case HiveParser.TOK_ROLE: + principalType = PrincipalType.ROLE; + break; + } + String principalName = unescapeIdentifier(child.getChild(0).getText()); + RoleDDLDesc createRoleDesc = new RoleDDLDesc(principalName, principalType, + RoleDDLDesc.RoleOperation.SHOW_ROLE_GRANT, null); + createRoleDesc.setResFile(ctx.getResFile().toString()); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + createRoleDesc), conf)); + } + private void analyzeAlterDatabase(ASTNode ast) throws SemanticException { String dbName = unescapeIdentifier(ast.getChild(0).getText()); @@ -322,6 +579,7 @@ 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 1057802) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (working copy) @@ -190,6 +190,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; @@ -265,6 +282,14 @@ | analyzeStatement | lockStatement | unlockStatement + | createRoleStatement + | dropRoleStatement + | grantPrivileges + | revokePrivileges + | showGrants + | showRoleGrants + | grantRole + | revokeRole ; ifExists @@ -738,6 +763,114 @@ : KW_UNLOCK KW_TABLE Identifier partitionSpec? -> ^(TOK_UNLOCKTABLE Identifier partitionSpec?) ; +createRoleStatement +@init { msgs.push("create role"); } +@after { msgs.pop(); } + : KW_CREATE kwRole roleName=Identifier + -> ^(TOK_CREATEROLE $roleName) + ; + +dropRoleStatement +@init {msgs.push("drop role");} +@after {msgs.pop();} + : KW_DROP kwRole 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 kwRole Identifier (COMMA Identifier)* KW_TO principalSpecification + -> ^(TOK_GRANT_ROLE principalSpecification Identifier+) + ; + +revokeRole +@init {msgs.push("revoke role");} +@after {msgs.pop();} + : KW_REVOKE kwRole Identifier (COMMA Identifier)* KW_FROM principalSpecification + -> ^(TOK_REVOKE_ROLE principalSpecification Identifier+) + ; + +showRoleGrants +@init {msgs.push("show role grants");} +@after {msgs.pop();} + : KW_SHOW kwRole 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();} + : kwUser Identifier -> ^(TOK_USER Identifier) + | KW_GROUP Identifier -> ^(TOK_GROUP Identifier) + | kwRole 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(); } @@ -784,7 +917,7 @@ ; showStmtIdentifier -@init { msgs.push("identifier for show statement"); } +@init { msgs.push("Identifier for show statement"); } @after { msgs.pop(); } : Identifier | StringLiteral @@ -1800,6 +1933,15 @@ ; // Keywords + +kwUser +: +{input.LT(1).getText().equalsIgnoreCase("user")}? Identifier; + +kwRole +: +{input.LT(1).getText().equalsIgnoreCase("role")}? Identifier; + KW_TRUE : 'TRUE'; KW_FALSE : 'FALSE'; KW_ALL : 'ALL'; @@ -1814,8 +1956,8 @@ KW_ASC : 'ASC'; KW_DESC : 'DESC'; KW_ORDER : 'ORDER'; -KW_BY : 'BY'; KW_GROUP : 'GROUP'; +KW_BY : 'BY'; KW_HAVING : 'HAVING'; KW_WHERE : 'WHERE'; KW_FROM : 'FROM'; @@ -2000,6 +2142,8 @@ KW_COMPUTE: 'COMPUTE'; KW_STATISTICS: 'STATISTICS'; KW_USE: 'USE'; +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 1057802) +++ 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; @@ -906,7 +905,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); } } @@ -942,7 +941,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); @@ -5926,7 +5925,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()) { @@ -5937,7 +5936,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)); } } } @@ -6194,7 +6193,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); } @@ -6550,24 +6549,27 @@ ASTNode child = ast; LOG.info("Starting Semantic Analysis"); - + // analyze create table command if (ast.getToken().getType() == HiveParser.TOK_CREATETABLE) { // if it is not CTAS, we don't need to go further and just return if ((child = analyzeCreateTable(ast, qb)) == null) { return; } + } else { + SessionState.get().setCommandType(HiveOperation.QUERY); } // 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"); @@ -7110,6 +7112,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; @@ -7117,6 +7122,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; @@ -7141,6 +7147,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 1057802) +++ 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,65 +30,77 @@ */ 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_ALTERDATABASE_PROPERTIES, "ALTERDATABASE"); - 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_DESCDATABASE, "DESCDATABASE"); - 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_ALTERINDEX_PROPERTIES, HiveOperation.ALTERINDEX_PROPS); + 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); + commandType.put(HiveParser.TOK_ALTERDATABASE_PROPERTIES, HiveOperation.ALTERDATABASE); + commandType.put(HiveParser.TOK_DESCDATABASE, HiveOperation.DESCDATABASE); } 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) { @@ -136,10 +149,18 @@ 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: case HiveParser.TOK_ALTERDATABASE_PROPERTIES: 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]; @@ -157,7 +178,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 1057802) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java (working copy) @@ -59,6 +59,12 @@ private DescDatabaseDesc descDbDesc; private AlterDatabaseDesc alterDbDesc; + private RoleDDLDesc roleDDLDesc; + private GrantDesc grantDesc; + private ShowGrantDesc showGrantDesc; + private RevokeDesc revokeDesc; + private GrantRevokeRoleDDL grantRevokeRoleDDL; + /** * ReadEntitites that are passed to the hooks. */ @@ -335,6 +341,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; @@ -747,6 +783,70 @@ 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; + } + public void setAlterDatabaseDesc(AlterDatabaseDesc alterDbDesc) { this.alterDbDesc = alterDbDesc; } 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,131 @@ +/** + * 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.metastore.api.PrincipalType; + +@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 String grantor; + + private PrincipalType grantorType; + + private PrivilegeObjectDesc privilegeSubjectDesc; + + public GrantDesc(PrivilegeObjectDesc privilegeSubject, + List privilegeDesc, List principalDesc, + String grantor, PrincipalType grantorType, boolean grantOption) { + super(); + this.privilegeSubjectDesc = privilegeSubject; + this.privileges = privilegeDesc; + this.principals = principalDesc; + this.grantor = grantor; + this.grantorType = grantorType; + 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; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public PrincipalType getGrantorType() { + return grantorType; + } + + public void setGrantorType(PrincipalType grantorType) { + this.grantorType = grantorType; + } + +} 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,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.util.List; + +import org.apache.hadoop.hive.metastore.api.PrincipalType; + +@Explain(displayName="grant or revoke roles") +public class GrantRevokeRoleDDL { + + private boolean grant; + + private List principalDesc; + + private List roles; + + private String grantor; + + private PrincipalType grantorType; + + private boolean grantOption; + + public GrantRevokeRoleDDL() { + } + + public GrantRevokeRoleDDL(boolean grant, List roles, + List principalDesc, String grantor, + PrincipalType grantorType, boolean grantOption) { + super(); + this.grant = grant; + this.principalDesc = principalDesc; + this.roles = roles; + this.grantor = grantor; + this.grantorType = grantorType; + this.grantOption = grantOption; + } + + /** + * @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; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public PrincipalType getGrantorType() { + return grantorType; + } + + public void setGrantorType(PrincipalType grantorType) { + this.grantorType = grantorType; + } + + public boolean isGrantOption() { + return grantOption; + } + + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + +} 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,185 @@ +/** + * 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}), + ALTERINDEX_PROPS("ALTERINDEX_PROPS",null, null), + ALTERDATABASE("ALTERDATABASE", null, null), + DESCDATABASE("DESCDATABASE", null, null), + ; + + 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,62 @@ +/** + * 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 org.apache.hadoop.hive.metastore.api.PrincipalType; + +@Explain(displayName = "Principal") +public class PrincipalDesc implements Serializable, Cloneable { + + private static final long serialVersionUID = 1L; + + 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,127 @@ +/** + * 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 org.apache.hadoop.hive.metastore.api.PrincipalType; + +@Explain(displayName = "Create Role") +public class RoleDDLDesc extends DDLDesc implements Serializable { + + private static final long serialVersionUID = 1L; + + private String name; + + private PrincipalType principalType; + + private boolean group; + + private RoleOperation operation; + + private String resFile; + + private String roleOwnerName; + + 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, PrincipalType.USER, operation, null); + } + + public RoleDDLDesc(String principalName, PrincipalType principalType, + RoleOperation operation, String roleOwnerName) { + this.name = principalName; + this.principalType = principalType; + this.operation = operation; + this.roleOwnerName = roleOwnerName; + } + + @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 PrincipalType getPrincipalType() { + return principalType; + } + + public void setPrincipalType(PrincipalType principalType) { + this.principalType = principalType; + } + + 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; + } + + public String getRoleOwnerName() { + return roleOwnerName; + } + + public void setRoleOwnerName(String roleOwnerName) { + this.roleOwnerName = roleOwnerName; + } + +} 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/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,77 @@ +/** + * 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.ql.metadata.HiveException; +import org.apache.hadoop.hive.shims.ShimLoader; +import org.apache.hadoop.security.UserGroupInformation; + +public class HadoopDefaultAuthenticator implements HiveAuthenticationProvider { + + private String userName; + private List groupNames; + + private Configuration conf; + + @Override + public List getGroupNames() { + return groupNames; + } + + @Override + public String getUserName() { + return userName; + } + + @Override + public void setConf(Configuration conf) { + this.conf = 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()); + } + } + + @Override + public void destroy() throws HiveException { + return; + } + + @Override + public Configuration getConf() { + return this.conf; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/HiveAuthenticationProvider.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/HiveAuthenticationProvider.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/HiveAuthenticationProvider.java (revision 0) @@ -0,0 +1,38 @@ +/** + * 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.Configurable; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +/** + * HiveAuthenticationProvider is an interface for authentication. The + * implementation should return userNames and groupNames. + */ +public interface HiveAuthenticationProvider extends Configurable{ + + public String getUserName(); + + public List getGroupNames(); + + public void destroy() throws HiveException; + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HiveAuthorizationProviderBase.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HiveAuthorizationProviderBase.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HiveAuthorizationProviderBase.java (revision 0) @@ -0,0 +1,61 @@ +/** + * 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.Hive; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider; + +public abstract class HiveAuthorizationProviderBase implements + HiveAuthorizationProvider { + + protected HiveAuthenticationProvider authenticator; + + protected Hive hive_db; + + private Configuration conf; + + public void setConf(Configuration conf) { + this.conf = conf; + try { + init(conf); + } catch (HiveException e) { + throw new RuntimeException(e); + } + } + + public void init(Configuration conf) throws HiveException { + hive_db = Hive.get(new HiveConf(conf, HiveAuthorizationProvider.class)); + } + + public Configuration getConf() { + return this.conf; + } + + public HiveAuthenticationProvider getAuthenticator() { + return authenticator; + } + + public void setAuthenticator(HiveAuthenticationProvider authenticator) { + this.authenticator = authenticator; + } + +} 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,102 @@ +/** + * 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; + +/** + * Privilege defines a privilege in Hive. Each privilege has a name and scope associated with it. + * This class contains all of the predefined privileges in Hive. + */ +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 String toString() { + return this.priv; + } + + 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/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,124 @@ +/** + * 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.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.PrincipalType; +import org.apache.hadoop.hive.metastore.api.PrivilegeGrantInfo; +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 Map> userGrants; + private Map> groupGrants; + private Map> roleGrants; + + public static CreateTableAutomaticGrant create(HiveConf conf) + throws HiveException { + CreateTableAutomaticGrant grants = new CreateTableAutomaticGrant(); + 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)); + + List ownerGrantInfoList = new ArrayList(); + String grantor = null; + if (SessionState.get() != null + && SessionState.get().getAuthenticator() != null) { + grantor = SessionState.get().getAuthenticator().getUserName(); + ownerGrantInfoList.add(new PrivilegeGrantInfo(Privilege.ALL.getPriv(), -1, grantor, + PrincipalType.USER, true)); + if (grants.userGrants == null) { + grants.userGrants = new HashMap>(); + } + grants.userGrants.put(grantor, ownerGrantInfoList); + } + 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[] grantArray = privList.split(","); + List grantInfoList = new ArrayList(); + String grantor = null; + if (SessionState.get().getAuthenticator() != null) { + grantor = SessionState.get().getAuthenticator().getUserName(); + } + for (String grant : grantArray) { + grantInfoList.add(new PrivilegeGrantInfo(grant, -1, grantor, + PrincipalType.USER, true)); + } + + String[] users = userList.split(","); + for (String user : users) { + grantsMap.put(user, grantInfoList); + } + } + 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 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 1057802) +++ ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (working copy) @@ -40,6 +40,11 @@ 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.metadata.HiveUtils; +import org.apache.hadoop.hive.ql.plan.HiveOperation; +import org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider; +import org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider; import org.apache.hadoop.hive.ql.util.DosToUnix; import org.apache.log4j.LogManager; import org.apache.log4j.PropertyConfigurator; @@ -77,8 +82,14 @@ /** * type of the command. */ - private String commandType; - + private HiveOperation commandType; + + private HiveAuthorizationProvider authorizer; + + private HiveAuthenticationProvider authenticator; + + private CreateTableAutomaticGrant createTableGrants; + /** * Lineage state. */ @@ -150,11 +161,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 = HiveUtils.getAuthenticator(conf); + ss.authorizer = HiveUtils.getAuthorizeProviderManager( + conf, ss.authenticator); + ss.createTableGrants = CreateTableAutomaticGrant.create(conf); tss.set(ss); return (ss); } @@ -163,6 +179,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 +193,18 @@ if (startSs.hiveHist == null) { startSs.hiveHist = new HiveHistory(startSs); } + + try { + startSs.authenticator = HiveUtils.getAuthenticator(startSs + .getConf()); + startSs.authorizer = HiveUtils.getAuthorizeProviderManager(startSs + .getConf(), startSs.authenticator); + startSs.createTableGrants = CreateTableAutomaticGrant.create(startSs + .getConf()); + } catch (HiveException e) { + throw new RuntimeException(e); + } + return startSs; } @@ -539,10 +568,41 @@ } public String getCommandType() { + if (commandType == null) { + return null; + } + return commandType.getOperationName(); + } + + public HiveOperation getHiveOperation() { return commandType; } - public void setCommandType(String commandType) { + public void setCommandType(HiveOperation commandType) { this.commandType = commandType; } + + public HiveAuthorizationProvider getAuthorizer() { + return authorizer; + } + + public void setAuthorizer(HiveAuthorizationProvider authorizer) { + this.authorizer = authorizer; + } + + public HiveAuthenticationProvider getAuthenticator() { + return authenticator; + } + + public void setAuthenticator(HiveAuthenticationProvider 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 1057802) +++ 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.DummyAuthenticator"); 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.DummyAuthenticator"); + + 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 1057802) +++ 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/DummyAuthenticator.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/security/DummyAuthenticator.java (revision 0) +++ ql/src/test/org/apache/hadoop/hive/ql/security/DummyAuthenticator.java (revision 0) @@ -0,0 +1,46 @@ +package org.apache.hadoop.hive.ql.security; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public class DummyAuthenticator implements HiveAuthenticationProvider { + + private List groupNames; + private String userName; + private Configuration conf; + + public DummyAuthenticator() { + this.groupNames = new ArrayList(); + groupNames.add("hive_test_group1"); + groupNames.add("hive_test_group2"); + userName = "hive_test_user"; + } + + @Override + public void destroy() throws HiveException{ + return; + } + + @Override + public List getGroupNames() { + return groupNames; + } + + @Override + public String getUserName() { + return userName; + } + + @Override + public void setConf(Configuration conf) { + this.conf = conf; + } + + public Configuration getConf() { + return this.conf; + } + +} Index: ql/src/test/queries/clientnegative/authorization_fail_1.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_fail_1.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_fail_1.q (revision 0) @@ -0,0 +1,9 @@ +create table authorization_fail_1 (key int, value string); +set hive.security.authorization.enabled=true; + +revoke `ALL` on table authorization_fail_1 from user hive_test_user; + +grant `Create` on table authorization_fail_1 to user hive_test_user; +grant `Create` on table authorization_fail_1 to user hive_test_user; + + Index: ql/src/test/queries/clientnegative/authorization_fail_2.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_fail_2.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_fail_2.q (revision 0) @@ -0,0 +1,9 @@ +create table authorization_fail_2 (key int, value string) partitioned by (ds string); + +revoke `ALL` on table authorization_fail_2 from user hive_test_user; + +set hive.security.authorization.enabled=true; + +alter table authorization_fail_2 add partition (ds='2010'); + + Index: ql/src/test/queries/clientnegative/authorization_fail_3.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_fail_3.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_fail_3.q (revision 0) @@ -0,0 +1,12 @@ +create table authorization_fail_3 (key int, value string) partitioned by (ds string); +set hive.security.authorization.enabled=true; + +revoke `ALL` on table authorization_fail_3 from user hive_test_user; + +grant `Create` on table authorization_fail_3 to user hive_test_user; +alter table authorization_fail_3 add partition (ds='2010'); + +show grant user hive_test_user on table authorization_fail_3; +show grant user hive_test_user on table authorization_fail_3 partition (ds='2010'); + +select key from authorization_fail_3 where ds='2010'; Index: ql/src/test/queries/clientnegative/authorization_fail_4.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_fail_4.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_fail_4.q (revision 0) @@ -0,0 +1,15 @@ +create table authorization_fail_4 (key int, value string) partitioned by (ds string); + +revoke `ALL` on table authorization_fail_4 from user hive_test_user; + +set hive.security.authorization.enabled=true; +grant `Alter` on table authorization_fail_4 to user hive_test_user; +ALTER TABLE authorization_fail_4 SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE"); + +grant `Create` on table authorization_fail_4 to user hive_test_user; +alter table authorization_fail_4 add partition (ds='2010'); + +show grant user hive_test_user on table authorization_fail_4; +show grant user hive_test_user on table authorization_fail_4 partition (ds='2010'); + +select key from authorization_fail_4 where ds='2010'; Index: ql/src/test/queries/clientnegative/authorization_fail_5.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_fail_5.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_fail_5.q (revision 0) @@ -0,0 +1,20 @@ +create table authorization_fail (key int, value string) partitioned by (ds string); +set hive.security.authorization.enabled=true; + +revoke `ALL` on table authorization_fail from user hive_test_user; + +grant `Alter` on table authorization_fail to user hive_test_user; +ALTER TABLE authorization_fail SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE"); + +grant `Create` on table authorization_fail to user hive_test_user; +grant `Select` on table authorization_fail to user hive_test_user; +alter table authorization_fail add partition (ds='2010'); + +show grant user hive_test_user on table authorization_fail; +show grant user hive_test_user on table authorization_fail partition (ds='2010'); + +revoke `Select` on table authorization_fail partition (ds='2010') from user hive_test_user; + +show grant user hive_test_user on table authorization_fail partition (ds='2010'); + +select key from authorization_fail where ds='2010'; \ No newline at end of file Index: ql/src/test/queries/clientnegative/authorization_fail_6.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_fail_6.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_fail_6.q (revision 0) @@ -0,0 +1,5 @@ +create table authorization_part_fail (key int, value string) partitioned by (ds string); +revoke `ALL` on table authorization_part_fail from user hive_test_user; +set hive.security.authorization.enabled=true; + +ALTER TABLE authorization_part_fail SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE"); Index: ql/src/test/queries/clientnegative/authorization_fail_7.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_fail_7.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_fail_7.q (revision 0) @@ -0,0 +1,16 @@ +create table authorization_fail (key int, value string); +revoke `ALL` on table authorization_fail from user hive_test_user; + +set hive.security.authorization.enabled=true; + +create role hive_test_role_fail; + +grant role hive_test_role_fail to user hive_test_user; +grant `select` on table authorization_fail to role hive_test_role_fail; +show role grant user hive_test_user; + +show grant role hive_test_role_fail on table authorization_fail; + +drop role hive_test_role_fail; + +select key from authorization_fail; \ No newline at end of file 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,35 @@ +create table authorization_part_fail (key int, value string) partitioned by (ds string); +ALTER TABLE authorization_part_fail SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE"); +set hive.security.authorization.enabled=true; + +revoke `ALL` on table authorization_part_fail from user hive_test_user; + +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,89 @@ +create table src_autho_test as select * from src; + +revoke `ALL` on table src_autho_test from user hive_test_user; + +set hive.security.authorization.enabled=true; + +--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,111 @@ +create table authorization_part (key int, value string) partitioned by (ds string); + +revoke `ALL` on table authorization_part from user hive_test_user; + +ALTER TABLE authorization_part SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE"); +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/authorization_3.q =================================================================== --- ql/src/test/queries/clientpositive/authorization_3.q (revision 0) +++ ql/src/test/queries/clientpositive/authorization_3.q (revision 0) @@ -0,0 +1,19 @@ +create table src_autho_test as select * from src; + +revoke `ALL` on table src_autho_test from user hive_test_user; + +grant `drop` on table src_autho_test to user hive_test_user; +grant `select` on table src_autho_test to user hive_test_user; + +show grant user hive_test_user on table src_autho_test; + +revoke `select` on table src_autho_test from user hive_test_user; +revoke `drop` on table src_autho_test from user hive_test_user; + +grant `drop`,`select` on table src_autho_test to user hive_test_user; +show grant user hive_test_user on table src_autho_test; +revoke `drop`,`select` on table src_autho_test from user hive_test_user; + +grant `drop`,`select`(key), `select`(value) on table src to user hive_test_user; +show grant user hive_test_user on table src_autho_test; +revoke `drop`,`select`(key), `select`(value) on table src from user hive_test_user; \ No newline at end of file Index: ql/src/test/queries/clientpositive/authorization_4.q =================================================================== --- ql/src/test/queries/clientpositive/authorization_4.q (revision 0) +++ ql/src/test/queries/clientpositive/authorization_4.q (revision 0) @@ -0,0 +1,9 @@ +create table src_autho_test as select * from src; + +set hive.security.authorization.enabled=true; + +show grant user hive_test_user on table src_autho_test; + +select key from src_autho_test order by key limit 20; + +drop table src_autho_test; \ No newline at end of file Index: ql/src/test/queries/clientpositive/input19.q =================================================================== --- ql/src/test/queries/clientpositive/input19.q (revision 1057802) +++ 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/keyword_1.q =================================================================== --- ql/src/test/queries/clientpositive/keyword_1.q (revision 0) +++ ql/src/test/queries/clientpositive/keyword_1.q (revision 0) @@ -0,0 +1,17 @@ +create table test_user (user string, `group` string); +grant `select` on table test_user to user hive_test; + +explain select user from test_user; + +show grant user hive_test on table test_user; + +drop table test_user; + +create table test_user (role string, `group` string); +grant `select` on table test_user to user hive_test; + +explain select role from test_user; + +show grant user hive_test on table test_user; + +drop table test_user; \ No newline at end of file Index: ql/src/test/queries/clientpositive/show_indexes_edge_cases.q =================================================================== --- ql/src/test/queries/clientpositive/show_indexes_edge_cases.q (revision 1057802) +++ 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_fail_1.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_fail_1.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_fail_1.q.out (revision 0) @@ -0,0 +1,17 @@ +PREHOOK: query: create table authorization_fail_1 (key int, value string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_fail_1 (key int, value string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_fail_1 +PREHOOK: query: revoke `ALL` on table authorization_fail_1 from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_fail_1 from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: grant `Create` on table authorization_fail_1 to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Create` on table authorization_fail_1 to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Create` on table authorization_fail_1 to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +Error: java.lang.RuntimeException: InvalidObjectException(message:Create is already granted on table [default,authorization_fail_1] by hive_test_user) +FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask Index: ql/src/test/results/clientnegative/authorization_fail_2.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_fail_2.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_fail_2.q.out (revision 0) @@ -0,0 +1,10 @@ +PREHOOK: query: create table authorization_fail_2 (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_fail_2 (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_fail_2 +PREHOOK: query: revoke `ALL` on table authorization_fail_2 from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_fail_2 from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +Authorization failed:No privilege 'Create' found for inputs { database:default, table:authorization_fail_2}. Use show grant to get more details. Index: ql/src/test/results/clientnegative/authorization_fail_3.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_fail_3.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_fail_3.q.out (revision 0) @@ -0,0 +1,37 @@ +PREHOOK: query: create table authorization_fail_3 (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_fail_3 (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_fail_3 +PREHOOK: query: revoke `ALL` on table authorization_fail_3 from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_fail_3 from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: grant `Create` on table authorization_fail_3 to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Create` on table authorization_fail_3 to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: alter table authorization_fail_3 add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_fail_3 +POSTHOOK: query: alter table authorization_fail_3 add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_fail_3 +POSTHOOK: Output: default@authorization_fail_3@ds=2010 +PREHOOK: query: show grant user hive_test_user on table authorization_fail_3 +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_fail_3 +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_fail_3 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292569774 +grantor hive_test_user +PREHOOK: query: show grant user hive_test_user on table authorization_fail_3 partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_fail_3 partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +Authorization failed:No privilege 'Select' found for inputs { database:default, table:authorization_fail_3, columnName:key}. Use show grant to get more details. Index: ql/src/test/results/clientnegative/authorization_fail_4.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_fail_4.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_fail_4.q.out (revision 0) @@ -0,0 +1,75 @@ +PREHOOK: query: create table authorization_fail_4 (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_fail_4 (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_fail_4 +PREHOOK: query: revoke `ALL` on table authorization_fail_4 from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_fail_4 from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: grant `Alter` on table authorization_fail_4 to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Alter` on table authorization_fail_4 to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: ALTER TABLE authorization_fail_4 SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") +PREHOOK: type: ALTERTABLE_PROPERTIES +PREHOOK: Input: default@authorization_fail_4 +PREHOOK: Output: default@authorization_fail_4 +POSTHOOK: query: ALTER TABLE authorization_fail_4 SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") +POSTHOOK: type: ALTERTABLE_PROPERTIES +POSTHOOK: Input: default@authorization_fail_4 +POSTHOOK: Output: default@authorization_fail_4 +PREHOOK: query: grant `Create` on table authorization_fail_4 to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Create` on table authorization_fail_4 to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: alter table authorization_fail_4 add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_fail_4 +POSTHOOK: query: alter table authorization_fail_4 add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_fail_4 +POSTHOOK: Output: default@authorization_fail_4@ds=2010 +PREHOOK: query: show grant user hive_test_user on table authorization_fail_4 +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_fail_4 +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_fail_4 +principalName hive_test_user +principalType USER +privilege Alter +grantTime 1292569775 +grantor hive_test_user + +database default +table authorization_fail_4 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292569776 +grantor hive_test_user +PREHOOK: query: show grant user hive_test_user on table authorization_fail_4 partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_fail_4 partition (ds='2010') +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_fail_4 +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Alter +grantTime 1292569776 +grantor hive_test_user + +database default +table authorization_fail_4 +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292569776 +grantor hive_test_user +Authorization failed:No privilege 'Select' found for inputs { database:default, table:authorization_fail_4, partitionName:ds=2010, columnName:key}. Use show grant to get more details. Index: ql/src/test/results/clientnegative/authorization_fail_5.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_fail_5.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_fail_5.q.out (revision 0) @@ -0,0 +1,122 @@ +PREHOOK: query: create table authorization_fail (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_fail (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_fail +PREHOOK: query: revoke `ALL` on table authorization_fail from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_fail from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: grant `Alter` on table authorization_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Alter` on table authorization_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: ALTER TABLE authorization_fail SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") +PREHOOK: type: ALTERTABLE_PROPERTIES +PREHOOK: Input: default@authorization_fail +PREHOOK: Output: default@authorization_fail +POSTHOOK: query: ALTER TABLE authorization_fail SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") +POSTHOOK: type: ALTERTABLE_PROPERTIES +POSTHOOK: Input: default@authorization_fail +POSTHOOK: Output: default@authorization_fail +PREHOOK: query: grant `Create` on table authorization_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Create` on table authorization_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Select` on table authorization_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Select` on table authorization_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: alter table authorization_fail add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_fail +POSTHOOK: query: alter table authorization_fail add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_fail +POSTHOOK: Output: default@authorization_fail@ds=2010 +PREHOOK: query: show grant user hive_test_user on table authorization_fail +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_fail +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_fail +principalName hive_test_user +principalType USER +privilege Alter +grantTime 1292570198 +grantor hive_test_user + +database default +table authorization_fail +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292570198 +grantor hive_test_user + +database default +table authorization_fail +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292570198 +grantor hive_test_user +PREHOOK: query: show grant user hive_test_user on table authorization_fail partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_fail partition (ds='2010') +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_fail +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Alter +grantTime 1292570198 +grantor hive_test_user + +database default +table authorization_fail +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292570198 +grantor hive_test_user + +database default +table authorization_fail +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292570198 +grantor hive_test_user +PREHOOK: query: revoke `Select` on table authorization_fail partition (ds='2010') from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `Select` on table authorization_fail partition (ds='2010') from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table authorization_fail partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_fail partition (ds='2010') +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_fail +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Alter +grantTime 1292570198 +grantor hive_test_user + +database default +table authorization_fail +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292570198 +grantor hive_test_user +Authorization failed:No privilege 'Select' found for inputs { database:default, table:authorization_fail, partitionName:ds=2010, columnName:key}. Use show grant to get more details. Index: ql/src/test/results/clientnegative/authorization_fail_6.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_fail_6.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_fail_6.q.out (revision 0) @@ -0,0 +1,10 @@ +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: revoke `ALL` on table authorization_part_fail from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_part_fail from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +Authorization failed:No privilege 'Alter' found for inputs { database:default, table:authorization_part_fail}. Use show grant to get more details. Index: ql/src/test/results/clientnegative/authorization_fail_7.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_fail_7.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_fail_7.q.out (revision 0) @@ -0,0 +1,44 @@ +PREHOOK: query: create table authorization_fail (key int, value string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_fail (key int, value string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_fail +PREHOOK: query: revoke `ALL` on table authorization_fail from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_fail from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: create role hive_test_role_fail +PREHOOK: type: CREATEROLE +POSTHOOK: query: create role hive_test_role_fail +POSTHOOK: type: CREATEROLE +PREHOOK: query: grant role hive_test_role_fail to user hive_test_user +PREHOOK: type: GRANT_ROLE +POSTHOOK: query: grant role hive_test_role_fail to user hive_test_user +POSTHOOK: type: GRANT_ROLE +PREHOOK: query: grant `select` on table authorization_fail to role hive_test_role_fail +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table authorization_fail to role hive_test_role_fail +POSTHOOK: type: GRANT_PRIVILEGE +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:hive_test_role_fail +role name:hive_test_role_fail +PREHOOK: query: show grant role hive_test_role_fail on table authorization_fail +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role hive_test_role_fail on table authorization_fail +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_fail +principalName hive_test_role_fail +principalType ROLE +privilege Select +grantTime 1292570201 +grantor hive_test_user +PREHOOK: query: drop role hive_test_role_fail +PREHOOK: type: DROPROLE +POSTHOOK: query: drop role hive_test_role_fail +POSTHOOK: type: DROPROLE +Authorization failed:No privilege 'Select' found for inputs { database:default, table:authorization_fail, columnName:key}. Use show grant to get more details. 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,250 @@ +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: ALTER TABLE authorization_part_fail SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") +PREHOOK: type: ALTERTABLE_PROPERTIES +PREHOOK: Input: default@authorization_part_fail +PREHOOK: Output: default@authorization_part_fail +POSTHOOK: query: ALTER TABLE authorization_part_fail SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") +POSTHOOK: type: ALTERTABLE_PROPERTIES +POSTHOOK: Input: default@authorization_part_fail +POSTHOOK: Output: default@authorization_part_fail +PREHOOK: query: revoke `ALL` on table authorization_part_fail from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_part_fail from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +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 +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292570477 +grantor hive_test_user +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), ] + +database default +table authorization_part_fail +partition ds=2010 +columnName key +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292570485 +grantor hive_test_user +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 +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292570485 +grantor hive_test_user +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-12-16_23-21-26_341_6045427400960012192/-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-12-16_23-21-26_341_6045427400960012192/-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), ] + +database default +table authorization_part_fail +partition ds=2011 +columnName key +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292570500 +grantor hive_test_user +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 +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292570500 +grantor hive_test_user +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-12-16_23-21-40_573_6139158379776569501/-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-12-16_23-21-40_573_6139158379776569501/-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-12-16_23-21-46_703_8547570686064698117/-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-12-16_23-21-46_703_8547570686064698117/-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), ] +Authorization 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/clientnegative/lockneg5.q.out =================================================================== --- ql/src/test/results/clientnegative/lockneg5.q.out (revision 1057802) +++ ql/src/test/results/clientnegative/lockneg5.q.out (working copy) @@ -4,5 +4,5 @@ POSTHOOK: type: DROPTABLE PREHOOK: query: show locks tstsrcpart extended PREHOOK: type: SHOWLOCKS -FAILED: Error in metadata: org.apache.hadoop.hive.ql.metadata.InvalidTableException: Table not found +FAILED: Error in metadata: org.apache.hadoop.hive.ql.metadata.InvalidTableException: Table tstsrcpart not found FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask Index: ql/src/test/results/clientpositive/alter4.q.out =================================================================== --- ql/src/test/results/clientpositive/alter4.q.out (revision 1057802) +++ 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,412 @@ +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: revoke `ALL` on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_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 +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567447 +grantor hive_test_user +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-12-16_22-30-47_550_1512695429257033493/-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-12-16_22-30-47_550_1512695429257033493/-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 +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 +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 +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567455 +grantor hive_test_user +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-12-16_22-30-55_772_6274083496243050072/-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-12-16_22-30-55_772_6274083496243050072/-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 +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 +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292567463 +grantor hive_test_user +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-12-16_22-31-03_700_7275195249200178582/-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-12-16_22-31-03_700_7275195249200178582/-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 + +database default +table src_autho_test +columnName key +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292567471 +grantor hive_test_user +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-12-16_22-31-11_544_6787651330159557242/-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-12-16_22-31-11_544_6787651330159557242/-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 +role name:src_role +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 + +database default +table src_autho_test +columnName key +principalName src_role +principalType ROLE +privilege Select +grantTime 1292567480 +grantor hive_test_user +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-12-16_22-31-20_263_1898304116616741455/-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-12-16_22-31-20_263_1898304116616741455/-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-12-16_22-31-26_813_7645696827575089587/-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-12-16_22-31-26_813_7645696827575089587/-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 +principalName src_role +principalType ROLE +privilege Select +grantTime 1292567486 +grantor hive_test_user +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,1184 @@ +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: revoke `ALL` on table authorization_part from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table authorization_part from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: ALTER TABLE authorization_part SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") +PREHOOK: type: ALTERTABLE_PROPERTIES +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part +POSTHOOK: query: ALTER TABLE authorization_part SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") +POSTHOOK: type: ALTERTABLE_PROPERTIES +POSTHOOK: Input: default@authorization_part +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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567495 +grantor hive_test_user +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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567495 +grantor hive_test_user +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 +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567504 +grantor hive_test_user +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 +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567495 +grantor hive_test_user +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-12-16_22-31-44_729_6159445007917571115/-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-12-16_22-31-44_729_6159445007917571115/-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 +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567504 +grantor hive_test_user +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-12-16_22-31-51_427_8272622381150203232/-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-12-16_22-31-51_427_8272622381150203232/-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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567495 +grantor hive_test_user +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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567519 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567519 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567519 +grantor hive_test_user +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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567529 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567529 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567529 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567529 +grantor hive_test_user +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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567519 +grantor hive_test_user +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-12-16_22-32-09_525_5244658946776244269/-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-12-16_22-32-09_525_5244658946776244269/-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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567495 +grantor hive_test_user + +database default +table authorization_part +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567495 +grantor hive_test_user +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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567529 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567529 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567529 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567529 +grantor hive_test_user +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-12-16_22-32-15_947_8100424728454115880/-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-12-16_22-32-15_947_8100424728454115880/-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 +principalName hive_test_user +principalType USER +privilege Create +grantTime 1292567529 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Update +grantTime 1292567529 +grantor hive_test_user + +database default +table authorization_part +partition ds=2010 +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567529 +grantor hive_test_user +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), ] + +database default +table authorization_part +partition ds=2010 +columnName key +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292567551 +grantor hive_test_user +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), ] + +database default +table authorization_part +columnName key +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292567543 +grantor hive_test_user +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-12-16_22-32-32_179_1859237138227238635/-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-12-16_22-32-32_179_1859237138227238635/-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), ] + +database default +table authorization_part +partition ds=2010 +columnName key +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292567551 +grantor hive_test_user +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-12-16_22-32-38_657_7188861192410002773/-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-12-16_22-32-38_657_7188861192410002773/-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 +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292567574 +grantor hive_test_user +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 +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292567566 +grantor hive_test_user +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-12-16_22-32-55_104_6462994010195124243/-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-12-16_22-32-55_104_6462994010195124243/-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 +principalName hive_test_group1 +principalType GROUP +privilege Select +grantTime 1292567574 +grantor hive_test_user +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-12-16_22-33-01_749_5408406852569793238/-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-12-16_22-33-01_749_5408406852569793238/-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/authorization_3.q.out =================================================================== --- ql/src/test/results/clientpositive/authorization_3.q.out (revision 0) +++ ql/src/test/results/clientpositive/authorization_3.q.out (revision 0) @@ -0,0 +1,87 @@ +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: revoke `ALL` on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `ALL` on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +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: grant `select` on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: 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 +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567595 +grantor hive_test_user + +database default +table src_autho_test +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567595 +grantor hive_test_user +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: revoke `drop` on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `drop` on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: grant `drop`,`select` on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `drop`,`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 +principalName hive_test_user +principalType USER +privilege Drop +grantTime 1292567595 +grantor hive_test_user + +database default +table src_autho_test +principalName hive_test_user +principalType USER +privilege Select +grantTime 1292567595 +grantor hive_test_user +PREHOOK: query: revoke `drop`,`select` on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `drop`,`select` on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: grant `drop`,`select`(key), `select`(value) on table src to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `drop`,`select`(key), `select`(value) on table src 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 +PREHOOK: query: revoke `drop`,`select`(key), `select`(value) on table src from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `drop`,`select`(key), `select`(value) on table src from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE Index: ql/src/test/results/clientpositive/authorization_4.q.out =================================================================== --- ql/src/test/results/clientpositive/authorization_4.q.out (revision 0) +++ ql/src/test/results/clientpositive/authorization_4.q.out (revision 0) @@ -0,0 +1,55 @@ +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: 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 +principalName hive_test_user +principalType USER +privilege All +grantTime 1292567601 +grantor hive_test_user +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-12-16_22-33-22_016_7487510540844272228/-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-12-16_22-33-22_016_7487510540844272228/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +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/bucket_groupby.q.out =================================================================== --- ql/src/test/results/clientpositive/bucket_groupby.q.out (revision 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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/keyword_1.q.out =================================================================== --- ql/src/test/results/clientpositive/keyword_1.q.out (revision 0) +++ ql/src/test/results/clientpositive/keyword_1.q.out (revision 0) @@ -0,0 +1,128 @@ +PREHOOK: query: create table test_user (user string, `group` string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table test_user (user string, `group` string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@test_user +PREHOOK: query: grant `select` on table test_user to user hive_test +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table test_user to user hive_test +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: explain select user from test_user +PREHOOK: type: QUERY +POSTHOOK: query: explain select user from test_user +POSTHOOK: type: QUERY +ABSTRACT SYNTAX TREE: + (TOK_QUERY (TOK_FROM (TOK_TABREF test_user)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL user))))) + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 is a root stage + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Alias -> Map Operator Tree: + test_user + TableScan + alias: test_user + Select Operator + expressions: + expr: user + type: string + outputColumnNames: _col0 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + + Stage: Stage-0 + Fetch Operator + limit: -1 + + +PREHOOK: query: show grant user hive_test on table test_user +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test on table test_user +POSTHOOK: type: SHOW_GRANT + +database default +table test_user +principalName hive_test +principalType USER +privilege Select +grantTime 1294716172 +grantor hive_test_user +PREHOOK: query: drop table test_user +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@test_user +PREHOOK: Output: default@test_user +POSTHOOK: query: drop table test_user +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@test_user +POSTHOOK: Output: default@test_user +PREHOOK: query: create table test_user (role string, `group` string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table test_user (role string, `group` string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@test_user +PREHOOK: query: grant `select` on table test_user to user hive_test +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table test_user to user hive_test +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: explain select role from test_user +PREHOOK: type: QUERY +POSTHOOK: query: explain select role from test_user +POSTHOOK: type: QUERY +ABSTRACT SYNTAX TREE: + (TOK_QUERY (TOK_FROM (TOK_TABREF test_user)) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (TOK_TABLE_OR_COL role))))) + +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 is a root stage + +STAGE PLANS: + Stage: Stage-1 + Map Reduce + Alias -> Map Operator Tree: + test_user + TableScan + alias: test_user + Select Operator + expressions: + expr: role + type: string + outputColumnNames: _col0 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + + Stage: Stage-0 + Fetch Operator + limit: -1 + + +PREHOOK: query: show grant user hive_test on table test_user +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test on table test_user +POSTHOOK: type: SHOW_GRANT + +database default +table test_user +principalName hive_test +principalType USER +privilege Select +grantTime 1294716174 +grantor hive_test_user +PREHOOK: query: drop table test_user +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@test_user +PREHOOK: Output: default@test_user +POSTHOOK: query: drop table test_user +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@test_user +POSTHOOK: Output: default@test_user Index: ql/src/test/results/clientpositive/merge3.q.out =================================================================== --- ql/src/test/results/clientpositive/merge3.q.out (revision 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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_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_empty PREHOOK: type: DROPTABLE PREHOOK: Input: default@show_idx_empty Index: ql/src/test/results/clientpositive/smb_mapjoin9.q.out =================================================================== --- ql/src/test/results/clientpositive/smb_mapjoin9.q.out (revision 1057802) +++ ql/src/test/results/clientpositive/smb_mapjoin9.q.out (working copy) @@ -36,14 +36,14 @@ FROM hive_test_smb_bucket1 a JOIN hive_test_smb_bucket2 b ON a.key = b.key WHERE a.ds = '2010-10-15' and b.ds='2010-10-15' and b.key IS NOT NULL -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: query: explain create table smb_mapjoin9_results as SELECT /* + MAPJOIN(b) */ b.key as k1, b.value, b.ds, a.key as k2 FROM hive_test_smb_bucket1 a JOIN hive_test_smb_bucket2 b ON a.key = b.key WHERE a.ds = '2010-10-15' and b.ds='2010-10-15' and b.key IS NOT NULL -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Lineage: hive_test_smb_bucket1 PARTITION(ds=2010-10-15).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: hive_test_smb_bucket1 PARTITION(ds=2010-10-15).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: hive_test_smb_bucket2 PARTITION(ds=2010-10-15).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] @@ -114,7 +114,7 @@ Move Operator files: hdfs directory: true - destination: pfile:///Users/heyongqiang/Documents/workspace/Hive-Trunk/build/ql/test/data/warehouse/smb_mapjoin9_results + destination: pfile:///Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/smb_mapjoin9_results Stage: Stage-3 Create Table Operator: @@ -133,7 +133,7 @@ FROM hive_test_smb_bucket1 a JOIN hive_test_smb_bucket2 b ON a.key = b.key WHERE a.ds = '2010-10-15' and b.ds='2010-10-15' and b.key IS NOT NULL -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@hive_test_smb_bucket1@ds=2010-10-15 PREHOOK: Input: default@hive_test_smb_bucket2@ds=2010-10-15 POSTHOOK: query: create table smb_mapjoin9_results as @@ -141,7 +141,7 @@ FROM hive_test_smb_bucket1 a JOIN hive_test_smb_bucket2 b ON a.key = b.key WHERE a.ds = '2010-10-15' and b.ds='2010-10-15' and b.key IS NOT NULL -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@hive_test_smb_bucket1@ds=2010-10-15 POSTHOOK: Input: default@hive_test_smb_bucket2@ds=2010-10-15 POSTHOOK: Output: default@smb_mapjoin9_results Index: ql/src/test/results/clientpositive/stats10.q.out =================================================================== --- ql/src/test/results/clientpositive/stats10.q.out (revision 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 1057802) +++ 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 Index: ql/src/test/results/clientpositive/updateAccessTime.q.out =================================================================== --- ql/src/test/results/clientpositive/updateAccessTime.q.out (revision 1057802) +++ ql/src/test/results/clientpositive/updateAccessTime.q.out (working copy) @@ -3,10 +3,10 @@ POSTHOOK: query: drop table tstsrc POSTHOOK: type: DROPTABLE PREHOOK: query: create table tstsrc as select * from src -PREHOOK: type: CREATETABLE +PREHOOK: type: CREATETABLE_AS_SELECT PREHOOK: Input: default@src POSTHOOK: query: create table tstsrc as select * from src -POSTHOOK: type: CREATETABLE +POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@src POSTHOOK: Output: default@tstsrc PREHOOK: query: desc extended tstsrc @@ -16,15 +16,15 @@ key string value string -Detailed Table Information Table(tableName:tstsrc, dbName:default, owner:njain, createTime:1291233740, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/tstsrc, 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=1291233740}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:tstsrc, dbName:default, owner:heyongqiang, createTime:1292756236, 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/tstsrc, 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=1292756236}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: select count(1) from tstsrc PREHOOK: type: QUERY PREHOOK: Input: default@tstsrc -PREHOOK: Output: file:/tmp/njain/hive_2010-12-01_12-02-21_111_5001673068661326156/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-12-19_02-57-17_475_7096129245987212455/-mr-10000 POSTHOOK: query: select count(1) from tstsrc POSTHOOK: type: QUERY POSTHOOK: Input: default@tstsrc -POSTHOOK: Output: file:/tmp/njain/hive_2010-12-01_12-02-21_111_5001673068661326156/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-12-19_02-57-17_475_7096129245987212455/-mr-10000 500 PREHOOK: query: desc extended tstsrc PREHOOK: type: DESCTABLE @@ -33,7 +33,7 @@ key string value string -Detailed Table Information Table(tableName:tstsrc, dbName:default, owner:njain, createTime:1291233740, lastAccessTime:1291233741, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/tstsrc, 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=1291233741}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:tstsrc, dbName:default, owner:heyongqiang, createTime:1292756236, lastAccessTime:1292756237, 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/tstsrc, 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=1292756237}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: drop table tstsrc PREHOOK: type: DROPTABLE PREHOOK: Input: default@tstsrc @@ -93,7 +93,7 @@ ds string hr string -Detailed Table Information Table(tableName:tstsrcpart, dbName:default, owner:null, createTime:1291233745, 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/tstsrcpart, 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=1291233762, numRows=2000, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:tstsrcpart, dbName:default, owner:null, createTime:1292756243, 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/tstsrcpart, 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=1292756261, numRows=2000, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: desc extended tstsrcpart partition (ds='2008-04-08', hr='11') PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended tstsrcpart partition (ds='2008-04-08', hr='11') @@ -111,7 +111,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:tstsrcpart, createTime:1291233760, 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/tstsrcpart/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=1291233762, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:tstsrcpart, createTime:1292756260, 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/tstsrcpart/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=1292756261, numRows=500, totalSize=5812}, privileges:PrincipalPrivilegeSet(userPrivileges:{hive_test_user=[]}, groupPrivileges:{hive_test_group2=[], hive_test_group1=[]}, rolePrivileges:null)) PREHOOK: query: desc extended tstsrcpart partition (ds='2008-04-08', hr='12') PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended tstsrcpart partition (ds='2008-04-08', hr='12') @@ -129,15 +129,15 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:tstsrcpart, createTime:1291233761, 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/tstsrcpart/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=1291233762, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:tstsrcpart, createTime:1292756260, 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/tstsrcpart/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=1292756261, numRows=500, totalSize=5812}, privileges:PrincipalPrivilegeSet(userPrivileges:{hive_test_user=[]}, groupPrivileges:{hive_test_group2=[], hive_test_group1=[]}, rolePrivileges:null)) PREHOOK: query: select count(1) from tstsrcpart where ds = '2008-04-08' and hr = '11' PREHOOK: type: QUERY PREHOOK: Input: default@tstsrcpart@ds=2008-04-08/hr=11 -PREHOOK: Output: file:/tmp/njain/hive_2010-12-01_12-02-43_333_1208983489396408689/-mr-10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-12-19_02-57-42_045_6024961651300970708/-mr-10000 POSTHOOK: query: select count(1) from tstsrcpart where ds = '2008-04-08' and hr = '11' POSTHOOK: type: QUERY POSTHOOK: Input: default@tstsrcpart@ds=2008-04-08/hr=11 -POSTHOOK: Output: file:/tmp/njain/hive_2010-12-01_12-02-43_333_1208983489396408689/-mr-10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-12-19_02-57-42_045_6024961651300970708/-mr-10000 POSTHOOK: Lineage: tstsrcpart PARTITION(ds=2008-04-08,hr=11).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: tstsrcpart PARTITION(ds=2008-04-08,hr=11).value SIMPLE [(srcpart)srcpart.FieldSchema(name:value, type:string, comment:default), ] POSTHOOK: Lineage: tstsrcpart PARTITION(ds=2008-04-08,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] @@ -164,7 +164,7 @@ ds string hr string -Detailed Table Information Table(tableName:tstsrcpart, dbName:default, owner:null, createTime:1291233745, lastAccessTime:1291233763, 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/tstsrcpart, 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=1291233763, numRows=2000, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:tstsrcpart, dbName:default, owner:null, createTime:1292756243, lastAccessTime:1292756262, 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/tstsrcpart, 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=1292756262, numRows=2000, totalSize=23248}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: desc extended tstsrcpart partition (ds='2008-04-08', hr='11') PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended tstsrcpart partition (ds='2008-04-08', hr='11') @@ -182,7 +182,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:tstsrcpart, createTime:1291233760, lastAccessTime:1291233763, 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/tstsrcpart/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=1291233763, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 11], dbName:default, tableName:tstsrcpart, createTime:1292756260, lastAccessTime:1292756262, 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/tstsrcpart/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=1292756262, numRows=500, totalSize=5812}, privileges:PrincipalPrivilegeSet(userPrivileges:{hive_test_user=[]}, groupPrivileges:{hive_test_group2=[], hive_test_group1=[]}, rolePrivileges:null)) PREHOOK: query: desc extended tstsrcpart partition (ds='2008-04-08', hr='12') PREHOOK: type: DESCTABLE POSTHOOK: query: desc extended tstsrcpart partition (ds='2008-04-08', hr='12') @@ -200,7 +200,7 @@ ds string hr string -Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:tstsrcpart, createTime:1291233761, 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/tstsrcpart/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=1291233762, numRows=500, totalSize=5812}) +Detailed Partition Information Partition(values:[2008-04-08, 12], dbName:default, tableName:tstsrcpart, createTime:1292756260, 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/tstsrcpart/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=1292756261, numRows=500, totalSize=5812}, privileges:PrincipalPrivilegeSet(userPrivileges:{hive_test_user=[]}, groupPrivileges:{hive_test_group2=[], hive_test_group1=[]}, rolePrivileges:null)) PREHOOK: query: drop table tstsrcpart PREHOOK: type: DROPTABLE PREHOOK: Input: default@tstsrcpart